@ukic/canary-web-components 2.0.0-canary.12 → 2.0.0-canary.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (542) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/date-helpers-c9551119.js +150 -0
  3. package/dist/cjs/date-helpers-c9551119.js.map +1 -0
  4. package/dist/cjs/{helpers-b525d45a.js → helpers-6d736902.js} +27 -4
  5. package/dist/cjs/helpers-6d736902.js.map +1 -0
  6. package/dist/cjs/{helpers-c4444a7e.js → helpers-f75cf7cf.js} +94 -48
  7. package/dist/cjs/helpers-f75cf7cf.js.map +1 -0
  8. package/dist/cjs/ic-accordion-group.cjs.entry.js +11 -2
  9. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-badge.cjs.entry.js +18 -17
  14. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +41 -86
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-chip.cjs.entry.js +25 -2
  23. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-table.cjs.entry.js +43 -308
  26. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-date-input.cjs.entry.js +1108 -0
  28. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
  29. package/dist/cjs/ic-date-picker.cjs.entry.js +1053 -0
  30. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
  31. package/dist/cjs/ic-dialog.cjs.entry.js +14 -4
  32. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-empty-state.cjs.entry.js +38 -0
  35. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +150 -0
  42. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
  43. package/dist/cjs/ic-link.cjs.entry.js +33 -15
  44. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  49. package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +5 -69
  50. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
  51. package/dist/cjs/ic-navigation-button.cjs.entry.js +26 -5
  52. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-navigation-group.cjs.entry.js +16 -13
  54. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -33
  56. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  59. package/dist/cjs/{ic-empty-state_2.cjs.entry.js → ic-pagination-bar.cjs.entry.js} +4 -34
  60. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
  61. package/dist/cjs/ic-pagination_4.cjs.entry.js +53 -16
  62. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-radio-group.cjs.entry.js +40 -26
  65. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-radio-option.cjs.entry.js +9 -4
  67. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-select-with-multi.cjs.entry.js +6 -19
  70. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  72. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-step.cjs.entry.js +5 -2
  75. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-stepper.cjs.entry.js +2 -1
  77. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  79. package/dist/cjs/ic-tab-context.cjs.entry.js +18 -2
  80. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  82. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  84. package/dist/cjs/ic-theme.cjs.entry.js +3 -10
  85. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  87. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  88. package/dist/cjs/ic-top-navigation.cjs.entry.js +46 -60
  89. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-typography.cjs.entry.js +11 -35
  91. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  92. package/dist/cjs/index-4cf27b16.js +18 -10
  93. package/dist/cjs/loader.cjs.js +1 -1
  94. package/dist/collection/assets/calendar.svg +3 -0
  95. package/dist/collection/collection-manifest.json +2 -1
  96. package/dist/collection/components/ic-data-table/ic-data-table.css +7 -82
  97. package/dist/collection/components/ic-data-table/ic-data-table.js +44 -535
  98. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  99. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  100. package/dist/collection/components/ic-data-table/story-data.js +11 -386
  101. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  102. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +0 -319
  103. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  104. package/dist/collection/components/ic-date-input/ic-date-input.css +560 -0
  105. package/dist/collection/components/ic-date-input/ic-date-input.js +1737 -0
  106. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
  107. package/dist/collection/components/ic-date-input/story-data.js +28 -0
  108. package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
  109. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1142 -0
  110. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
  111. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
  112. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
  113. package/dist/collection/components/ic-date-picker/ic-date-picker.css +878 -0
  114. package/dist/collection/components/ic-date-picker/ic-date-picker.js +1512 -0
  115. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
  116. package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
  117. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
  118. package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
  119. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
  120. package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
  121. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
  122. package/dist/collection/components/ic-date-picker/story-data.js +148 -0
  123. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
  124. package/dist/collection/components/{ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js → ic-date-picker/test/a11y/ic-date-picker.test.a11y.js} +5 -3
  125. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
  126. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
  127. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
  128. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +991 -0
  129. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
  130. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +2 -2
  131. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  132. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +1 -1
  133. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  134. package/dist/collection/components/ic-select-with-multi/ic-select.js +2 -2
  135. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  136. package/dist/collection/utils/constants.js +55 -0
  137. package/dist/collection/utils/constants.js.map +1 -1
  138. package/dist/collection/utils/date-helpers.js +133 -0
  139. package/dist/collection/utils/date-helpers.js.map +1 -0
  140. package/dist/collection/utils/helpers.js +272 -42
  141. package/dist/collection/utils/helpers.js.map +1 -1
  142. package/dist/collection/utils/types.js +45 -0
  143. package/dist/collection/utils/types.js.map +1 -1
  144. package/dist/components/helpers.js +26 -3
  145. package/dist/components/helpers.js.map +1 -1
  146. package/dist/components/helpers2.js +91 -45
  147. package/dist/components/helpers2.js.map +1 -1
  148. package/dist/components/ic-accordion-group.js +14 -4
  149. package/dist/components/ic-accordion-group.js.map +1 -1
  150. package/dist/components/ic-badge.js +18 -17
  151. package/dist/components/ic-badge.js.map +1 -1
  152. package/dist/components/ic-button2.js +43 -86
  153. package/dist/components/ic-button2.js.map +1 -1
  154. package/dist/components/ic-card.js +1 -1
  155. package/dist/components/ic-checkbox-group.js +1 -1
  156. package/dist/components/ic-checkbox.js +1 -1
  157. package/dist/components/ic-chip.js +29 -3
  158. package/dist/components/ic-chip.js.map +1 -1
  159. package/dist/components/ic-data-table.js +49 -334
  160. package/dist/components/ic-data-table.js.map +1 -1
  161. package/dist/components/{ic-data-table-title-bar.d.ts → ic-date-input.d.ts} +4 -4
  162. package/dist/components/ic-date-input.js +8 -0
  163. package/dist/components/ic-date-input.js.map +1 -0
  164. package/dist/components/ic-date-input2.js +1340 -0
  165. package/dist/components/ic-date-input2.js.map +1 -0
  166. package/dist/components/ic-date-picker.d.ts +11 -0
  167. package/dist/components/ic-date-picker.js +1175 -0
  168. package/dist/components/ic-date-picker.js.map +1 -0
  169. package/dist/components/ic-dialog.js +13 -3
  170. package/dist/components/ic-dialog.js.map +1 -1
  171. package/dist/components/ic-empty-state.js +57 -1
  172. package/dist/components/ic-empty-state.js.map +1 -1
  173. package/dist/components/ic-input-component-container2.js +1 -1
  174. package/dist/components/ic-input-component-container2.js.map +1 -1
  175. package/dist/components/ic-link2.js +34 -16
  176. package/dist/components/ic-link2.js.map +1 -1
  177. package/dist/components/ic-loading-indicator2.js +1 -1
  178. package/dist/components/ic-loading-indicator2.js.map +1 -1
  179. package/dist/components/ic-menu-item2.js +1 -1
  180. package/dist/components/ic-menu2.js +2 -2
  181. package/dist/components/ic-menu2.js.map +1 -1
  182. package/dist/components/ic-menu3.js +1 -1
  183. package/dist/components/ic-menu3.js.map +1 -1
  184. package/dist/components/ic-navigation-button.js +26 -5
  185. package/dist/components/ic-navigation-button.js.map +1 -1
  186. package/dist/components/ic-navigation-group.js +15 -12
  187. package/dist/components/ic-navigation-group.js.map +1 -1
  188. package/dist/components/ic-navigation-item.js +29 -33
  189. package/dist/components/ic-navigation-item.js.map +1 -1
  190. package/dist/components/ic-pagination-bar2.js +1 -1
  191. package/dist/components/ic-pagination-bar2.js.map +1 -1
  192. package/dist/components/ic-pagination-item2.js +1 -1
  193. package/dist/components/ic-pagination2.js +5 -5
  194. package/dist/components/ic-pagination2.js.map +1 -1
  195. package/dist/components/ic-radio-group.js +40 -26
  196. package/dist/components/ic-radio-group.js.map +1 -1
  197. package/dist/components/ic-radio-option.js +11 -5
  198. package/dist/components/ic-radio-option.js.map +1 -1
  199. package/dist/components/ic-search-bar.js +1 -1
  200. package/dist/components/ic-select-with-multi.js +1 -14
  201. package/dist/components/ic-select-with-multi.js.map +1 -1
  202. package/dist/components/ic-select2.js +25 -7
  203. package/dist/components/ic-select2.js.map +1 -1
  204. package/dist/components/ic-side-navigation.js +1 -1
  205. package/dist/components/ic-side-navigation.js.map +1 -1
  206. package/dist/components/ic-step.js +4 -1
  207. package/dist/components/ic-step.js.map +1 -1
  208. package/dist/components/ic-stepper.js +2 -0
  209. package/dist/components/ic-stepper.js.map +1 -1
  210. package/dist/components/ic-switch.js +1 -1
  211. package/dist/components/ic-tab-context.js +18 -2
  212. package/dist/components/ic-tab-context.js.map +1 -1
  213. package/dist/components/ic-tab.js +1 -1
  214. package/dist/components/ic-text-field2.js +27 -8
  215. package/dist/components/ic-text-field2.js.map +1 -1
  216. package/dist/components/ic-theme.js +3 -10
  217. package/dist/components/ic-theme.js.map +1 -1
  218. package/dist/components/ic-toggle-button.js +1 -1
  219. package/dist/components/ic-top-navigation.js +47 -61
  220. package/dist/components/ic-top-navigation.js.map +1 -1
  221. package/dist/components/ic-typography2.js +12 -38
  222. package/dist/components/ic-typography2.js.map +1 -1
  223. package/dist/core/core.css +1 -1
  224. package/dist/core/core.esm.js +1 -1
  225. package/dist/core/core.esm.js.map +1 -1
  226. package/dist/core/{p-869954a2.entry.js → p-00bd7919.entry.js} +2 -2
  227. package/dist/core/p-00c5639e.entry.js +2 -0
  228. package/dist/core/{p-db9c03c0.entry.js.map → p-00c5639e.entry.js.map} +1 -1
  229. package/dist/core/p-06c27edb.entry.js +2 -0
  230. package/dist/core/p-06c27edb.entry.js.map +1 -0
  231. package/dist/core/{p-a0f8efb2.entry.js → p-0af27517.entry.js} +2 -2
  232. package/dist/core/p-0af27517.entry.js.map +1 -0
  233. package/dist/core/p-162f3e36.entry.js +2 -0
  234. package/dist/core/{p-624d4f5f.entry.js.map → p-162f3e36.entry.js.map} +1 -1
  235. package/dist/core/p-19c1e271.entry.js +2 -0
  236. package/dist/core/p-19c1e271.entry.js.map +1 -0
  237. package/dist/core/{p-a50c3b9e.entry.js → p-1a91e842.entry.js} +2 -2
  238. package/dist/core/{p-76915584.entry.js → p-1c3bd46d.entry.js} +2 -2
  239. package/dist/core/p-1c3bd46d.entry.js.map +1 -0
  240. package/dist/core/p-2c9d6334.entry.js +2 -0
  241. package/dist/core/p-2c9d6334.entry.js.map +1 -0
  242. package/dist/core/p-33dd24eb.js +2 -0
  243. package/dist/core/p-33dd24eb.js.map +1 -0
  244. package/dist/core/p-3dcc61cc.entry.js +2 -0
  245. package/dist/core/p-3dcc61cc.entry.js.map +1 -0
  246. package/dist/core/p-3e9a8977.entry.js +2 -0
  247. package/dist/core/{p-595be57d.entry.js.map → p-3e9a8977.entry.js.map} +1 -1
  248. package/dist/core/{p-f3c840cd.entry.js → p-41b682dc.entry.js} +2 -2
  249. package/dist/core/p-494c3cbe.entry.js +2 -0
  250. package/dist/core/p-494c3cbe.entry.js.map +1 -0
  251. package/dist/core/p-4ad3012a.entry.js +2 -0
  252. package/dist/core/p-4ad3012a.entry.js.map +1 -0
  253. package/dist/core/p-4bd13376.entry.js +2 -0
  254. package/dist/core/p-4bd13376.entry.js.map +1 -0
  255. package/dist/core/p-4fd58768.entry.js +2 -0
  256. package/dist/core/p-4fd58768.entry.js.map +1 -0
  257. package/dist/core/{p-8b08d8fe.entry.js → p-6dce8e88.entry.js} +2 -2
  258. package/dist/core/{p-1ca332ca.entry.js → p-6eb58b0a.entry.js} +2 -2
  259. package/dist/core/p-730f058b.entry.js +2 -0
  260. package/dist/core/p-730f058b.entry.js.map +1 -0
  261. package/dist/core/p-7f53d1be.entry.js +2 -0
  262. package/dist/core/p-7f53d1be.entry.js.map +1 -0
  263. package/dist/core/{p-5ae93c16.entry.js → p-7fda2f94.entry.js} +2 -2
  264. package/dist/core/p-843bdaae.entry.js +2 -0
  265. package/dist/core/p-843bdaae.entry.js.map +1 -0
  266. package/dist/core/p-849f43c3.entry.js +2 -0
  267. package/dist/core/p-849f43c3.entry.js.map +1 -0
  268. package/dist/core/{p-c34848da.entry.js → p-8b1f9648.entry.js} +2 -2
  269. package/dist/core/{p-a434c3d4.entry.js → p-8b820365.entry.js} +2 -2
  270. package/dist/core/p-940de102.entry.js +2 -0
  271. package/dist/core/p-940de102.entry.js.map +1 -0
  272. package/dist/core/{p-2eac7dcc.entry.js → p-946625a3.entry.js} +2 -2
  273. package/dist/core/{p-7ef8d616.entry.js → p-9528b29e.entry.js} +2 -2
  274. package/dist/core/{p-a43c12cd.entry.js → p-9567c117.entry.js} +2 -2
  275. package/dist/core/{p-b82dcc29.entry.js → p-957de939.entry.js} +2 -2
  276. package/dist/core/{p-045359e1.entry.js → p-99bf38e3.entry.js} +2 -2
  277. package/dist/core/{p-81ddc39d.entry.js → p-9d8883d7.entry.js} +2 -2
  278. package/dist/core/{p-b6639e4a.entry.js → p-9e3178e8.entry.js} +2 -2
  279. package/dist/core/{p-b6639e4a.entry.js.map → p-9e3178e8.entry.js.map} +1 -1
  280. package/dist/core/p-a05755b1.entry.js +2 -0
  281. package/dist/core/p-a05755b1.entry.js.map +1 -0
  282. package/dist/core/{p-e834344e.entry.js → p-a1556d97.entry.js} +2 -2
  283. package/dist/core/{p-f843da01.entry.js → p-a2dc10d8.entry.js} +2 -2
  284. package/dist/core/{p-ab09986c.entry.js → p-a8c15117.entry.js} +2 -2
  285. package/dist/core/p-aabab75f.entry.js +2 -0
  286. package/dist/core/p-aabab75f.entry.js.map +1 -0
  287. package/dist/core/{p-f7a14c01.entry.js → p-c14a897d.entry.js} +2 -2
  288. package/dist/core/p-c621d6b0.entry.js +2 -0
  289. package/dist/core/p-c621d6b0.entry.js.map +1 -0
  290. package/dist/core/p-c7590421.entry.js +2 -0
  291. package/dist/core/p-c7590421.entry.js.map +1 -0
  292. package/dist/core/p-c953edb9.entry.js +2 -0
  293. package/dist/core/p-c953edb9.entry.js.map +1 -0
  294. package/dist/core/p-cca482e2.entry.js +2 -0
  295. package/dist/core/p-cca482e2.entry.js.map +1 -0
  296. package/dist/core/p-cd799087.js +2 -0
  297. package/dist/core/p-cd799087.js.map +1 -0
  298. package/dist/core/{p-e3997d60.entry.js → p-d2d63a61.entry.js} +2 -2
  299. package/dist/core/p-d32d331b.entry.js +2 -0
  300. package/dist/core/p-d32d331b.entry.js.map +1 -0
  301. package/dist/core/{p-4f413fc0.entry.js → p-db3a35fb.entry.js} +2 -2
  302. package/dist/core/p-dc5e1f8f.entry.js +2 -0
  303. package/dist/core/{p-6933f8e9.entry.js.map → p-dc5e1f8f.entry.js.map} +1 -1
  304. package/dist/core/{p-204ace96.entry.js → p-e16f73ba.entry.js} +2 -2
  305. package/dist/core/p-e189f1d0.entry.js +2 -0
  306. package/dist/core/p-e189f1d0.entry.js.map +1 -0
  307. package/dist/core/{p-917c5721.entry.js → p-e1963c78.entry.js} +2 -2
  308. package/dist/core/p-e1963c78.entry.js.map +1 -0
  309. package/dist/core/{p-f14454b1.entry.js → p-e8151d13.entry.js} +2 -2
  310. package/dist/core/p-ee765ad5.js +2 -0
  311. package/dist/core/p-ee765ad5.js.map +1 -0
  312. package/dist/core/{p-fc5611e2.entry.js → p-f2147136.entry.js} +2 -2
  313. package/dist/core/p-f2147136.entry.js.map +1 -0
  314. package/dist/core/{p-5e0c830b.entry.js → p-f8f36680.entry.js} +2 -2
  315. package/dist/core/{p-5e0c830b.entry.js.map → p-f8f36680.entry.js.map} +1 -1
  316. package/dist/core/p-fca46bd9.entry.js +2 -0
  317. package/dist/core/p-fca46bd9.entry.js.map +1 -0
  318. package/dist/core/{p-a31031a5.entry.js → p-ff3a01f3.entry.js} +2 -2
  319. package/dist/core/{p-75dac3d1.entry.js → p-ff6f1e3a.entry.js} +2 -2
  320. package/dist/esm/core.js +1 -1
  321. package/dist/esm/date-helpers-0e5e32a7.js +136 -0
  322. package/dist/esm/date-helpers-0e5e32a7.js.map +1 -0
  323. package/dist/esm/{helpers-12b4266a.js → helpers-c34e4042.js} +27 -4
  324. package/dist/esm/helpers-c34e4042.js.map +1 -0
  325. package/dist/esm/{helpers-1f07eb61.js → helpers-f328a7b6.js} +92 -46
  326. package/dist/esm/helpers-f328a7b6.js.map +1 -0
  327. package/dist/esm/ic-accordion-group.entry.js +11 -2
  328. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  329. package/dist/esm/ic-accordion.entry.js +1 -1
  330. package/dist/esm/ic-alert.entry.js +1 -1
  331. package/dist/esm/ic-back-to-top.entry.js +1 -1
  332. package/dist/esm/ic-badge.entry.js +18 -17
  333. package/dist/esm/ic-badge.entry.js.map +1 -1
  334. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  335. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  336. package/dist/esm/ic-button_3.entry.js +41 -86
  337. package/dist/esm/ic-button_3.entry.js.map +1 -1
  338. package/dist/esm/ic-card.entry.js +1 -1
  339. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  340. package/dist/esm/ic-checkbox.entry.js +1 -1
  341. package/dist/esm/ic-chip.entry.js +25 -2
  342. package/dist/esm/ic-chip.entry.js.map +1 -1
  343. package/dist/esm/ic-data-row.entry.js +1 -1
  344. package/dist/esm/ic-data-table.entry.js +44 -309
  345. package/dist/esm/ic-data-table.entry.js.map +1 -1
  346. package/dist/esm/ic-date-input.entry.js +1104 -0
  347. package/dist/esm/ic-date-input.entry.js.map +1 -0
  348. package/dist/esm/ic-date-picker.entry.js +1049 -0
  349. package/dist/esm/ic-date-picker.entry.js.map +1 -0
  350. package/dist/esm/ic-dialog.entry.js +14 -4
  351. package/dist/esm/ic-dialog.entry.js.map +1 -1
  352. package/dist/esm/ic-divider.entry.js +1 -1
  353. package/dist/{components/ic-empty-state2.js → esm/ic-empty-state.entry.js} +11 -38
  354. package/dist/esm/ic-empty-state.entry.js.map +1 -0
  355. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  356. package/dist/esm/ic-footer-link.entry.js +1 -1
  357. package/dist/esm/ic-footer.entry.js +1 -1
  358. package/dist/esm/ic-hero.entry.js +1 -1
  359. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  360. package/dist/esm/ic-input-component-container_4.entry.js +143 -0
  361. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
  362. package/dist/esm/ic-link.entry.js +34 -16
  363. package/dist/esm/ic-link.entry.js.map +1 -1
  364. package/dist/esm/ic-menu-group.entry.js +1 -1
  365. package/dist/esm/ic-menu-item.entry.js +1 -1
  366. package/dist/esm/ic-menu-with-multi.entry.js +1 -1
  367. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  368. package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +7 -69
  369. package/dist/esm/ic-menu.entry.js.map +1 -0
  370. package/dist/esm/ic-navigation-button.entry.js +27 -6
  371. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  372. package/dist/esm/ic-navigation-group.entry.js +16 -13
  373. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  374. package/dist/esm/ic-navigation-item.entry.js +29 -33
  375. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  376. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  377. package/dist/esm/ic-page-header.entry.js +1 -1
  378. package/dist/esm/{ic-empty-state_2.entry.js → ic-pagination-bar.entry.js} +5 -34
  379. package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
  380. package/dist/esm/ic-pagination_4.entry.js +54 -17
  381. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  382. package/dist/esm/ic-popover-menu.entry.js +1 -1
  383. package/dist/esm/ic-radio-group.entry.js +40 -26
  384. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  385. package/dist/esm/ic-radio-option.entry.js +9 -4
  386. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  387. package/dist/esm/ic-search-bar.entry.js +1 -1
  388. package/dist/esm/ic-select-with-multi.entry.js +1 -14
  389. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  390. package/dist/esm/ic-side-navigation.entry.js +2 -2
  391. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  392. package/dist/esm/ic-status-tag.entry.js +1 -1
  393. package/dist/esm/ic-step.entry.js +5 -2
  394. package/dist/esm/ic-step.entry.js.map +1 -1
  395. package/dist/esm/ic-stepper.entry.js +2 -1
  396. package/dist/esm/ic-stepper.entry.js.map +1 -1
  397. package/dist/esm/ic-switch.entry.js +1 -1
  398. package/dist/esm/ic-tab-context.entry.js +18 -2
  399. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  400. package/dist/esm/ic-tab-group.entry.js +1 -1
  401. package/dist/esm/ic-tab-panel.entry.js +1 -1
  402. package/dist/esm/ic-tab.entry.js +1 -1
  403. package/dist/esm/ic-theme.entry.js +3 -10
  404. package/dist/esm/ic-theme.entry.js.map +1 -1
  405. package/dist/esm/ic-toast.entry.js +1 -1
  406. package/dist/esm/ic-toggle-button.entry.js +1 -1
  407. package/dist/esm/ic-top-navigation.entry.js +46 -60
  408. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  409. package/dist/esm/ic-typography.entry.js +12 -36
  410. package/dist/esm/ic-typography.entry.js.map +1 -1
  411. package/dist/esm/index-93509377.js +18 -10
  412. package/dist/esm/loader.js +1 -1
  413. package/dist/esm/polyfills/core-js.js +0 -0
  414. package/dist/esm/polyfills/dom.js +0 -0
  415. package/dist/esm/polyfills/es5-html-element.js +0 -0
  416. package/dist/esm/polyfills/index.js +0 -0
  417. package/dist/esm/polyfills/system.js +0 -0
  418. package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -96
  419. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +0 -11
  420. package/dist/types/components/ic-data-table/story-data.d.ts +0 -99
  421. package/dist/types/components/ic-date-input/ic-date-input.d.ts +251 -0
  422. package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
  423. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
  424. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +231 -0
  425. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
  426. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
  427. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
  428. package/dist/types/components/ic-date-picker/story-data.d.ts +22 -0
  429. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +2 -2
  430. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +2 -2
  431. package/dist/types/components.d.ts +390 -141
  432. package/dist/types/utils/constants.d.ts +37 -0
  433. package/dist/types/utils/date-helpers.d.ts +22 -0
  434. package/dist/types/utils/helpers.d.ts +84 -16
  435. package/dist/types/utils/types.d.ts +92 -1
  436. package/hydrate/index.js +3275 -1148
  437. package/package.json +4 -3
  438. package/dist/cjs/helpers-b525d45a.js.map +0 -1
  439. package/dist/cjs/helpers-c4444a7e.js.map +0 -1
  440. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +0 -57
  441. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +0 -1
  442. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +0 -1
  443. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
  444. package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
  445. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
  446. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js +0 -217
  447. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js.map +0 -1
  448. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +0 -87
  449. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +0 -160
  450. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +0 -1
  451. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +0 -1
  452. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +0 -70
  453. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +0 -1
  454. package/dist/components/ic-data-table-title-bar.js +0 -136
  455. package/dist/components/ic-data-table-title-bar.js.map +0 -1
  456. package/dist/components/ic-empty-state2.js.map +0 -1
  457. package/dist/core/p-10fb4c46.entry.js +0 -2
  458. package/dist/core/p-10fb4c46.entry.js.map +0 -1
  459. package/dist/core/p-169bfa51.entry.js +0 -2
  460. package/dist/core/p-169bfa51.entry.js.map +0 -1
  461. package/dist/core/p-1e91f540.entry.js +0 -2
  462. package/dist/core/p-1e91f540.entry.js.map +0 -1
  463. package/dist/core/p-347e8dab.entry.js +0 -2
  464. package/dist/core/p-347e8dab.entry.js.map +0 -1
  465. package/dist/core/p-3803a5b5.entry.js +0 -2
  466. package/dist/core/p-3803a5b5.entry.js.map +0 -1
  467. package/dist/core/p-4753bac8.entry.js +0 -2
  468. package/dist/core/p-4753bac8.entry.js.map +0 -1
  469. package/dist/core/p-4baa0916.entry.js +0 -2
  470. package/dist/core/p-4baa0916.entry.js.map +0 -1
  471. package/dist/core/p-5171169f.entry.js +0 -2
  472. package/dist/core/p-5171169f.entry.js.map +0 -1
  473. package/dist/core/p-595be57d.entry.js +0 -2
  474. package/dist/core/p-5ee4319c.entry.js +0 -2
  475. package/dist/core/p-5ee4319c.entry.js.map +0 -1
  476. package/dist/core/p-5f4e96ec.entry.js +0 -2
  477. package/dist/core/p-5f4e96ec.entry.js.map +0 -1
  478. package/dist/core/p-624d4f5f.entry.js +0 -2
  479. package/dist/core/p-6933f8e9.entry.js +0 -2
  480. package/dist/core/p-6c3044b6.entry.js +0 -2
  481. package/dist/core/p-6c3044b6.entry.js.map +0 -1
  482. package/dist/core/p-7267fe19.entry.js +0 -2
  483. package/dist/core/p-7267fe19.entry.js.map +0 -1
  484. package/dist/core/p-76915584.entry.js.map +0 -1
  485. package/dist/core/p-88d54b72.entry.js +0 -2
  486. package/dist/core/p-88d54b72.entry.js.map +0 -1
  487. package/dist/core/p-917c5721.entry.js.map +0 -1
  488. package/dist/core/p-942282cd.entry.js +0 -2
  489. package/dist/core/p-942282cd.entry.js.map +0 -1
  490. package/dist/core/p-96b3e7e2.js +0 -2
  491. package/dist/core/p-96b3e7e2.js.map +0 -1
  492. package/dist/core/p-9caf19eb.js +0 -2
  493. package/dist/core/p-9caf19eb.js.map +0 -1
  494. package/dist/core/p-a0f8efb2.entry.js.map +0 -1
  495. package/dist/core/p-aac4185b.entry.js +0 -2
  496. package/dist/core/p-aac4185b.entry.js.map +0 -1
  497. package/dist/core/p-b2aa3d7c.entry.js +0 -2
  498. package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
  499. package/dist/core/p-ba86928c.entry.js +0 -2
  500. package/dist/core/p-ba86928c.entry.js.map +0 -1
  501. package/dist/core/p-d8469ac0.entry.js +0 -2
  502. package/dist/core/p-d8469ac0.entry.js.map +0 -1
  503. package/dist/core/p-db9c03c0.entry.js +0 -2
  504. package/dist/core/p-f6888309.entry.js +0 -2
  505. package/dist/core/p-f6888309.entry.js.map +0 -1
  506. package/dist/core/p-f74a8752.entry.js +0 -2
  507. package/dist/core/p-f74a8752.entry.js.map +0 -1
  508. package/dist/core/p-fc5611e2.entry.js.map +0 -1
  509. package/dist/esm/helpers-12b4266a.js.map +0 -1
  510. package/dist/esm/helpers-1f07eb61.js.map +0 -1
  511. package/dist/esm/ic-data-table-title-bar.entry.js +0 -53
  512. package/dist/esm/ic-data-table-title-bar.entry.js.map +0 -1
  513. package/dist/esm/ic-empty-state_2.entry.js.map +0 -1
  514. package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
  515. package/dist/esm/ic-input-label_2.entry.js +0 -81
  516. package/dist/esm/ic-input-label_2.entry.js.map +0 -1
  517. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +0 -36
  518. /package/dist/core/{p-869954a2.entry.js.map → p-00bd7919.entry.js.map} +0 -0
  519. /package/dist/core/{p-a50c3b9e.entry.js.map → p-1a91e842.entry.js.map} +0 -0
  520. /package/dist/core/{p-f3c840cd.entry.js.map → p-41b682dc.entry.js.map} +0 -0
  521. /package/dist/core/{p-8b08d8fe.entry.js.map → p-6dce8e88.entry.js.map} +0 -0
  522. /package/dist/core/{p-1ca332ca.entry.js.map → p-6eb58b0a.entry.js.map} +0 -0
  523. /package/dist/core/{p-5ae93c16.entry.js.map → p-7fda2f94.entry.js.map} +0 -0
  524. /package/dist/core/{p-c34848da.entry.js.map → p-8b1f9648.entry.js.map} +0 -0
  525. /package/dist/core/{p-a434c3d4.entry.js.map → p-8b820365.entry.js.map} +0 -0
  526. /package/dist/core/{p-2eac7dcc.entry.js.map → p-946625a3.entry.js.map} +0 -0
  527. /package/dist/core/{p-7ef8d616.entry.js.map → p-9528b29e.entry.js.map} +0 -0
  528. /package/dist/core/{p-a43c12cd.entry.js.map → p-9567c117.entry.js.map} +0 -0
  529. /package/dist/core/{p-b82dcc29.entry.js.map → p-957de939.entry.js.map} +0 -0
  530. /package/dist/core/{p-045359e1.entry.js.map → p-99bf38e3.entry.js.map} +0 -0
  531. /package/dist/core/{p-81ddc39d.entry.js.map → p-9d8883d7.entry.js.map} +0 -0
  532. /package/dist/core/{p-e834344e.entry.js.map → p-a1556d97.entry.js.map} +0 -0
  533. /package/dist/core/{p-f843da01.entry.js.map → p-a2dc10d8.entry.js.map} +0 -0
  534. /package/dist/core/{p-ab09986c.entry.js.map → p-a8c15117.entry.js.map} +0 -0
  535. /package/dist/core/{p-f7a14c01.entry.js.map → p-c14a897d.entry.js.map} +0 -0
  536. /package/dist/core/{p-e3997d60.entry.js.map → p-d2d63a61.entry.js.map} +0 -0
  537. /package/dist/core/{p-4f413fc0.entry.js.map → p-db3a35fb.entry.js.map} +0 -0
  538. /package/dist/core/{p-204ace96.entry.js.map → p-e16f73ba.entry.js.map} +0 -0
  539. /package/dist/core/{p-f14454b1.entry.js.map → p-e8151d13.entry.js.map} +0 -0
  540. /package/dist/core/{p-a31031a5.entry.js.map → p-ff3a01f3.entry.js.map} +0 -0
  541. /package/dist/core/{p-75dac3d1.entry.js.map → p-ff6f1e3a.entry.js.map} +0 -0
  542. /package/dist/types/components/{ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts → ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i,H as e,g as o}from"./p-8455d1bb.js";import{j as a}from"./p-ee765ad5.js";import"./p-fd186591.js";const s='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:var(--ic-space-xxs) solid !important;margin-bottom:calc(-1 * var(--ic-space-xxs)) !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-decoration-thickness: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}';const r=class{constructor(i){t(this,i);this.focusBtnFromKeyboard=true;this.lastMarkerTop=0;this.lastWidth=0;this.resizeObserver=null;this.truncatedHeight=0;this.toggleExpanded=()=>{this.expanded=!this.expanded};this.checkMaxLines=t=>{const i=Math.floor(t/24);if(i>this.maxLines){this.el.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`);this.truncatedHeight=this.el.clientHeight;this.truncated=true}};this.checkMarkerPosition=(t,i)=>{if(i-t<this.truncatedHeight){this.truncated=false;this.expanded=false}else{this.truncated=true}};this.getElementTop=t=>t.getClientRects?t.getClientRects()[0].top:0;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeInterval);this.resizeInterval=window.setTimeout(this.resizeObserverCallback,50)}));this.resizeObserver.observe(this.truncWrapperEl)};this.resizeObserverCallback=()=>{if(this.lastWidth===this.el.clientWidth){return}if(this.truncatedHeight===0){this.checkMaxLines(this.el.clientHeight);return}const t=this.getElementTop(this.marker);if(t===this.lastMarkerTop){return}this.checkMarkerPosition(this.getElementTop(this.el),t);this.lastMarkerTop=t;this.lastWidth=this.el.clientWidth};this.truncButtonFocus=()=>{if(this.focusBtnFromKeyboard){this.truncButtonFocussed=true}};this.truncButtonBlur=()=>{this.focusBtnFromKeyboard=true;this.truncButtonFocussed=false};this.truncButtonFocusFromMouse=()=>{this.focusBtnFromKeyboard=false};this.truncated=false;this.truncButtonFocussed=false;this.applyVerticalMargins=false;this.bold=false;this.italic=false;this.maxLines=undefined;this.strikethrough=false;this.underline=false;this.variant="body";this.expanded=false}watchExpandedHandler(){this.el.setAttribute("style",`--truncation-max-lines: ${this.expanded?"initial":this.maxLines}`)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentDidLoad(){var t,i;if((this.variant==="body"||((i=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||i===void 0?void 0:i.tagName)==="IC-TOOLTIP")&&this.maxLines>0){const t=document.createElement("span");t.style.visibility="hidden";this.el.appendChild(t);this.marker=t;this.lastWidth=this.el.clientWidth;this.checkMaxLines(this.el.clientHeight);a(this.runResizeObserver)}}render(){var t,o;const{variant:a,applyVerticalMargins:s,maxLines:r,truncated:n,expanded:c,strikethrough:l,underline:h,italic:p,bold:d}=this;return i(e,{class:{[`ic-typography-${a}`]:true,[`ic-typography-vertical-margins-${a}`]:s,["bold"]:d,["italic"]:p,["strikethrough"]:l,["underline"]:h}},(a==="body"||((o=(t=this.el.getRootNode())===null||t===void 0?void 0:t.host)===null||o===void 0?void 0:o.tagName)==="IC-TOOLTIP")&&r>0?i("div",{class:"trunc-wrapper",ref:t=>this.truncWrapperEl=t},i("slot",null)):i("slot",null),a==="body"&&r>0&&n&&i("button",{class:{"trunc-btn":true,focus:this.truncButtonFocussed},onFocus:this.truncButtonFocus,onBlur:this.truncButtonBlur,onMouseDown:this.truncButtonFocusFromMouse,onClick:this.toggleExpanded,"aria-hidden":"true"},c?"See less":"See more"))}get el(){return o(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};r.style=s;export{r as ic_typography};
2
+ //# sourceMappingURL=p-cca482e2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icTypographyCss","Typography","constructor","hostRef","this","focusBtnFromKeyboard","lastMarkerTop","lastWidth","resizeObserver","truncatedHeight","toggleExpanded","expanded","checkMaxLines","height","numLines","Math","floor","maxLines","el","setAttribute","clientHeight","truncated","checkMarkerPosition","elTop","markerTop","getElementTop","getClientRects","top","runResizeObserver","ResizeObserver","clearTimeout","resizeInterval","window","setTimeout","resizeObserverCallback","observe","truncWrapperEl","clientWidth","marker","truncButtonFocus","truncButtonFocussed","truncButtonBlur","truncButtonFocusFromMouse","applyVerticalMargins","bold","italic","undefined","strikethrough","underline","variant","watchExpandedHandler","disconnectedCallback","disconnect","componentDidLoad","_a","_b","getRootNode","host","tagName","document","createElement","style","visibility","appendChild","checkResizeObserver","render","h","Host","class","ref","focus","onFocus","onBlur","onMouseDown","onClick"],"sources":["../web-components/dist/collection/components/ic-typography/ic-typography.css?tag=ic-typography&encapsulation=shadow","../web-components/dist/collection/components/ic-typography/ic-typography.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n position: relative;\n}\n\n:host(.ic-typography-vertical-margins-h1) {\n margin: 0 0 var(--ic-space-xl);\n}\n\n:host(.ic-typography-vertical-margins-h2) {\n margin: var(--ic-space-xxl) 0 var(--ic-space-lg);\n}\n\n:host(.ic-typography-vertical-margins-h3) {\n margin: var(--ic-space-xl) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-h4) {\n margin: var(--ic-space-lg) 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small) {\n margin: 0 0 var(--ic-space-md);\n}\n\n:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase) {\n margin: 0 0 var(--ic-space-xs);\n}\n\n:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child) {\n margin-top: 0;\n}\n\n:host(.ic-typography-h1) {\n font: var(--ic-font-h1) !important;\n}\n\n:host(.ic-typography-h2) {\n font: var(--ic-font-h2);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-h3) {\n font: var(--ic-font-h3);\n}\n\n:host(.ic-typography-h4) {\n font: var(--ic-font-h4);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-large) {\n font: var(--ic-font-subtitle-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-subtitle-small) {\n font: var(--ic-font-subtitle-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0015);\n}\n\n:host(.ic-typography-body) {\n font: var(--ic-font-body);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-caption) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-caption-uppercase) {\n font: var(--ic-font-caption);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-label) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-label-uppercase) {\n font: var(--ic-font-label);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n text-transform: uppercase;\n}\n\n:host(.ic-typography-code-large) {\n font: var(--ic-font-code-large);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-code-small) {\n font: var(--ic-font-code-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt005);\n}\n\n:host(.ic-typography-code-extra-small) {\n font: var(--ic-font-code-extra-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt025);\n}\n\n:host(.ic-typography-badge) {\n font: var(--ic-font-badge);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-badge-small) {\n font: var(--ic-font-badge-small);\n letter-spacing: var(--ic-font-letter-spacing-0pt0025);\n}\n\n:host(.ic-typography-no-wrap) {\n white-space: nowrap;\n}\n\n:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.trunc-wrapper {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: var(--truncation-max-lines, initial);\n -webkit-line-clamp: var(--truncation-max-lines, initial);\n overflow: hidden;\n}\n\n.trunc-btn {\n border: none;\n background: none;\n padding: 0;\n color: var(--ic-color-primary-text);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n.trunc-btn:hover,\n.trunc-btn.focus {\n outline: none;\n border-bottom: var(--ic-space-xxs) solid !important;\n margin-bottom: calc(-1 * var(--ic-space-xxs)) !important;\n text-decoration: none;\n cursor: pointer;\n}\n\n:host(.strikethrough) {\n text-decoration: line-through;\n}\n\n:host(.underline) {\n text-decoration: underline;\n}\n\n:host(.underline.strikethrough) {\n text-decoration: line-through underline;\n}\n\n:host(.italic) {\n font-style: italic !important;\n}\n\n:host(.bold) {\n font-weight: var(--ic-font-weight-bold);\n}\n\n@supports (text-decoration-thickness: 25%) {\n .trunc-btn:hover,\n .trunc-btn.focus {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { h, Host } from \"@stencil/core\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nexport class Typography {\n constructor() {\n this.focusBtnFromKeyboard = true;\n this.lastMarkerTop = 0;\n this.lastWidth = 0;\n this.resizeObserver = null;\n this.truncatedHeight = 0;\n this.toggleExpanded = () => {\n this.expanded = !this.expanded;\n };\n this.checkMaxLines = (height) => {\n //24 is the height of a single line\n const numLines = Math.floor(height / 24);\n if (numLines > this.maxLines) {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.maxLines}`);\n this.truncatedHeight = this.el.clientHeight;\n this.truncated = true;\n }\n };\n this.checkMarkerPosition = (elTop, markerTop) => {\n if (markerTop - elTop < this.truncatedHeight) {\n this.truncated = false;\n this.expanded = false;\n }\n else {\n this.truncated = true;\n }\n };\n this.getElementTop = (el) => {\n return el.getClientRects ? el.getClientRects()[0].top : 0;\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeInterval);\n this.resizeInterval = window.setTimeout(this.resizeObserverCallback, 50);\n });\n this.resizeObserver.observe(this.truncWrapperEl);\n };\n this.resizeObserverCallback = () => {\n if (this.lastWidth === this.el.clientWidth) {\n return;\n }\n if (this.truncatedHeight === 0) {\n this.checkMaxLines(this.el.clientHeight);\n return;\n }\n const markerTop = this.getElementTop(this.marker);\n if (markerTop === this.lastMarkerTop) {\n return;\n }\n this.checkMarkerPosition(this.getElementTop(this.el), markerTop);\n this.lastMarkerTop = markerTop;\n this.lastWidth = this.el.clientWidth;\n };\n this.truncButtonFocus = () => {\n if (this.focusBtnFromKeyboard) {\n this.truncButtonFocussed = true;\n }\n };\n this.truncButtonBlur = () => {\n this.focusBtnFromKeyboard = true;\n this.truncButtonFocussed = false;\n };\n this.truncButtonFocusFromMouse = () => {\n this.focusBtnFromKeyboard = false;\n };\n this.truncated = false;\n this.truncButtonFocussed = false;\n this.applyVerticalMargins = false;\n this.bold = false;\n this.italic = false;\n this.maxLines = undefined;\n this.strikethrough = false;\n this.underline = false;\n this.variant = \"body\";\n this.expanded = false;\n }\n watchExpandedHandler() {\n this.el.setAttribute(\"style\", `--truncation-max-lines: ${this.expanded ? \"initial\" : this.maxLines}`);\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentDidLoad() {\n var _a, _b;\n if ((this.variant === \"body\" ||\n ((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===\n \"IC-TOOLTIP\") &&\n this.maxLines > 0) {\n const marker = document.createElement(\"span\");\n marker.style.visibility = \"hidden\";\n this.el.appendChild(marker);\n this.marker = marker;\n this.lastWidth = this.el.clientWidth;\n this.checkMaxLines(this.el.clientHeight);\n checkResizeObserver(this.runResizeObserver);\n }\n }\n render() {\n var _a, _b;\n const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, } = this;\n return (h(Host, { class: {\n [`ic-typography-${variant}`]: true,\n [`ic-typography-vertical-margins-${variant}`]: applyVerticalMargins,\n [\"bold\"]: bold,\n [\"italic\"]: italic,\n [\"strikethrough\"]: strikethrough,\n [\"underline\"]: underline,\n } }, (variant === \"body\" ||\n ((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===\n \"IC-TOOLTIP\") &&\n maxLines > 0 ? (h(\"div\", { class: \"trunc-wrapper\", ref: (el) => (this.truncWrapperEl = el) }, h(\"slot\", null))) : (h(\"slot\", null)), variant === \"body\" && maxLines > 0 && truncated && (h(\"button\", { class: { \"trunc-btn\": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded, \"aria-hidden\": \"true\" }, expanded ? \"See less\" : \"See more\"))));\n }\n static get is() { return \"ic-typography\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-typography.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-typography.css\"]\n };\n }\n static get properties() {\n return {\n \"applyVerticalMargins\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, appropriate top and bottom margins will be applied to the typography.\"\n },\n \"attribute\": \"apply-vertical-margins\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"bold\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a bold font weight.\\nNote: This will have no impact on variants that already use an equivalent or higher font weight (h1, h2, and subtitle-large).\"\n },\n \"attribute\": \"bold\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"italic\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have an italic font style.\"\n },\n \"attribute\": \"italic\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"maxLines\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of lines to display before truncating the text, only used for the 'body' variant.\"\n },\n \"attribute\": \"max-lines\",\n \"reflect\": false\n },\n \"strikethrough\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a line through it.\"\n },\n \"attribute\": \"strikethrough\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"underline\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the typography will have a line under it.\"\n },\n \"attribute\": \"underline\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcTypographyVariants\",\n \"resolved\": \"\\\"badge\\\" | \\\"badge-small\\\" | \\\"body\\\" | \\\"caption\\\" | \\\"caption-uppercase\\\" | \\\"code-extra-small\\\" | \\\"code-large\\\" | \\\"code-small\\\" | \\\"h1\\\" | \\\"h2\\\" | \\\"h3\\\" | \\\"h4\\\" | \\\"label\\\" | \\\"label-uppercase\\\" | \\\"subtitle-large\\\" | \\\"subtitle-small\\\"\",\n \"references\": {\n \"IcTypographyVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcTypographyVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ICDS typography style to use.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"body\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"truncated\": {},\n \"truncButtonFocussed\": {},\n \"expanded\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"expanded\",\n \"methodName\": \"watchExpandedHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-typography.js.map\n"],"mappings":"qHAAA,MAAMA,EAAkB,40M,MCEXC,EAAU,MACnB,WAAAC,CAAAC,G,UACIC,KAAKC,qBAAuB,KAC5BD,KAAKE,cAAgB,EACrBF,KAAKG,UAAY,EACjBH,KAAKI,eAAiB,KACtBJ,KAAKK,gBAAkB,EACvBL,KAAKM,eAAiB,KAClBN,KAAKO,UAAYP,KAAKO,QAAQ,EAElCP,KAAKQ,cAAiBC,IAElB,MAAMC,EAAWC,KAAKC,MAAMH,EAAS,IACrC,GAAIC,EAAWV,KAAKa,SAAU,CAC1Bb,KAAKc,GAAGC,aAAa,QAAS,2BAA2Bf,KAAKa,YAC9Db,KAAKK,gBAAkBL,KAAKc,GAAGE,aAC/BhB,KAAKiB,UAAY,I,GAGzBjB,KAAKkB,oBAAsB,CAACC,EAAOC,KAC/B,GAAIA,EAAYD,EAAQnB,KAAKK,gBAAiB,CAC1CL,KAAKiB,UAAY,MACjBjB,KAAKO,SAAW,K,KAEf,CACDP,KAAKiB,UAAY,I,GAGzBjB,KAAKqB,cAAiBP,GACXA,EAAGQ,eAAiBR,EAAGQ,iBAAiB,GAAGC,IAAM,EAE5DvB,KAAKwB,kBAAoB,KACrBxB,KAAKI,eAAiB,IAAIqB,gBAAe,KACrCC,aAAa1B,KAAK2B,gBAClB3B,KAAK2B,eAAiBC,OAAOC,WAAW7B,KAAK8B,uBAAwB,GAAG,IAE5E9B,KAAKI,eAAe2B,QAAQ/B,KAAKgC,eAAe,EAEpDhC,KAAK8B,uBAAyB,KAC1B,GAAI9B,KAAKG,YAAcH,KAAKc,GAAGmB,YAAa,CACxC,M,CAEJ,GAAIjC,KAAKK,kBAAoB,EAAG,CAC5BL,KAAKQ,cAAcR,KAAKc,GAAGE,cAC3B,M,CAEJ,MAAMI,EAAYpB,KAAKqB,cAAcrB,KAAKkC,QAC1C,GAAId,IAAcpB,KAAKE,cAAe,CAClC,M,CAEJF,KAAKkB,oBAAoBlB,KAAKqB,cAAcrB,KAAKc,IAAKM,GACtDpB,KAAKE,cAAgBkB,EACrBpB,KAAKG,UAAYH,KAAKc,GAAGmB,WAAW,EAExCjC,KAAKmC,iBAAmB,KACpB,GAAInC,KAAKC,qBAAsB,CAC3BD,KAAKoC,oBAAsB,I,GAGnCpC,KAAKqC,gBAAkB,KACnBrC,KAAKC,qBAAuB,KAC5BD,KAAKoC,oBAAsB,KAAK,EAEpCpC,KAAKsC,0BAA4B,KAC7BtC,KAAKC,qBAAuB,KAAK,EAErCD,KAAKiB,UAAY,MACjBjB,KAAKoC,oBAAsB,MAC3BpC,KAAKuC,qBAAuB,MAC5BvC,KAAKwC,KAAO,MACZxC,KAAKyC,OAAS,MACdzC,KAAKa,SAAW6B,UAChB1C,KAAK2C,cAAgB,MACrB3C,KAAK4C,UAAY,MACjB5C,KAAK6C,QAAU,OACf7C,KAAKO,SAAW,K,CAEpB,oBAAAuC,GACI9C,KAAKc,GAAGC,aAAa,QAAS,2BAA2Bf,KAAKO,SAAW,UAAYP,KAAKa,W,CAE9F,oBAAAkC,GACI,GAAI/C,KAAKI,iBAAmB,KAAM,CAC9BJ,KAAKI,eAAe4C,Y,EAG5B,gBAAAC,GACI,IAAIC,EAAIC,EACR,IAAKnD,KAAK6C,UAAY,UAChBM,GAAMD,EAAKlD,KAAKc,GAAGsC,iBAAmB,MAAQF,SAAY,OAAS,EAAIA,EAAGG,QAAU,MAAQF,SAAY,OAAS,EAAIA,EAAGG,WACtH,eACJtD,KAAKa,SAAW,EAAG,CACnB,MAAMqB,EAASqB,SAASC,cAAc,QACtCtB,EAAOuB,MAAMC,WAAa,SAC1B1D,KAAKc,GAAG6C,YAAYzB,GACpBlC,KAAKkC,OAASA,EACdlC,KAAKG,UAAYH,KAAKc,GAAGmB,YACzBjC,KAAKQ,cAAcR,KAAKc,GAAGE,cAC3B4C,EAAoB5D,KAAKwB,kB,EAGjC,MAAAqC,GACI,IAAIX,EAAIC,EACR,MAAMN,QAAEA,EAAON,qBAAEA,EAAoB1B,SAAEA,EAAQI,UAAEA,EAASV,SAAEA,EAAQoC,cAAEA,EAAaC,UAAEA,EAASH,OAAEA,EAAMD,KAAEA,GAAUxC,KAClH,OAAQ8D,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,iBAAiBnB,KAAY,KAC9B,CAAC,kCAAkCA,KAAYN,EAC/C,CAAC,QAASC,EACV,CAAC,UAAWC,EACZ,CAAC,iBAAkBE,EACnB,CAAC,aAAcC,KACbC,IAAY,UAChBM,GAAMD,EAAKlD,KAAKc,GAAGsC,iBAAmB,MAAQF,SAAY,OAAS,EAAIA,EAAGG,QAAU,MAAQF,SAAY,OAAS,EAAIA,EAAGG,WACtH,eACJzC,EAAW,EAAKiD,EAAE,MAAO,CAAEE,MAAO,gBAAiBC,IAAMnD,GAAQd,KAAKgC,eAAiBlB,GAAOgD,EAAE,OAAQ,OAAWA,EAAE,OAAQ,MAAQjB,IAAY,QAAUhC,EAAW,GAAKI,GAAc6C,EAAE,SAAU,CAAEE,MAAO,CAAE,YAAa,KAAME,MAAOlE,KAAKoC,qBAAuB+B,QAASnE,KAAKmC,iBAAkBiC,OAAQpE,KAAKqC,gBAAiBgC,YAAarE,KAAKsC,0BAA2BgC,QAAStE,KAAKM,eAAgB,cAAe,QAAUC,EAAW,WAAa,Y"}
@@ -0,0 +1,2 @@
1
+ var n;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(n||(n={}));var e;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(e||(e={}));var t;(function(n){n[n["January"]=0]="January";n[n["February"]=1]="February";n[n["March"]=2]="March";n[n["April"]=3]="April";n[n["May"]=4]="May";n[n["June"]=5]="June";n[n["July"]=6]="July";n[n["August"]=7]="August";n[n["September"]=8]="September";n[n["October"]=9]="October";n[n["November"]=10]="November";n[n["December"]=11]="December"})(t||(t={}));var o;(function(n){n[n["Sun"]=0]="Sun";n[n["Mon"]=1]="Mon";n[n["Tue"]=2]="Tue";n[n["Wed"]=3]="Wed";n[n["Thu"]=4]="Thu";n[n["Fri"]=5]="Fri";n[n["Sat"]=6]="Sat"})(o||(o={}));var s;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(s||(s={}));var a;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(a||(a={}));const i=n=>{const e=[];Object.values(n).forEach((n=>{if(isNaN(Number(n))){const t=n;e.push(t)}}));return e};const r=(n,e=[])=>{const t={};e.forEach((e=>{if(n.hasAttribute(e)){const o=n.getAttribute(e);if(o!==null){t[e]=n.getAttribute(e)}n.removeAttribute(e)}}));return t};const c=(n,e,t,o,s)=>{if(t!==undefined&&(n||l(e))){const n=e.querySelectorAll("input.ic-input");const a=Array.from(n);const i=a.filter((n=>e===n.parentElement));let r=i[0];if(r===null||r===undefined){r=e.ownerDocument.createElement("input");r.type="hidden";r.classList.add("ic-input");e.appendChild(r)}r.disabled=s;r.name=t;if(o instanceof Date){r.value=o?o.toISOString():null}else{r.value=o||""}}};const u=n=>n?n.trim().length===0:true;const d=n=>getComputedStyle(document.documentElement).getPropertyValue(n);({XS:Number(d("--ic-breakpoint-xs").replace("px","")),S:Number(d("--ic-breakpoint-sm").replace("px","")),M:Number(d("--ic-breakpoint-md").replace("px","")),L:Number(d("--ic-breakpoint-lg").replace("px","")),XL:Number(d("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200});const l=n=>!!n.shadowRoot&&!!n.attachShadow;const f=n=>n+"-helper-text";const p=n=>n+"-validation-text";const y=(n,e,t)=>`${e?f(n):""} ${t?p(n):""}`.trim();const b=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:false;const v=(n,e,t="value",o="label")=>{const s=[];if(e.length>0&&e.map){e.map((n=>{if(n.children){n.children.map((n=>s.push(n)))}else{s.push(n)}}));const a=s.find((e=>e[t]===n));if(a!==undefined)return a[o]}return undefined};const m=(n,e,t,o,s="label")=>n.filter((n=>{var a;const i=n[s].toLowerCase();const r=(a=n.description)===null||a===void 0?void 0:a.toLowerCase();const c=t.toLowerCase();return o==="anywhere"?e?i.includes(c)||(r===null||r===void 0?void 0:r.includes(c)):i.includes(c):e?i.startsWith(c)||(r===null||r===void 0?void 0:r.startsWith(c)):i.startsWith(c)}));const N=n=>{const e=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>e.push(n)))}else{e.push(n)}}))}return e.length};const x=n=>/^-?\d+$/.test(n);const h=(n,e)=>n!==""&&!e;const S=(n,e)=>{for(let t=0;t<n.length;t++){const{prop:o,propName:s}=n[t];if(o===null||o===undefined){console.error(`No ${s} specified for ${e} component - prop '${s}' (web components) / '${w(s)}' (react) required`)}}};const w=n=>{n=n.toLowerCase();const e=n.split("-");let t=e[0];for(let n=1;n<e.length;n++){t+=e[n].substring(0,1).toUpperCase()+e[n].substring(1)}return t};const g=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const M=n=>n.closest("FORM");const k=(n,e)=>{const t=M(n);if(t!==null){t.addEventListener("reset",e)}};const T=(n,e)=>{const t=M(n);if(t!==null){t.removeEventListener("reset",e)}};const $=(n,e)=>{if(!n){e.removeAttribute("disabled")}};const F=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;export{s as I,t as a,a as b,o as c,m as d,N as e,$ as f,v as g,k as h,r as i,c as j,y as k,b as l,e as m,h as n,S as o,n as p,u as q,T as r,i as s,x as t,F as u,g as v};
2
+ //# sourceMappingURL=p-cd799087.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IcInformationStatus","IcThemeForegroundEnum","IcDateInputMonths","IcShortDayNames","IcDayNames","IcWeekDays","stringEnumToArray","theEnum","arr","Object","values","forEach","val","isNaN","Number","str","push","inheritAttributes","element","attributes","attributeObject","attr","hasAttribute","value","getAttribute","removeAttribute","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","isEmptyString","trim","length","getCssProperty","cssVar","getComputedStyle","document","documentElement","getPropertyValue","XS","replace","S","M","L","XL","UNDEFINED","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","isMobileOrTablet","navigator","maxTouchPoints","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","toLowerCase","description","_a","lowerSearchString","includes","startsWith","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","isNumeric","test","hasValidationStatus","status","onComponentRequiredPropUndefined","props","component","i","prop","propName","console","error","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","window","ResizeObserver","getForm","closest","addFormResetListener","form","addEventListener","removeFormResetListener","removeEventListener","removeDisabledFalse","isMacDevice","userAgent","indexOf"],"sources":["src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["export type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcSizes = \"default\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"default\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcThemeForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n\nexport type IcThemeForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcThemeForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcTheme = {\n mode: IcThemeForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcThemeForeground does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"@ukic/web-components\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\nimport { EventEmitter } from \"@stencil/core\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | Date | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground =>\n getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean =>\n element.scrollWidth > element.clientWidth;\n\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const isNumeric = (value: string) => {\n return /^-?\\d+$/.test(value);\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as o,H as i,g as r}from"./p-8455d1bb.js";import{e as n,I as a,u as s,f as l,i as c,v as d}from"./p-9caf19eb.js";import{I as p}from"./p-fd186591.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--footer-compliance-padding:1rem 0}:host(.footer-sparse){--footer-links-padding:1.5rem 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:1rem 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const f=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserver=null;this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.deviceSize=a.XL;this.foregroundColor=s();this.aligned="left";this.breakpoint="medium";this.caption=undefined;this.copyright=true;this.description=undefined;this.groupLinks=false}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const m=this.isSmall();return o(i,{class:{footer:true,[`footer-${m?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[p.Dark]:l===p.Dark,[p.Light]:l===p.Light}},o("footer",{ref:e=>this.footerEl=e},n&&o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),c(this.el,"link")&&o("div",{class:"footer-links"},s&&m?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},c(this.el,"logo")&&o("div",{class:"footer-logo"},o("slot",{name:"logo"})),(c(this.el,"caption")||t)&&o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:d()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};f.style=m;export{f as ic_footer};
2
- //# sourceMappingURL=p-e3997d60.entry.js.map
1
+ import{r as e,c as t,h as o,H as i,g as r}from"./p-8455d1bb.js";import{f as n,I as a,u as s,j as l,i as c,v as d}from"./p-ee765ad5.js";import{I as p}from"./p-fd186591.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--footer-compliance-padding:1rem 0}:host(.footer-sparse){--footer-links-padding:1.5rem 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:1rem 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const f=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserver=null;this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.deviceSize=a.XL;this.foregroundColor=s();this.aligned="left";this.breakpoint="medium";this.caption=undefined;this.copyright=true;this.description=undefined;this.groupLinks=false}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const m=this.isSmall();return o(i,{class:{footer:true,[`footer-${m?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[p.Dark]:l===p.Dark,[p.Light]:l===p.Light}},o("footer",{ref:e=>this.footerEl=e},n&&o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),c(this.el,"link")&&o("div",{class:"footer-links"},s&&m?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},c(this.el,"logo")&&o("div",{class:"footer-logo"},o("slot",{name:"logo"})),(c(this.el,"caption")||t)&&o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:d()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};f.style=m;export{f as ic_footer};
2
+ //# sourceMappingURL=p-d2d63a61.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as o,c as t,h as r,H as i}from"./p-8455d1bb.js";import{H as s,J as e,W as c,c as h,u as a}from"./p-ee765ad5.js";import"./p-fd186591.js";const n=class{constructor(r){o(this,r);this.themeChange=t(this,"themeChange",7);this.checkThemeColorContrast=()=>{if(s()<e&&s()>c){console.warn(`The theme colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setThemeColor=()=>{if(this.color!==null&&h(this.color)!==null){const o=h(this.color);this.setThemeRGBA(o)}};this.setThemeRGBA=o=>{if(o!==null){const t=document.documentElement;t.style.setProperty("--ic-theme-primary-r",o.r.toString());t.style.setProperty("--ic-theme-primary-g",o.g.toString());t.style.setProperty("--ic-theme-primary-b",o.b.toString());t.style.setProperty("--ic-theme-primary-a",o.a.toString());this.checkThemeColorContrast();const r=a();this.themeChange.emit({mode:r,color:o})}};this.color=null}watchColorPropHandler(){this.setThemeColor()}componentWillLoad(){this.setThemeColor()}render(){return r(i,null)}static get watchers(){return{color:["watchColorPropHandler"]}}};export{n as ic_theme};
2
+ //# sourceMappingURL=p-d32d331b.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Theme","constructor","hostRef","this","checkThemeColorContrast","getThemeColorBrightness","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","console","warn","setThemeColor","color","convertToRGBA","colorRGBA","setThemeRGBA","root","document","documentElement","style","setProperty","r","toString","g","b","a","foregroundColor","getThemeForegroundColor","themeChange","emit","mode","watchColorPropHandler","componentWillLoad","render","h","Host"],"sources":["../web-components/dist/collection/components/ic-theme/ic-theme.js"],"sourcesContent":["import { Host, h, } from \"@stencil/core\";\nimport { convertToRGBA, getThemeForegroundColor } from \"../../utils/helpers\";\nimport { getThemeColorBrightness } from \"../../utils/helpers\";\nimport { BLACK_MIN_COLOR_BRIGHTNESS, WHITE_MAX_COLOR_BRIGHTNESS, } from \"../../utils/constants\";\nexport class Theme {\n constructor() {\n this.checkThemeColorContrast = () => {\n if (getThemeColorBrightness() < BLACK_MIN_COLOR_BRIGHTNESS &&\n getThemeColorBrightness() > WHITE_MAX_COLOR_BRIGHTNESS) {\n console.warn(`The theme colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`);\n }\n };\n this.setThemeColor = () => {\n if (this.color !== null && convertToRGBA(this.color) !== null) {\n const colorRGBA = convertToRGBA(this.color);\n this.setThemeRGBA(colorRGBA);\n }\n };\n this.setThemeRGBA = (colorRGBA) => {\n if (colorRGBA !== null) {\n const root = document.documentElement;\n root.style.setProperty(\"--ic-theme-primary-r\", colorRGBA.r.toString());\n root.style.setProperty(\"--ic-theme-primary-g\", colorRGBA.g.toString());\n root.style.setProperty(\"--ic-theme-primary-b\", colorRGBA.b.toString());\n root.style.setProperty(\"--ic-theme-primary-a\", colorRGBA.a.toString());\n this.checkThemeColorContrast();\n const foregroundColor = getThemeForegroundColor();\n this.themeChange.emit({ mode: foregroundColor, color: colorRGBA });\n }\n };\n this.color = null;\n }\n watchColorPropHandler() {\n this.setThemeColor();\n }\n componentWillLoad() {\n this.setThemeColor();\n }\n render() {\n return h(Host, null);\n }\n static get is() { return \"ic-theme\"; }\n static get encapsulation() { return \"shadow\"; }\n static get properties() {\n return {\n \"color\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The theme colour. Can be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"themeChange\",\n \"name\": \"themeChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the theme is changed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTheme\",\n \"resolved\": \"{ mode: IcThemeForeground; color: IcColorRGB; }\",\n \"references\": {\n \"IcTheme\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcTheme\"\n }\n }\n }\n }];\n }\n static get watchers() {\n return [{\n \"propName\": \"color\",\n \"methodName\": \"watchColorPropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-theme.js.map\n"],"mappings":"uJAIaA,EAAK,MACd,WAAAC,CAAAC,G,mDACIC,KAAKC,wBAA0B,KAC3B,GAAIC,IAA4BC,GAC5BD,IAA4BE,EAA4B,CACxDC,QAAQC,KAAK,4T,GAGrBN,KAAKO,cAAgB,KACjB,GAAIP,KAAKQ,QAAU,MAAQC,EAAcT,KAAKQ,SAAW,KAAM,CAC3D,MAAME,EAAYD,EAAcT,KAAKQ,OACrCR,KAAKW,aAAaD,E,GAG1BV,KAAKW,aAAgBD,IACjB,GAAIA,IAAc,KAAM,CACpB,MAAME,EAAOC,SAASC,gBACtBF,EAAKG,MAAMC,YAAY,uBAAwBN,EAAUO,EAAEC,YAC3DN,EAAKG,MAAMC,YAAY,uBAAwBN,EAAUS,EAAED,YAC3DN,EAAKG,MAAMC,YAAY,uBAAwBN,EAAUU,EAAEF,YAC3DN,EAAKG,MAAMC,YAAY,uBAAwBN,EAAUW,EAAEH,YAC3DlB,KAAKC,0BACL,MAAMqB,EAAkBC,IACxBvB,KAAKwB,YAAYC,KAAK,CAAEC,KAAMJ,EAAiBd,MAAOE,G,GAG9DV,KAAKQ,MAAQ,I,CAEjB,qBAAAmB,GACI3B,KAAKO,e,CAET,iBAAAqB,GACI5B,KAAKO,e,CAET,MAAAsB,GACI,OAAOC,EAAEC,EAAM,K"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as e,g as s}from"./p-8455d1bb.js";import{N as o,z as r,f as a}from"./p-9caf19eb.js";import{I as n}from"./p-fd186591.js";const l=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M13.0875 6.175L11.9125 5L6.91251 10L11.9125 15L13.0875 13.825L9.27084 10L13.0875 6.175Z"/>\n</svg>`;const c=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M8.08748 5L6.91248 6.175L10.7291 10L6.91248 13.825L8.08748 15L13.0875 10L8.08748 5Z"/>\n</svg>`;const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.light){--splitter-color:var(--ic-keyline-lighten-rgb)}:host(.dark){--splitter-color:var(--ic-keyline-darken-rgb)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}.disabled ic-button>svg{color:var(--ic-keyline-darken-rgb)}:host(.dark) .disabled ic-button>svg,:host(.light) .disabled ic-button>svg{color:var(--splitter-color) !important}';const d=200;const p=class{constructor(i){t(this,i);this.buttonStateSet=false;this.focusHandler=t=>{this.itemFocusHandler(Array.from(this.items).indexOf(t.target))};this.resizeObserverCallback=()=>{if(this.el.clientWidth>=this.itemsContainerEl.scrollWidth){this.itemOverflow=false}else{this.itemOverflow=o(this.itemsContainerEl)}if(this.itemOverflow){this.lastItemVisible=this.itemsContainerEl.offsetWidth+this.itemsContainerEl.scrollLeft>=this.itemsContainerEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.itemsContainerEl)};this.scrollLeft=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()-1)};this.scrollRight=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.leftArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.rightArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftItem=()=>{const t=this.itemOffsets.findIndex((t=>t>Math.round(this.itemsContainerEl.scrollLeft)));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{const t=Math.round(this.itemsContainerEl.scrollLeft);if(this.buttonStateSet===false){this.firstItemVisible=t===0;this.lastItemVisible=this.itemsContainerEl.offsetWidth+t>=this.itemsContainerEl.scrollWidth}this.buttonStateSet=false};this.firstItemVisible=true;this.itemOverflow=false;this.lastItemVisible=false;this.appearance="default";this.focusTrigger="focus"}componentWillLoad(){this.itemsContainerEl=this.el.children[0];this.itemsContainerEl.addEventListener("scroll",this.scrollHandler);this.items=r(this.itemsContainerEl)||Array.from(this.itemsContainerEl.children);this.items.forEach((t=>{if(t.addEventListener){t.addEventListener(this.focusTrigger,this.focusHandler)}}))}componentDidLoad(){let t=0;this.itemOffsets=this.items.map((i=>{t+=i.offsetWidth;return t}));a(this.runResizeObserver);const i=Array.from(this.el.shadowRoot.querySelectorAll("div"));["mouseup","mouseleave"].forEach((t=>{i.forEach((i=>i.addEventListener(t,this.arrowMouseUpHandler)))}))}disconnectedCallback(){if(this.resizeObserver!==undefined){this.resizeObserver.disconnect()}const t=Array.from(this.el.shadowRoot.querySelectorAll("div"));["mouseup","mouseleave"].forEach((i=>{t.forEach((t=>t.removeEventListener(i,this.arrowMouseUpHandler)))}));this.items.forEach((t=>{if(t.removeEventListener){t.removeEventListener(this.focusTrigger,this.focusHandler)}}));this.itemsContainerEl.removeEventListener("scroll",this.scrollHandler)}async scrollItemIntoView(t){this.firstItemVisible=t<=0;const i=t<=0?0:this.itemOffsets[t-1];this.lastItemVisible=this.itemsContainerEl.offsetWidth+i>=this.itemsContainerEl.scrollWidth;this.buttonStateSet=true;this.itemsContainerEl.scrollLeft=i}itemFocusHandler(t){if(this.itemOverflow){this.scrollItemIntoView(t)}}render(){const{appearance:t,firstItemVisible:s,lastItemVisible:o,itemOverflow:r}=this;return i(e,{class:{["visible"]:r,["dark"]:this.appearance===n.Dark,["light"]:this.appearance===n.Light}},i("div",{"aria-hidden":"true",class:{["scroll-container-left"]:true,["hidden"]:!r,["disabled"]:s},role:"tab"},i("ic-button",{class:"scroll-arrow",variant:"icon","aria-label":"Scroll left",appearance:t,innerHTML:l,disabled:s,tabindex:"-1",onClick:this.scrollLeft,onMouseDown:this.leftArrowMouseDownHandler}),i("span",{class:"scroll-splitter-left"})),i("slot",null),i("div",{"aria-hidden":"true",class:{["scroll-container-right"]:true,["hidden"]:!r,["disabled"]:o},role:"tab"},i("span",{class:"scroll-splitter-right"}),i("ic-button",{class:"scroll-arrow",variant:"icon","aria-label":"Scroll right",appearance:t,innerHTML:c,disabled:o,tabindex:"-1",onClick:this.scrollRight,onMouseDown:this.rightArrowMouseDownHandler})))}get el(){return s(this)}};p.style=h;export{p as ic_horizontal_scroll};
2
- //# sourceMappingURL=p-4f413fc0.entry.js.map
1
+ import{r as t,h as i,H as e,g as s}from"./p-8455d1bb.js";import{N as o,z as r,j as a}from"./p-ee765ad5.js";import{I as n}from"./p-fd186591.js";const l=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M13.0875 6.175L11.9125 5L6.91251 10L11.9125 15L13.0875 13.825L9.27084 10L13.0875 6.175Z"/>\n</svg>`;const c=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M8.08748 5L6.91248 6.175L10.7291 10L6.91248 13.825L8.08748 15L13.0875 10L8.08748 5Z"/>\n</svg>`;const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.light){--splitter-color:var(--ic-keyline-lighten-rgb)}:host(.dark){--splitter-color:var(--ic-keyline-darken-rgb)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}.disabled ic-button>svg{color:var(--ic-keyline-darken-rgb)}:host(.dark) .disabled ic-button>svg,:host(.light) .disabled ic-button>svg{color:var(--splitter-color) !important}';const d=200;const p=class{constructor(i){t(this,i);this.buttonStateSet=false;this.focusHandler=t=>{this.itemFocusHandler(Array.from(this.items).indexOf(t.target))};this.resizeObserverCallback=()=>{if(this.el.clientWidth>=this.itemsContainerEl.scrollWidth){this.itemOverflow=false}else{this.itemOverflow=o(this.itemsContainerEl)}if(this.itemOverflow){this.lastItemVisible=this.itemsContainerEl.offsetWidth+this.itemsContainerEl.scrollLeft>=this.itemsContainerEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.itemsContainerEl)};this.scrollLeft=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()-1)};this.scrollRight=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.leftArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollLeft,d)};this.rightArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollRight,d)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftItem=()=>{const t=this.itemOffsets.findIndex((t=>t>Math.round(this.itemsContainerEl.scrollLeft)));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{const t=Math.round(this.itemsContainerEl.scrollLeft);if(this.buttonStateSet===false){this.firstItemVisible=t===0;this.lastItemVisible=this.itemsContainerEl.offsetWidth+t>=this.itemsContainerEl.scrollWidth}this.buttonStateSet=false};this.firstItemVisible=true;this.itemOverflow=false;this.lastItemVisible=false;this.appearance="default";this.focusTrigger="focus"}componentWillLoad(){this.itemsContainerEl=this.el.children[0];this.itemsContainerEl.addEventListener("scroll",this.scrollHandler);this.items=r(this.itemsContainerEl)||Array.from(this.itemsContainerEl.children);this.items.forEach((t=>{if(t.addEventListener){t.addEventListener(this.focusTrigger,this.focusHandler)}}))}componentDidLoad(){let t=0;this.itemOffsets=this.items.map((i=>{t+=i.offsetWidth;return t}));a(this.runResizeObserver);const i=Array.from(this.el.shadowRoot.querySelectorAll("div"));["mouseup","mouseleave"].forEach((t=>{i.forEach((i=>i.addEventListener(t,this.arrowMouseUpHandler)))}))}disconnectedCallback(){if(this.resizeObserver!==undefined){this.resizeObserver.disconnect()}const t=Array.from(this.el.shadowRoot.querySelectorAll("div"));["mouseup","mouseleave"].forEach((i=>{t.forEach((t=>t.removeEventListener(i,this.arrowMouseUpHandler)))}));this.items.forEach((t=>{if(t.removeEventListener){t.removeEventListener(this.focusTrigger,this.focusHandler)}}));this.itemsContainerEl.removeEventListener("scroll",this.scrollHandler)}async scrollItemIntoView(t){this.firstItemVisible=t<=0;const i=t<=0?0:this.itemOffsets[t-1];this.lastItemVisible=this.itemsContainerEl.offsetWidth+i>=this.itemsContainerEl.scrollWidth;this.buttonStateSet=true;this.itemsContainerEl.scrollLeft=i}itemFocusHandler(t){if(this.itemOverflow){this.scrollItemIntoView(t)}}render(){const{appearance:t,firstItemVisible:s,lastItemVisible:o,itemOverflow:r}=this;return i(e,{class:{["visible"]:r,["dark"]:this.appearance===n.Dark,["light"]:this.appearance===n.Light}},i("div",{"aria-hidden":"true",class:{["scroll-container-left"]:true,["hidden"]:!r,["disabled"]:s},role:"tab"},i("ic-button",{class:"scroll-arrow",variant:"icon","aria-label":"Scroll left",appearance:t,innerHTML:l,disabled:s,tabindex:"-1",onClick:this.scrollLeft,onMouseDown:this.leftArrowMouseDownHandler}),i("span",{class:"scroll-splitter-left"})),i("slot",null),i("div",{"aria-hidden":"true",class:{["scroll-container-right"]:true,["hidden"]:!r,["disabled"]:o},role:"tab"},i("span",{class:"scroll-splitter-right"}),i("ic-button",{class:"scroll-arrow",variant:"icon","aria-label":"Scroll right",appearance:t,innerHTML:c,disabled:o,tabindex:"-1",onClick:this.scrollRight,onMouseDown:this.rightArrowMouseDownHandler})))}get el(){return s(this)}};p.style=h;export{p as ic_horizontal_scroll};
2
+ //# sourceMappingURL=p-db3a35fb.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as i,c as e,h as t,H as c,g as s}from"./p-8455d1bb.js";import{m as a,l as o,r,a as n,n as l,q as h}from"./p-ee765ad5.js";import"./p-fd186591.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-small{margin-bottom:0.625rem}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border:var(--ic-border-width) solid var(--ic-architectural-700);box-sizing:border-box;transition:var(--ic-transition-duration-fast)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-checked-status{padding-left:var(--ic-space-xxs);width:var(--ic-space-lg)}.ic-switch-toggle::before{content:"";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-architectural-700);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-architectural-700)}.ic-switch-icon-line{stroke:var(--ic-architectural-white)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-action-default);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-architectural-white)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-active)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-active)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-architectural-300)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-action-default-bg-active)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-architectural-80);border:var(--ic-border-disabled)}.ic-switch-input:disabled~.ic-switch-checked-status{color:var(--ic-architectural-300)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-architectural-300)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-status-info-light);border:var(--ic-border-width) dashed #98c9f5}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-architectural-white)}.ic-switch-small{gap:var(--ic-space-xxxs)}.ic-switch-small .ic-switch-checked-status{padding-left:0.375rem}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted(*){margin-left:var(--ic-space-sm)}::slotted(svg){fill:currentcolor}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-hc-border)}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-input:disabled~.ic-switch-checked-status{color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}';let b=0;const u=class{constructor(t){i(this,t);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icFocus=e(this,"icFocus",7);this.inputId=`ic-switch-input-${b++}`;this.handleChange=()=>{this.checkedState=!this.checkedState;this.icChange.emit({checked:this.checkedState,value:this.value})};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.handleFormReset=()=>{this.checkedState=this.initiallyChecked};this.checkedState=false;this.initiallyChecked=this.checked;this.checked=false;this.disabled=false;this.helperText="";this.hideLabel=false;this.label=undefined;this.name=this.inputId;this.showState=false;this.size="default";this.small=false;this.value="on"}checkedChangeHandler(){this.checkedState=this.checked}disconnectedCallback(){a(this.el,this.handleFormReset)}componentWillLoad(){this.checkedState=this.checked;o(this.el,this.handleFormReset);r(this.disabled,this.el)}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Switch")}async setFocus(){if(this.el.shadowRoot.querySelector("input")){this.el.shadowRoot.querySelector("input").focus()}}render(){const{label:i,checkedState:e,small:s,size:a,disabled:o,name:r,showState:n,value:d,hideLabel:b,helperText:u,inputId:p}=this;l(true,this.el,r,e?d:"",o);const g=h(p,u!=="",false);return t(c,null,t("label",{class:{["ic-switch-container"]:true,["ic-switch-disabled"]:o,["ic-switch-small"]:s||a==="small"},htmlFor:p},!b&&t("ic-input-label",{for:p,label:i,helperText:u,readonly:true,disabled:o,class:{["ic-switch-label"]:true,["ic-switch-label-small"]:s||a==="small"}}),!b&&t("span",{class:"ic-switch-line-break"}),t("input",{checked:e,disabled:o,"aria-label":i,"aria-checked":e?"true":"false","aria-describedby":g,role:"switch",class:"ic-switch-input",type:"checkbox",name:"toggle",id:p,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.handleChange}),t("span",{class:"ic-switch-toggle"},t("svg",{class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("line",{class:"ic-switch-icon-line",x1:"9",y1:s||a==="small"?"2":"1",x2:"9",y2:s||a==="small"?"8":"9"})),t("svg",{class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("circle",{class:"ic-switch-icon-circle",fill:"none",cx:"5",cy:"5",r:s||a==="small"?"3.335":"4.445"}))),t("slot",{name:"right-adornment"}),n&&t("ic-typography",{"aria-hidden":"true",variant:"label",class:"ic-switch-checked-status"},e?"On":"Off")))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{checked:["checkedChangeHandler"]}}};u.style=d;export{u as ic_switch};
2
+ //# sourceMappingURL=p-dc5e1f8f.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["icSwitchCss","inputIds","Switch","constructor","hostRef","this","inputId","handleChange","checkedState","icChange","emit","checked","value","onFocus","icFocus","onBlur","icBlur","handleFormReset","initiallyChecked","disabled","helperText","hideLabel","label","undefined","name","showState","size","small","checkedChangeHandler","disconnectedCallback","removeFormResetListener","el","componentWillLoad","addFormResetListener","removeDisabledFalse","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","setFocus","shadowRoot","querySelector","focus","render","renderHiddenInput","describedBy","getInputDescribedByText","h","Host","class","htmlFor","for","readonly","role","type","id","onChange","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","cy","r","variant","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","../web-components/dist/collection/components/ic-switch/ic-switch.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: var(--ic-border-width) solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n width: var(--ic-space-lg);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: var(--ic-border-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-light);\n border: var(--ic-border-width) dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getInputDescribedByText, onComponentRequiredPropUndefined, renderHiddenInput, addFormResetListener, removeFormResetListener, removeDisabledFalse, } from \"../../utils/helpers\";\nlet inputIds = 0;\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\nexport class Switch {\n constructor() {\n this.inputId = `ic-switch-input-${inputIds++}`;\n this.handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n this.onFocus = () => {\n this.icFocus.emit();\n };\n this.onBlur = () => {\n this.icBlur.emit();\n };\n this.handleFormReset = () => {\n this.checkedState = this.initiallyChecked;\n };\n this.checkedState = false;\n this.initiallyChecked = this.checked;\n this.checked = false;\n this.disabled = false;\n this.helperText = \"\";\n this.hideLabel = false;\n this.label = undefined;\n this.name = this.inputId;\n this.showState = false;\n this.size = \"default\";\n this.small = false;\n this.value = \"on\";\n }\n checkedChangeHandler() {\n this.checkedState = this.checked;\n }\n disconnectedCallback() {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n componentWillLoad() {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Switch\");\n }\n /**\n * Sets focus on the switch.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n render() {\n const { label, checkedState, small, size, disabled, name, showState, value, hideLabel, helperText, inputId, } = this;\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n const describedBy = getInputDescribedByText(inputId, helperText !== \"\", false);\n return (h(Host, null, h(\"label\", { class: {\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small || size === \"small\",\n }, htmlFor: inputId }, !hideLabel && (h(\"ic-input-label\", { for: inputId, label: label, helperText: helperText, readonly: true, disabled: disabled, class: {\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small || size === \"small\",\n } })), !hideLabel && h(\"span\", { class: \"ic-switch-line-break\" }), h(\"input\", { checked: checkedState, disabled: disabled, \"aria-label\": label, \"aria-checked\": checkedState ? \"true\" : \"false\", \"aria-describedby\": describedBy, role: \"switch\", class: \"ic-switch-input\", type: \"checkbox\", name: \"toggle\", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), h(\"span\", { class: \"ic-switch-toggle\" }, h(\"svg\", { class: \"ic-switch-icon\", \"aria-hidden\": \"true\", focusable: \"false\", viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"line\", { class: \"ic-switch-icon-line\", x1: \"9\", y1: small || size === \"small\" ? \"2\" : \"1\", x2: \"9\", y2: small || size === \"small\" ? \"8\" : \"9\" })), h(\"svg\", { class: \"ic-switch-icon\", \"aria-hidden\": \"true\", focusable: \"false\", viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"circle\", { class: \"ic-switch-icon-circle\", fill: \"none\", cx: \"5\", cy: \"5\", r: small || size === \"small\" ? \"3.335\" : \"4.445\" }))), h(\"slot\", { name: \"right-adornment\" }), showState && (h(\"ic-typography\", { \"aria-hidden\": \"true\", variant: \"label\", class: \"ic-switch-checked-status\" }, checkedState ? \"On\" : \"Off\")))));\n }\n static get is() { return \"ic-switch\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-switch.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-switch.css\"]\n };\n }\n static get properties() {\n return {\n \"checked\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the switch will display as checked.\"\n },\n \"attribute\": \"checked\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the disabled state will be set.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"helperText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The helper text that will be displayed for additional field guidance.\"\n },\n \"attribute\": \"helper-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"hideLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the label will be hidden and the required label value will be applied as an aria-label.\"\n },\n \"attribute\": \"hide-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The aria-label applied to the switch when no visual 'name' is provided.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name of the control, which is submitted with the form data.\"\n },\n \"attribute\": \"name\",\n \"reflect\": false,\n \"defaultValue\": \"this.inputId\"\n },\n \"showState\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the switch will render the On/Off state text.\"\n },\n \"attribute\": \"show-state\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizesNoLarge\",\n \"resolved\": \"\\\"default\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizesNoLarge\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizesNoLarge\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the switch component.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"small\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Set prop `size` to \\\"small\\\" instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"small\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"value\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | null\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value of the toggle does not mean if it's checked or not, use the `checked`\\nproperty for that.\\n\\nThe value of a toggle is analogous to the value of a `<input type=\\\"checkbox\\\">`,\\nit's only used when the toggle participates in a native `<form>`.\"\n },\n \"attribute\": \"value\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"on\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"checkedState\": {},\n \"initiallyChecked\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icBlur\",\n \"name\": \"icBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the toggle loses focus.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the value property has changed.\"\n },\n \"complexType\": {\n \"original\": \"IcSwitchChangeEventDetail\",\n \"resolved\": \"IcSwitchChangeEventDetail\",\n \"references\": {\n \"IcSwitchChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-switch.types\",\n \"id\": \"src/components/ic-switch/ic-switch.types.ts::IcSwitchChangeEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icFocus\",\n \"name\": \"icFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the toggle has focus.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the switch.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"checked\",\n \"methodName\": \"checkedChangeHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-switch.js.map\n"],"mappings":"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"}
1
+ {"version":3,"names":["icSwitchCss","inputIds","Switch","constructor","hostRef","this","inputId","handleChange","checkedState","icChange","emit","checked","value","onFocus","icFocus","onBlur","icBlur","handleFormReset","initiallyChecked","disabled","helperText","hideLabel","label","undefined","name","showState","size","small","checkedChangeHandler","disconnectedCallback","removeFormResetListener","el","componentWillLoad","addFormResetListener","removeDisabledFalse","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","setFocus","shadowRoot","querySelector","focus","render","renderHiddenInput","describedBy","getInputDescribedByText","h","Host","class","htmlFor","for","readonly","role","type","id","onChange","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","cy","r","variant","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","../web-components/dist/collection/components/ic-switch/ic-switch.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: var(--ic-border-width) solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n width: var(--ic-space-lg);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: var(--ic-border-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-light);\n border: var(--ic-border-width) dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getInputDescribedByText, onComponentRequiredPropUndefined, renderHiddenInput, addFormResetListener, removeFormResetListener, removeDisabledFalse, } from \"../../utils/helpers\";\nlet inputIds = 0;\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\nexport class Switch {\n constructor() {\n this.inputId = `ic-switch-input-${inputIds++}`;\n this.handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n this.onFocus = () => {\n this.icFocus.emit();\n };\n this.onBlur = () => {\n this.icBlur.emit();\n };\n this.handleFormReset = () => {\n this.checkedState = this.initiallyChecked;\n };\n this.checkedState = false;\n this.initiallyChecked = this.checked;\n this.checked = false;\n this.disabled = false;\n this.helperText = \"\";\n this.hideLabel = false;\n this.label = undefined;\n this.name = this.inputId;\n this.showState = false;\n this.size = \"default\";\n this.small = false;\n this.value = \"on\";\n }\n checkedChangeHandler() {\n this.checkedState = this.checked;\n }\n disconnectedCallback() {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n componentWillLoad() {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Switch\");\n }\n /**\n * Sets focus on the switch.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n render() {\n const { label, checkedState, small, size, disabled, name, showState, value, hideLabel, helperText, inputId, } = this;\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n const describedBy = getInputDescribedByText(inputId, helperText !== \"\", false);\n return (h(Host, null, h(\"label\", { class: {\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small || size === \"small\",\n }, htmlFor: inputId }, !hideLabel && (h(\"ic-input-label\", { for: inputId, label: label, helperText: helperText, readonly: true, disabled: disabled, class: {\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small || size === \"small\",\n } })), !hideLabel && h(\"span\", { class: \"ic-switch-line-break\" }), h(\"input\", { checked: checkedState, disabled: disabled, \"aria-label\": label, \"aria-checked\": checkedState ? \"true\" : \"false\", \"aria-describedby\": describedBy, role: \"switch\", class: \"ic-switch-input\", type: \"checkbox\", name: \"toggle\", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), h(\"span\", { class: \"ic-switch-toggle\" }, h(\"svg\", { class: \"ic-switch-icon\", \"aria-hidden\": \"true\", focusable: \"false\", viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"line\", { class: \"ic-switch-icon-line\", x1: \"9\", y1: small || size === \"small\" ? \"2\" : \"1\", x2: \"9\", y2: small || size === \"small\" ? \"8\" : \"9\" })), h(\"svg\", { class: \"ic-switch-icon\", \"aria-hidden\": \"true\", focusable: \"false\", viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"circle\", { class: \"ic-switch-icon-circle\", fill: \"none\", cx: \"5\", cy: \"5\", r: small || size === \"small\" ? \"3.335\" : \"4.445\" }))), h(\"slot\", { name: \"right-adornment\" }), showState && (h(\"ic-typography\", { \"aria-hidden\": \"true\", variant: \"label\", class: \"ic-switch-checked-status\" }, checkedState ? \"On\" : \"Off\")))));\n }\n static get is() { return \"ic-switch\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-switch.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-switch.css\"]\n };\n }\n static get properties() {\n return {\n \"checked\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the switch will display as checked.\"\n },\n \"attribute\": \"checked\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the disabled state will be set.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"helperText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The helper text that will be displayed for additional field guidance.\"\n },\n \"attribute\": \"helper-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"hideLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the label will be hidden and the required label value will be applied as an aria-label.\"\n },\n \"attribute\": \"hide-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The aria-label applied to the switch when no visual 'name' is provided.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name of the control, which is submitted with the form data.\"\n },\n \"attribute\": \"name\",\n \"reflect\": false,\n \"defaultValue\": \"this.inputId\"\n },\n \"showState\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the switch will render the On/Off state text.\"\n },\n \"attribute\": \"show-state\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizesNoLarge\",\n \"resolved\": \"\\\"default\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizesNoLarge\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizesNoLarge\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the switch component.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"small\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Set prop `size` to \\\"small\\\" instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"small\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"value\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | null\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value of the toggle does not mean if it's checked or not, use the `checked`\\nproperty for that.\\n\\nThe value of a toggle is analogous to the value of a `<input type=\\\"checkbox\\\">`,\\nit's only used when the toggle participates in a native `<form>`.\"\n },\n \"attribute\": \"value\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"on\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"checkedState\": {},\n \"initiallyChecked\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icBlur\",\n \"name\": \"icBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the toggle loses focus.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the value property has changed.\"\n },\n \"complexType\": {\n \"original\": \"IcSwitchChangeEventDetail\",\n \"resolved\": \"IcSwitchChangeEventDetail\",\n \"references\": {\n \"IcSwitchChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-switch.types\",\n \"id\": \"src/components/ic-switch/ic-switch.types.ts::IcSwitchChangeEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icFocus\",\n \"name\": \"icFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the toggle has focus.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the switch.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"checked\",\n \"methodName\": \"checkedChangeHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-switch.js.map\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as o,g as s}from"./p-8455d1bb.js";import{j as a,a as n,q as r,s as l}from"./p-9caf19eb.js";import"./p-fd186591.js";const c='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}ic-input-label.error{color:var(--ic-status-error)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host(.small) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}';const d=class{constructor(i){e(this,i);this.icChange=t(this,"icChange",7);this.disabled=false;this.helperText="";this.hideLabel=false;this.label=undefined;this.name=undefined;this.required=false;this.size="default";this.small=false;this.validationStatus="";this.validationText=""}handleChange(e){if(e.target.tagName==="IC-TEXT-FIELD"){e.stopImmediatePropagation()}}componentWillLoad(){a(this.disabled,this.el)}componentDidLoad(){Array.from(this.el.querySelectorAll("ic-checkbox")).forEach((e=>{if(!e.name)e.name=this.name;e.groupLabel=this.label}));n([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Checkbox Group")}selectHandler(e){const t=Array.from(this.el.querySelectorAll("ic-checkbox")).filter((e=>e.checked&&!e.disabled));this.icChange.emit({value:t.map((e=>e.value)),checkedOptions:t.map((e=>{var t;return{checkbox:e,textFieldValue:(t=e.querySelector("ic-text-field"))===null||t===void 0?void 0:t.value}})),selectedOption:e.target})}render(){const e=r(this.name,this.helperText!=="",this.validationStatus!=="");const t=l(this.validationStatus,this.disabled);return i(o,{class:{["small"]:this.small,[`${this.size}`]:true}},(this.validationStatus==="error"||this.required||this.hideLabel)&&i("span",{id:"screenReaderOnlyText",class:"screen-reader-only-text","aria-hidden":"true"},this.label," ",this.validationStatus==="error"?"invalid data ":null," ",this.required?"required":null),i("fieldset",{id:this.name,"aria-labelledby":`${this.validationStatus==="error"||this.required||this.hideLabel?"screenReaderOnlyText":""} ${e}`.trim(),disabled:this.disabled},!this.hideLabel&&i("legend",null,i("ic-input-label",{class:{[`${this.validationStatus}`]:true},label:this.label,helperText:this.helperText,required:this.required,disabled:this.disabled,for:this.name})),i("div",{class:"checkboxes-container"},i("slot",null))),t&&i("ic-input-validation",{for:this.name,ariaLiveMode:"polite",status:this.validationStatus,message:this.validationText}))}get el(){return s(this)}};d.style=c;export{d as ic_checkbox_group};
2
- //# sourceMappingURL=p-204ace96.entry.js.map
1
+ import{r as e,c as t,h as i,H as o,g as s}from"./p-8455d1bb.js";import{r as a,a as n,q as r,s as l}from"./p-ee765ad5.js";import"./p-fd186591.js";const c='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}ic-input-label.error{color:var(--ic-status-error)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host(.small) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}';const d=class{constructor(i){e(this,i);this.icChange=t(this,"icChange",7);this.disabled=false;this.helperText="";this.hideLabel=false;this.label=undefined;this.name=undefined;this.required=false;this.size="default";this.small=false;this.validationStatus="";this.validationText=""}handleChange(e){if(e.target.tagName==="IC-TEXT-FIELD"){e.stopImmediatePropagation()}}componentWillLoad(){a(this.disabled,this.el)}componentDidLoad(){Array.from(this.el.querySelectorAll("ic-checkbox")).forEach((e=>{if(!e.name)e.name=this.name;e.groupLabel=this.label}));n([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Checkbox Group")}selectHandler(e){const t=Array.from(this.el.querySelectorAll("ic-checkbox")).filter((e=>e.checked&&!e.disabled));this.icChange.emit({value:t.map((e=>e.value)),checkedOptions:t.map((e=>{var t;return{checkbox:e,textFieldValue:(t=e.querySelector("ic-text-field"))===null||t===void 0?void 0:t.value}})),selectedOption:e.target})}render(){const e=r(this.name,this.helperText!=="",this.validationStatus!=="");const t=l(this.validationStatus,this.disabled);return i(o,{class:{["small"]:this.small,[`${this.size}`]:true}},(this.validationStatus==="error"||this.required||this.hideLabel)&&i("span",{id:"screenReaderOnlyText",class:"screen-reader-only-text","aria-hidden":"true"},this.label," ",this.validationStatus==="error"?"invalid data ":null," ",this.required?"required":null),i("fieldset",{id:this.name,"aria-labelledby":`${this.validationStatus==="error"||this.required||this.hideLabel?"screenReaderOnlyText":""} ${e}`.trim(),disabled:this.disabled},!this.hideLabel&&i("legend",null,i("ic-input-label",{class:{[`${this.validationStatus}`]:true},label:this.label,helperText:this.helperText,required:this.required,disabled:this.disabled,for:this.name})),i("div",{class:"checkboxes-container"},i("slot",null))),t&&i("ic-input-validation",{for:this.name,ariaLiveMode:"polite",status:this.validationStatus,message:this.validationText}))}get el(){return s(this)}};d.style=c;export{d as ic_checkbox_group};
2
+ //# sourceMappingURL=p-e16f73ba.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e,g as i}from"./p-8455d1bb.js";const a=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">\n <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>\n</svg>`;const s=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(-90deg);">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const n=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(90deg)">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const r=':host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination="true"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:fixed;border-spacing:0;width:100%}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded="true"]) .table-container{border:var(--ic-border-light)}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.column-header,.row-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded="true"]) tr:last-child .table-cell,:host([embedded="true"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}.data-type-string{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;vertical-align:top}.cell-alignment-top{vertical-align:top}.cell-alignment-middle{vertical-align:middle}.cell-alignment-bottom{vertical-align:bottom}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}';const o=class{constructor(i){t(this,i);this.SORT_ICONS={unsorted:a,ascending:s,descending:n};this.isObject=t=>typeof t==="object";this.notDefaultDensity=()=>this.density!=="default";this.getCellContent=(t,e)=>{switch(e){case"element":return undefined;case"date":return(t instanceof Date?t:new Date(t)).toLocaleDateString();default:return t}};this.getCellAlignment=(t,e)=>{if(this.isObject(t)&&Object.keys(t).includes("cellAlignment")){return this.getObjectValue(this.getObjectValue(t,"cellAlignment"),e)}};this.createCells=t=>{const i=Object.values(t);const a=Object.keys(t);let s;let n;const r=a.indexOf("header");if(r>-1){s=this.getObjectValue(i[r],"rowAlignment");n=this.getObjectValue(i[r],"emphasis")}return i.map(((t,i)=>{const{columnAlignment:r,dataType:o,emphasis:l}=this.columns[i];const h=e=>this.getObjectValue(t,e);return a[i]==="header"?e("th",{scope:"row",colSpan:h("colspan"),class:{["row-header"]:true,[`row-header-alignment-${h("cellAlignment")}`]:!!h("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},h("title")):e("td",{innerHTML:o==="element"?t:null,class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),[`data-type-${o}`]:true,[`cell-alignment-${(r===null||r===void 0?void 0:r.horizontal)||this.getCellAlignment(t,"horizontal")}`]:!!(r===null||r===void 0?void 0:r.horizontal)||!!this.getCellAlignment(t,"horizontal"),[`cell-alignment-${(r===null||r===void 0?void 0:r.vertical)||s||this.getCellAlignment(t,"vertical")}`]:!!(r===null||r===void 0?void 0:r.vertical)||!!s||!!this.getCellAlignment(t,"vertical")}},e("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(t)&&h("emphasis")||l||n}`]:this.isObject(t)&&!!h("emphasis")||!!l||!!n,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(t)&&o!=="date"?Object.keys(t).includes("href")?e("ic-link",{href:h("href")},h("data")):h("data"):this.getCellContent(t,o)))}))};this.createColumnHeaders=()=>this.columns.map((({cellAlignment:t,colspan:i,key:a,title:s})=>e("th",{scope:"col",class:{["column-header"]:true,[`column-header-alignment-${t}`]:!!t,[`table-density-${this.density}`]:this.notDefaultDensity()},colSpan:i},this.sortable?e("div",{class:"column-header-inner-container"},e("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},s),e("ic-button",{variant:"icon",id:`sort-button-${a}`,"aria-label":this.getSortButtonLabel(a),onClick:()=>this.sortRows(a),innerHTML:this.SORT_ICONS[this.sortedColumn===a?this.sortedColumnOrder:"unsorted"],class:{["sort-button"]:true,["sort-button-unsorted"]:this.sortedColumn!==a||this.sortedColumnOrder==="unsorted"}})):e("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},s))));this.createRows=()=>{const t=this.showPagination?this.data.slice(this.fromRow,this.toRow):this.data.slice();return t.sort(!this.sortable?undefined:this.getSortFunction()).map((t=>e("tr",{onClick:()=>this.selectedRow=this.selectedRow!==t&&t,class:{["table-row"]:true,["table-row-selected"]:this.selectedRow===t}},this.createCells(t))))};this.getObjectValue=(t,e)=>Object.values(t)[Object.keys(t).indexOf(e)];this.getSortButtonLabel=t=>{let e="";const i=t=>{const e=this.sortOptions.sortOrders;return e[(e.indexOf(t)+1)%e.length]};if(this.sortedColumn===t){const t=i(this.sortedColumnOrder);e=t!=="unsorted"?`Sort ${t}`:"Remove sort"}else{e=`Sort ${i("unsorted")}`}return e};this.getComparison=(t,e)=>{const i=t[this.sortedColumn];const a=e[this.sortedColumn];return this.columns.find((t=>t.key===this.sortedColumn)).dataType==="date"?new Date(i).valueOf()-new Date(a).valueOf():String(this.isObject(i)?Object.values(i)[0]:i).localeCompare(String(this.isObject(a)?Object.values(a)[0]:a),undefined,{numeric:true,sensitivity:"base"})};this.getSortFunction=()=>{switch(this.sortedColumnOrder){case"ascending":return(t,e)=>this.getComparison(t,e);case"descending":return(t,e)=>this.getComparison(e,t);default:return undefined}};this.sortRows=t=>{const e=this.el.shadowRoot.querySelector(`#sort-button-${t}`);const i=this.sortOptions.sortOrders;if(t!==this.sortedColumn){if(this.sortedColumn){const e=this.el.shadowRoot.querySelector(`#sort-button-${this.sortedColumn}`);e.setAttribute("aria-label",this.getSortButtonLabel(t))}this.sortedColumn=t;this.sortedColumnOrder="unsorted"}let a=i.indexOf(this.sortedColumnOrder)+1;if(a>i.length-1){a=0}this.sortedColumnOrder=i[a];e.setAttribute("aria-label",this.getSortButtonLabel(t))};this.updateScrollOffset=()=>{this.scrollOffset=this.el.shadowRoot.querySelector(".table-row-container").scrollTop};this.fromRow=0;this.previousRowsPerPage=undefined;this.rowsPerPage=undefined;this.scrollable=false;this.scrollOffset=0;this.selectedRow=undefined;this.sortedColumn=undefined;this.sortedColumnOrder=undefined;this.toRow=undefined;this.caption=undefined;this.columns=undefined;this.data=undefined;this.density="default";this.embedded=false;this.hideColumnHeaders=false;this.paginationOptions={itemsPerPage:[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}],type:"page",control:"simple",itemsPerPageControl:true,goToPageControl:true,alignment:"right"};this.showPagination=false;this.sortable=false;this.sortOptions={sortOrders:["unsorted","ascending","descending"],defaultColumn:""};this.stickyColumnHeaders=false;this.stickyRowHeaders=false}componentWillLoad(){this.rowsPerPage=Number(this.paginationOptions.itemsPerPage[0].value);this.previousRowsPerPage=this.rowsPerPage;this.toRow=this.rowsPerPage;this.sortedColumn=this.sortOptions.defaultColumn;this.sortedColumnOrder=this.sortOptions.sortOrders[0]}componentDidLoad(){const t=this.el.shadowRoot.querySelector("table");const e=this.el.shadowRoot.querySelector(".table-container");if((t===null||t===void 0?void 0:t.clientHeight)>(e===null||e===void 0?void 0:e.clientHeight)||(t===null||t===void 0?void 0:t.clientWidth)>(e===null||e===void 0?void 0:e.clientWidth)){this.scrollable=true}}handleItemsPerPageChange(t){this.previousRowsPerPage=this.rowsPerPage;this.rowsPerPage=t.detail.value}handlePageChange(t){this.fromRow=(t.detail.value-1)*this.rowsPerPage;this.toRow=this.fromRow+this.rowsPerPage;const e=this.el.shadowRoot.querySelector(".table-row-container");if(this.previousRowsPerPage===this.rowsPerPage){e.scrollTop=0}else if(this.previousRowsPerPage<this.rowsPerPage){e.scrollTop=this.scrollOffset;this.previousRowsPerPage=this.rowsPerPage}else{this.previousRowsPerPage=this.rowsPerPage}}clickListener(t){if(t.target!==this.el)this.selectedRow=undefined}render(){const{caption:t,createColumnHeaders:i,createRows:a,data:s,hideColumnHeaders:n,paginationOptions:r,scrollable:o,scrollOffset:l,showPagination:h,sortable:c,sortedColumnOrder:d,sortedColumn:u,stickyColumnHeaders:g,updateScrollOffset:b}=this;return e("div",{class:"table-container"},e("div",{class:{["table-row-container"]:true,scrollable:o},tabIndex:o?0:null,onScroll:b},e("table",null,e("caption",{class:"table-caption"},t),!n&&e("thead",{class:{["column-header-sticky"]:g,["column-header-overlay"]:g&&l!==0}},e("tr",null,i())),(s===null||s===void 0?void 0:s.length)>0&&e("tbody",null,a()))),h&&e("div",{class:"pagination-container"},e("ic-pagination-bar",{totalItems:s.length,paginationType:r.type,paginationControl:r.control,showItemsPerPageControl:r.itemsPerPageControl,showGoToPageControl:r.goToPageControl,itemsPerPageOptions:r.itemsPerPage,alignment:r.alignment})),c&&e("div",{class:"screen-reader-sort-text","aria-live":"polite"},d!=="unsorted"&&u?`${u} sorted ${d}`:"table unsorted"))}get el(){return i(this)}};o.style=r;export{o as ic_data_table};
2
+ //# sourceMappingURL=p-e189f1d0.entry.js.map