@ukic/web-components 3.25.0 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/components/OpenInNew.js +5 -0
  2. package/components/OpenInNew.js.map +1 -0
  3. package/components/check-icon.js +8 -0
  4. package/components/check-icon.js.map +1 -0
  5. package/components/chevron-icon.js +8 -0
  6. package/components/chevron-icon.js.map +1 -0
  7. package/components/close-icon.js +10 -0
  8. package/components/close-icon.js.map +1 -0
  9. package/components/constants.js +184 -0
  10. package/components/constants.js.map +1 -0
  11. package/components/custom-elements.d.ts +2 -0
  12. package/components/helpers.js +547 -0
  13. package/components/helpers.js.map +1 -0
  14. package/components/ic-accordion-group.d.ts +11 -0
  15. package/components/ic-accordion-group.js +191 -0
  16. package/components/ic-accordion-group.js.map +1 -0
  17. package/components/ic-accordion.d.ts +11 -0
  18. package/components/ic-accordion.js +188 -0
  19. package/components/ic-accordion.js.map +1 -0
  20. package/components/ic-action-chip.d.ts +11 -0
  21. package/components/ic-action-chip.js +164 -0
  22. package/components/ic-action-chip.js.map +1 -0
  23. package/components/ic-alert.d.ts +11 -0
  24. package/components/ic-alert.js +193 -0
  25. package/components/ic-alert.js.map +1 -0
  26. package/components/ic-back-to-top.d.ts +11 -0
  27. package/components/ic-back-to-top.js +216 -0
  28. package/components/ic-back-to-top.js.map +1 -0
  29. package/components/ic-badge.d.ts +11 -0
  30. package/components/ic-badge.js +222 -0
  31. package/components/ic-badge.js.map +1 -0
  32. package/components/ic-breadcrumb-group.d.ts +11 -0
  33. package/components/ic-breadcrumb-group.js +278 -0
  34. package/components/ic-breadcrumb-group.js.map +1 -0
  35. package/components/ic-breadcrumb.d.ts +11 -0
  36. package/components/ic-breadcrumb.js +8 -0
  37. package/components/ic-breadcrumb.js.map +1 -0
  38. package/components/ic-breadcrumb2.js +145 -0
  39. package/components/ic-breadcrumb2.js.map +1 -0
  40. package/components/ic-button.d.ts +11 -0
  41. package/components/ic-button.js +8 -0
  42. package/components/ic-button.js.map +1 -0
  43. package/components/ic-button2.js +509 -0
  44. package/components/ic-button2.js.map +1 -0
  45. package/components/ic-card-horizontal.d.ts +11 -0
  46. package/components/ic-card-horizontal.js +214 -0
  47. package/components/ic-card-horizontal.js.map +1 -0
  48. package/components/ic-card-vertical.d.ts +11 -0
  49. package/components/ic-card-vertical.js +219 -0
  50. package/components/ic-card-vertical.js.map +1 -0
  51. package/components/ic-checkbox-group.d.ts +11 -0
  52. package/components/ic-checkbox-group.js +198 -0
  53. package/components/ic-checkbox-group.js.map +1 -0
  54. package/components/ic-checkbox.d.ts +11 -0
  55. package/components/ic-checkbox.js +202 -0
  56. package/components/ic-checkbox.js.map +1 -0
  57. package/components/ic-chip.d.ts +11 -0
  58. package/components/ic-chip.js +183 -0
  59. package/components/ic-chip.js.map +1 -0
  60. package/components/ic-classification-banner.d.ts +11 -0
  61. package/components/ic-classification-banner.js +102 -0
  62. package/components/ic-classification-banner.js.map +1 -0
  63. package/components/ic-data-list.d.ts +11 -0
  64. package/components/ic-data-list.js +63 -0
  65. package/components/ic-data-list.js.map +1 -0
  66. package/components/ic-data-row.d.ts +11 -0
  67. package/components/ic-data-row.js +115 -0
  68. package/components/ic-data-row.js.map +1 -0
  69. package/components/ic-dialog.d.ts +11 -0
  70. package/components/ic-dialog.js +366 -0
  71. package/components/ic-dialog.js.map +1 -0
  72. package/components/ic-divider.d.ts +11 -0
  73. package/components/ic-divider.js +8 -0
  74. package/components/ic-divider.js.map +1 -0
  75. package/components/ic-divider2.js +148 -0
  76. package/components/ic-divider2.js.map +1 -0
  77. package/components/ic-empty-state.d.ts +11 -0
  78. package/components/ic-empty-state.js +82 -0
  79. package/components/ic-empty-state.js.map +1 -0
  80. package/components/ic-footer-link-group.d.ts +11 -0
  81. package/components/ic-footer-link-group.js +101 -0
  82. package/components/ic-footer-link-group.js.map +1 -0
  83. package/components/ic-footer-link.d.ts +11 -0
  84. package/components/ic-footer-link.js +95 -0
  85. package/components/ic-footer-link.js.map +1 -0
  86. package/components/ic-footer.d.ts +11 -0
  87. package/components/ic-footer.js +156 -0
  88. package/components/ic-footer.js.map +1 -0
  89. package/components/ic-hero.d.ts +11 -0
  90. package/components/ic-hero.js +145 -0
  91. package/components/ic-hero.js.map +1 -0
  92. package/components/ic-horizontal-scroll.d.ts +11 -0
  93. package/components/ic-horizontal-scroll.js +8 -0
  94. package/components/ic-horizontal-scroll.js.map +1 -0
  95. package/components/ic-horizontal-scroll2.js +240 -0
  96. package/components/ic-horizontal-scroll2.js.map +1 -0
  97. package/components/ic-input-component-container.d.ts +11 -0
  98. package/components/ic-input-component-container.js +8 -0
  99. package/components/ic-input-component-container.js.map +1 -0
  100. package/components/ic-input-component-container2.js +95 -0
  101. package/components/ic-input-component-container2.js.map +1 -0
  102. package/components/ic-input-container.d.ts +11 -0
  103. package/components/ic-input-container.js +8 -0
  104. package/components/ic-input-container.js.map +1 -0
  105. package/components/ic-input-container2.js +47 -0
  106. package/components/ic-input-container2.js.map +1 -0
  107. package/components/ic-input-label.d.ts +11 -0
  108. package/components/ic-input-label.js +8 -0
  109. package/components/ic-input-label.js.map +1 -0
  110. package/components/ic-input-label2.js +121 -0
  111. package/components/ic-input-label2.js.map +1 -0
  112. package/components/ic-input-validation.d.ts +11 -0
  113. package/components/ic-input-validation.js +8 -0
  114. package/components/ic-input-validation.js.map +1 -0
  115. package/components/ic-input-validation2.js +90 -0
  116. package/components/ic-input-validation2.js.map +1 -0
  117. package/components/ic-layout-grid-item.d.ts +11 -0
  118. package/components/ic-layout-grid-item.js +95 -0
  119. package/components/ic-layout-grid-item.js.map +1 -0
  120. package/components/ic-layout-grid.d.ts +11 -0
  121. package/components/ic-layout-grid.js +188 -0
  122. package/components/ic-layout-grid.js.map +1 -0
  123. package/components/ic-link.d.ts +11 -0
  124. package/components/ic-link.js +8 -0
  125. package/components/ic-link.js.map +1 -0
  126. package/components/ic-link2.js +135 -0
  127. package/components/ic-link2.js.map +1 -0
  128. package/components/ic-loading-indicator.d.ts +11 -0
  129. package/components/ic-loading-indicator.js +8 -0
  130. package/components/ic-loading-indicator.js.map +1 -0
  131. package/components/ic-loading-indicator2.js +278 -0
  132. package/components/ic-loading-indicator2.js.map +1 -0
  133. package/components/ic-menu-group.d.ts +11 -0
  134. package/components/ic-menu-group.js +47 -0
  135. package/components/ic-menu-group.js.map +1 -0
  136. package/components/ic-menu-item.d.ts +11 -0
  137. package/components/ic-menu-item.js +8 -0
  138. package/components/ic-menu-item.js.map +1 -0
  139. package/components/ic-menu-item2.js +171 -0
  140. package/components/ic-menu-item2.js.map +1 -0
  141. package/components/ic-menu.d.ts +11 -0
  142. package/components/ic-menu.js +8 -0
  143. package/components/ic-menu.js.map +1 -0
  144. package/components/ic-menu2.js +2590 -0
  145. package/components/ic-menu2.js.map +1 -0
  146. package/components/ic-navigation-button.d.ts +11 -0
  147. package/components/ic-navigation-button.js +175 -0
  148. package/components/ic-navigation-button.js.map +1 -0
  149. package/components/ic-navigation-group.d.ts +11 -0
  150. package/components/ic-navigation-group.js +326 -0
  151. package/components/ic-navigation-group.js.map +1 -0
  152. package/components/ic-navigation-item.d.ts +11 -0
  153. package/components/ic-navigation-item.js +294 -0
  154. package/components/ic-navigation-item.js.map +1 -0
  155. package/components/ic-navigation-menu.d.ts +11 -0
  156. package/components/ic-navigation-menu.js +8 -0
  157. package/components/ic-navigation-menu.js.map +1 -0
  158. package/components/ic-navigation-menu2.js +188 -0
  159. package/components/ic-navigation-menu2.js.map +1 -0
  160. package/components/ic-page-header.d.ts +11 -0
  161. package/components/ic-page-header.js +196 -0
  162. package/components/ic-page-header.js.map +1 -0
  163. package/components/ic-pagination-bar.d.ts +11 -0
  164. package/components/ic-pagination-bar.js +523 -0
  165. package/components/ic-pagination-bar.js.map +1 -0
  166. package/components/ic-pagination-item.d.ts +11 -0
  167. package/components/ic-pagination-item.js +8 -0
  168. package/components/ic-pagination-item.js.map +1 -0
  169. package/components/ic-pagination-item2.js +107 -0
  170. package/components/ic-pagination-item2.js.map +1 -0
  171. package/components/ic-pagination.d.ts +11 -0
  172. package/components/ic-pagination.js +8 -0
  173. package/components/ic-pagination.js.map +1 -0
  174. package/components/ic-pagination2.js +379 -0
  175. package/components/ic-pagination2.js.map +1 -0
  176. package/components/ic-popover-menu.d.ts +11 -0
  177. package/components/ic-popover-menu.js +369 -0
  178. package/components/ic-popover-menu.js.map +1 -0
  179. package/components/ic-radio-group.d.ts +11 -0
  180. package/components/ic-radio-group.js +317 -0
  181. package/components/ic-radio-group.js.map +1 -0
  182. package/components/ic-radio-option.d.ts +11 -0
  183. package/components/ic-radio-option.js +211 -0
  184. package/components/ic-radio-option.js.map +1 -0
  185. package/components/ic-search-bar.d.ts +11 -0
  186. package/components/ic-search-bar.js +719 -0
  187. package/components/ic-search-bar.js.map +1 -0
  188. package/components/ic-section-container.d.ts +11 -0
  189. package/components/ic-section-container.js +8 -0
  190. package/components/ic-section-container.js.map +1 -0
  191. package/components/ic-section-container2.js +50 -0
  192. package/components/ic-section-container2.js.map +1 -0
  193. package/components/ic-select.d.ts +11 -0
  194. package/components/ic-select.js +8 -0
  195. package/components/ic-select.js.map +1 -0
  196. package/components/ic-select2.js +806 -0
  197. package/components/ic-select2.js.map +1 -0
  198. package/components/ic-side-navigation.d.ts +11 -0
  199. package/components/ic-side-navigation.js +568 -0
  200. package/components/ic-side-navigation.js.map +1 -0
  201. package/components/ic-skeleton.d.ts +11 -0
  202. package/components/ic-skeleton.js +81 -0
  203. package/components/ic-skeleton.js.map +1 -0
  204. package/components/ic-skip-link.d.ts +11 -0
  205. package/components/ic-skip-link.js +91 -0
  206. package/components/ic-skip-link.js.map +1 -0
  207. package/components/ic-status-tag.d.ts +11 -0
  208. package/components/ic-status-tag.js +85 -0
  209. package/components/ic-status-tag.js.map +1 -0
  210. package/components/ic-step.d.ts +11 -0
  211. package/components/ic-step.js +200 -0
  212. package/components/ic-step.js.map +1 -0
  213. package/components/ic-stepper.d.ts +11 -0
  214. package/components/ic-stepper.js +340 -0
  215. package/components/ic-stepper.js.map +1 -0
  216. package/components/ic-switch.d.ts +11 -0
  217. package/components/ic-switch.js +164 -0
  218. package/components/ic-switch.js.map +1 -0
  219. package/components/ic-tab-context.d.ts +11 -0
  220. package/components/ic-tab-context.js +275 -0
  221. package/components/ic-tab-context.js.map +1 -0
  222. package/components/ic-tab-group.d.ts +11 -0
  223. package/components/ic-tab-group.js +89 -0
  224. package/components/ic-tab-group.js.map +1 -0
  225. package/components/ic-tab-panel.d.ts +11 -0
  226. package/components/ic-tab-panel.js +63 -0
  227. package/components/ic-tab-panel.js.map +1 -0
  228. package/components/ic-tab.d.ts +11 -0
  229. package/components/ic-tab.js +143 -0
  230. package/components/ic-tab.js.map +1 -0
  231. package/components/ic-text-field.d.ts +11 -0
  232. package/components/ic-text-field.js +8 -0
  233. package/components/ic-text-field.js.map +1 -0
  234. package/components/ic-text-field2.js +532 -0
  235. package/components/ic-text-field2.js.map +1 -0
  236. package/components/ic-theme.d.ts +11 -0
  237. package/components/ic-theme.js +105 -0
  238. package/components/ic-theme.js.map +1 -0
  239. package/components/ic-toast-region.d.ts +11 -0
  240. package/components/ic-toast-region.js +76 -0
  241. package/components/ic-toast-region.js.map +1 -0
  242. package/components/ic-toast.d.ts +11 -0
  243. package/components/ic-toast.js +295 -0
  244. package/components/ic-toast.js.map +1 -0
  245. package/components/ic-toggle-button-group.d.ts +11 -0
  246. package/components/ic-toggle-button-group.js +323 -0
  247. package/components/ic-toggle-button-group.js.map +1 -0
  248. package/components/ic-toggle-button.d.ts +11 -0
  249. package/components/ic-toggle-button.js +235 -0
  250. package/components/ic-toggle-button.js.map +1 -0
  251. package/components/ic-tooltip.d.ts +11 -0
  252. package/components/ic-tooltip.js +8 -0
  253. package/components/ic-tooltip.js.map +1 -0
  254. package/components/ic-tooltip2.js +2078 -0
  255. package/components/ic-tooltip2.js.map +1 -0
  256. package/components/ic-top-navigation.d.ts +11 -0
  257. package/components/ic-top-navigation.js +320 -0
  258. package/components/ic-top-navigation.js.map +1 -0
  259. package/components/ic-typography.d.ts +11 -0
  260. package/components/ic-typography.js +8 -0
  261. package/components/ic-typography.js.map +1 -0
  262. package/components/ic-typography2.js +228 -0
  263. package/components/ic-typography2.js.map +1 -0
  264. package/components/index.d.ts +33 -0
  265. package/components/index.js +4 -0
  266. package/components/index.js.map +1 -0
  267. package/components/package.json +9 -0
  268. package/dist/cjs/core.cjs.js +1 -1
  269. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  270. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +63 -37
  271. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  272. package/dist/cjs/ic-pagination_3.cjs.entry.js +17 -17
  273. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
  274. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  275. package/dist/cjs/ic-top-navigation.cjs.entry.js +12 -8
  276. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  277. package/dist/cjs/loader.cjs.js +1 -1
  278. package/dist/collection/components/ic-menu/ic-menu.css +19 -0
  279. package/dist/collection/components/ic-menu/ic-menu.js +62 -36
  280. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  281. package/dist/collection/components/ic-menu/ic-menu.types.js.map +1 -1
  282. package/dist/collection/components/ic-select/ic-select.js +17 -17
  283. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  284. package/dist/collection/components/ic-select/ic-select_(single).stories.js +54 -0
  285. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +33 -9
  286. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  287. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +26 -0
  288. package/dist/components/ic-menu2.js +63 -37
  289. package/dist/components/ic-menu2.js.map +1 -1
  290. package/dist/components/ic-page-header.js.map +1 -1
  291. package/dist/components/ic-popover-menu.js.map +1 -1
  292. package/dist/components/ic-radio-group.js.map +1 -1
  293. package/dist/components/ic-radio-option.js.map +1 -1
  294. package/dist/components/ic-select2.js +17 -17
  295. package/dist/components/ic-select2.js.map +1 -1
  296. package/dist/components/ic-top-navigation.js +13 -8
  297. package/dist/components/ic-top-navigation.js.map +1 -1
  298. package/dist/core/core.esm.js +1 -1
  299. package/dist/core/core.esm.js.map +1 -1
  300. package/dist/core/{p-46e5a58b.entry.js → p-12474095.entry.js} +2 -2
  301. package/dist/core/p-12474095.entry.js.map +1 -0
  302. package/dist/core/p-98dee727.entry.js.map +1 -1
  303. package/dist/core/p-d1220d2a.entry.js.map +1 -1
  304. package/dist/core/p-e0b66371.entry.js +2 -0
  305. package/dist/core/p-e0b66371.entry.js.map +1 -0
  306. package/dist/core/{p-171a19bf.entry.js → p-fdc4376e.entry.js} +2 -2
  307. package/dist/core/p-fdc4376e.entry.js.map +1 -0
  308. package/dist/esm/core.js +1 -1
  309. package/dist/esm/ic-button_3.entry.js.map +1 -1
  310. package/dist/esm/ic-input-component-container_3.entry.js +63 -37
  311. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  312. package/dist/esm/ic-pagination_3.entry.js +17 -17
  313. package/dist/esm/ic-pagination_3.entry.js.map +1 -1
  314. package/dist/esm/ic-section-container.entry.js.map +1 -1
  315. package/dist/esm/ic-top-navigation.entry.js +12 -8
  316. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  317. package/dist/esm/loader.js +1 -1
  318. package/dist/types/components/ic-menu/ic-menu.types.d.ts +1 -0
  319. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +4 -1
  320. package/dist/types/components.d.ts +10 -2
  321. package/hydrate/index.js +93 -62
  322. package/hydrate/index.mjs +93 -62
  323. package/package.json +4 -2
  324. package/vscode-data.json +5 -1
  325. package/dist/core/p-171a19bf.entry.js.map +0 -1
  326. package/dist/core/p-343670b4.entry.js +0 -2
  327. package/dist/core/p-343670b4.entry.js.map +0 -1
  328. package/dist/core/p-46e5a58b.entry.js.map +0 -1
@@ -0,0 +1,219 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { r as removeDisabledFalse, i as isSlotUsed, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, g as getBrandFromContext, I as IcBrandForegroundEnum } from './helpers.js';
3
+ import { c as chevronIcon } from './chevron-icon.js';
4
+ import { d as defineCustomElement$3 } from './ic-tooltip2.js';
5
+ import { d as defineCustomElement$2 } from './ic-typography2.js';
6
+
7
+ const icCardVerticalCss = "/*! 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: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-card-text-primary) !important;\n}\n\na:visited {\n color: var(--ic-card-link-action-dark) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card {\n display: flex;\n flex-direction: column;\n border: var(--ic-space-1px) solid var(--ic-card-border-primary);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-card-text-primary);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: -moz-fit-content;\n min-width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n min-height: 100%;\n\n ::slotted(svg) {\n fill: var(--ic-card-icon);\n }\n\n &.monochrome {\n border: var(--ic-border-width) solid var(--ic-card-border-monochrome);\n }\n\n &.fullwidth {\n width: 100%;\n }\n\n &.clickable {\n &:hover {\n background-color: var(--ic-card-background-hover);\n border: var(--ic-space-1px) solid var(--ic-card-hover-border-color);\n cursor: pointer;\n }\n\n &.focussed,\n &:focus {\n background-color: var(--ic-card-background-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-space-1px) solid var(--ic-card-pressed-border-color);\n }\n\n &:active {\n background-color: var(--ic-card-background-pressed);\n box-shadow: var(--ic-border-focus);\n\n .card-title {\n text-decoration: none;\n }\n }\n\n .card-title {\n --ic-typography-color: var(--ic-card-clickable-text);\n\n color: var(--ic-card-clickable-text);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n margin-bottom: var(--ic-space-xxs);\n }\n\n .interaction-button,\n .icon {\n margin-bottom: var(--ic-space-xxs);\n }\n }\n\n &.disabled {\n border: var(--ic-space-1px) dashed var(--ic-card-disabled-border-color);\n\n .card-message,\n .subheading,\n .card-title {\n --ic-typography-color: var(--ic-card-disabled-text);\n }\n\n .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-card-disabled-text);\n color: var(--ic-card-disabled-text);\n }\n\n ::slotted(svg) {\n fill: var(--ic-card-icon-disabled);\n }\n }\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: 0 !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0.25rem !important;\n }\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n\n &:hover {\n background-color: var(--ic-card-background-hover);\n }\n\n &:focus {\n box-shadow: var(--ic-border-focus);\n }\n\n &:active:not(:focus) {\n background-color: var(--ic-card-background-pressed);\n }\n\n svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\n }\n}\n\n#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .card {\n ::slotted(svg) {\n fill: currentcolor;\n }\n\n &.disabled {\n border-color: GrayText !important;\n\n ::slotted(svg) {\n fill: GrayText !important;\n }\n\n .card-message,\n .subheading,\n .card-title {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n }\n }\n\n .toggle-button:focus,\n .toggle-button:hover {\n outline-color: Highlight;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .card,\n .toggle-button {\n transition: none;\n }\n}\n";
8
+ const IcCardVerticalStyle0 = icCardVerticalCss;
9
+
10
+ const CardVertical = /*@__PURE__*/ proxyCustomElement(class CardVertical extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.hostMutationObserver = null;
16
+ this.areaExpanded = false;
17
+ this.isFocussed = false;
18
+ this.monochrome = false;
19
+ this.parentEl = null;
20
+ this.parentIsAnchorTag = false;
21
+ /**
22
+ * If `true`, the card will be a clickable variant, instead of static.
23
+ */
24
+ this.clickable = false;
25
+ /**
26
+ * If `true`, the card will be disabled if it is clickable.
27
+ */
28
+ this.disabled = false;
29
+ /**
30
+ * If `true`, the card will have an expandable area and expansion toggle button.
31
+ */
32
+ this.expandable = false;
33
+ /**
34
+ * If `true`, the card will fill the width of the container.
35
+ */
36
+ this.fullWidth = false;
37
+ /**
38
+ * The human language of the linked URL.
39
+ */
40
+ this.hreflang = "";
41
+ /**
42
+ * The main body message of the card.
43
+ */
44
+ this.message = "";
45
+ /**
46
+ * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
47
+ */
48
+ this.theme = "inherit";
49
+ this.parentFocussed = () => {
50
+ this.isFocussed = true;
51
+ };
52
+ this.parentBlurred = () => {
53
+ this.isFocussed = false;
54
+ };
55
+ this.toggleExpanded = () => {
56
+ this.areaExpanded = !this.areaExpanded;
57
+ };
58
+ }
59
+ watchDisabledHandler() {
60
+ removeDisabledFalse(this.disabled, this.el);
61
+ }
62
+ disconnectedCallback() {
63
+ var _a;
64
+ if (this.parentEl && this.parentIsAnchorTag) {
65
+ this.parentEl.removeEventListener("focus", this.parentFocussed);
66
+ this.parentEl.removeEventListener("blur", this.parentBlurred);
67
+ }
68
+ (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
69
+ }
70
+ componentWillLoad() {
71
+ var _a;
72
+ this.parentEl = this.el.parentElement;
73
+ if (((_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.tagName) === "A") {
74
+ this.clickable = true;
75
+ this.parentIsAnchorTag = true;
76
+ this.parentEl.classList.add("ic-card-wrapper-link");
77
+ this.parentEl.addEventListener("focus", this.parentFocussed);
78
+ this.parentEl.addEventListener("blur", this.parentBlurred);
79
+ }
80
+ removeDisabledFalse(this.disabled, this.el);
81
+ }
82
+ componentDidLoad() {
83
+ !isSlotUsed(this.el, "heading") &&
84
+ onComponentRequiredPropUndefined([{ prop: this.heading, propName: "heading" }], "Card");
85
+ this.updateTheme();
86
+ this.hostMutationObserver = new MutationObserver((mutationList) => renderDynamicChildSlots(mutationList, [
87
+ "message",
88
+ "adornment",
89
+ "expanded-content",
90
+ "image-top",
91
+ "image-mid",
92
+ "icon",
93
+ "interaction-button",
94
+ "badge",
95
+ "interaction-controls",
96
+ ], this));
97
+ this.hostMutationObserver.observe(this.el, {
98
+ childList: true,
99
+ });
100
+ }
101
+ handleHostClick(event) {
102
+ if (this.disabled) {
103
+ event.stopImmediatePropagation();
104
+ }
105
+ }
106
+ brandChangeHandler(ev) {
107
+ this.updateTheme(ev.detail.mode);
108
+ }
109
+ /**
110
+ * Sets focus on the card.
111
+ */
112
+ async setFocus() {
113
+ var _a, _b;
114
+ const shadowRoot = this.el.shadowRoot;
115
+ if (shadowRoot) {
116
+ if (shadowRoot.querySelector("a")) {
117
+ (_a = shadowRoot.querySelector("a")) === null || _a === void 0 ? void 0 : _a.focus();
118
+ }
119
+ else if (shadowRoot.querySelector("button")) {
120
+ (_b = shadowRoot.querySelector("button")) === null || _b === void 0 ? void 0 : _b.focus();
121
+ }
122
+ }
123
+ }
124
+ updateTheme(mode = null) {
125
+ const foregroundColor = getBrandFromContext(this.el, mode);
126
+ if (foregroundColor !== IcBrandForegroundEnum.Default) {
127
+ this.monochrome = true;
128
+ this.theme =
129
+ foregroundColor === IcBrandForegroundEnum.Light
130
+ ? IcBrandForegroundEnum.Dark
131
+ : IcBrandForegroundEnum.Light;
132
+ }
133
+ }
134
+ render() {
135
+ const { clickable, disabled, expandable, fullWidth, heading, isFocussed, message, monochrome, href, hreflang, parentIsAnchorTag, referrerpolicy, rel, subheading, target, theme, } = this;
136
+ const Component = parentIsAnchorTag || !clickable
137
+ ? "div"
138
+ : href === undefined
139
+ ? "button"
140
+ : "a";
141
+ const attrs = Component == "a" && {
142
+ href: href,
143
+ hrefLang: hreflang,
144
+ referrerPolicy: referrerpolicy,
145
+ rel: rel,
146
+ target: target,
147
+ };
148
+ return (h(Host, { key: 'a5c7d234492dc72ab0ce06bc64646982b9b0c765', class: {
149
+ [`ic-theme-${theme}`]: theme !== "inherit",
150
+ } }, h(Component, Object.assign({ key: '7878c6c421216eaffda8034f38711156dd920e41', class: {
151
+ card: true,
152
+ clickable: !!clickable && !disabled,
153
+ disabled: !!disabled,
154
+ fullwidth: !!fullWidth,
155
+ focussed: isFocussed,
156
+ monochrome: monochrome,
157
+ }, tabindex: clickable && !parentIsAnchorTag ? 0 : undefined, "aria-disabled": disabled ? "true" : null, disabled: disabled }, attrs), isSlotUsed(this.el, "image-top") && (h("div", { key: '32fc034396f14d12845c12ad9cfc4c00b75c0970', class: "image-top" }, h("slot", { key: 'd2f682bfd7e961d43aa37fc14b1f1ce875cfd9e4', name: "image-top" }))), h("div", { key: '315d6f3c97119e41228be4c1057f2c8e28c2e627', class: "card-header" }, isSlotUsed(this.el, "icon") && (h("div", { key: '304744f27ecdd26136c52bdf6a0623ccf16c8ccb', class: "icon" }, h("slot", { key: 'a186a14d094c999cc72b9ca8d0580c9c81ef5e5a', name: "icon" }))), h("div", { key: '4d52fd26c94603c39bdc7d03dd185d9147ec35d6', class: "card-title" }, h("slot", { key: 'e99c3b5b04bc8e4e0ad712ac221183e42472d1e4', name: "heading" }, h("ic-typography", { key: '7de9265a3bccf8ddeda0a5da115739dab6e7f4e3', variant: "h4" }, h("p", { key: '52ad60554c859fcba6960f892210b11afe2c8412' }, heading)))), isSlotUsed(this.el, "interaction-button") && (h("div", { key: 'bd177fd6ead82c2d826a90c9bc36baf4d9650822', class: "interaction-button" }, h("slot", { key: '50200586d93b445f084acdc44fe783362c61ad1c', name: "interaction-button" })))), (subheading || isSlotUsed(this.el, "subheading")) && (h("div", { key: '4084d3cdbcbfba517874846f00c6a75973911b46', class: "subheading" }, h("slot", { key: '83ecdcca1ae25ded22c2b48631ca719b219c670f', name: "subheading" }, h("ic-typography", { key: '6cc1e94ba4ecaeb37c0b01a177bf51ce56431406', variant: "subtitle-small" }, subheading)))), isSlotUsed(this.el, "adornment") && (h("div", { key: '5b2e821691a30048fa7598ea5e7f4da245539644', class: "adornment" }, h("slot", { key: '9955b70349039dd954ee03c66f27684225ad2161', name: "adornment" }))), isSlotUsed(this.el, "image-mid") && (h("div", { key: '1a44edd306c3a8a9f8b9d07d3f92bad346b8d9c2', class: "image-mid" }, h("slot", { key: '79c16a0c673bc92c420159b4908e7c2881c58fc0', name: "image-mid" }))), (message || isSlotUsed(this.el, "message")) && (h("div", { key: '11468fd0d9784ad303bae66a6c7b9a7e6fcd2fdb', class: "card-message" }, message && (h("ic-typography", { key: '4795147360d9862d329b7aa23b2d5d9d3501ff21', variant: "body" }, message)), isSlotUsed(this.el, "message") && h("slot", { key: '2e5c82f6cc32ab92e46d4531f5f646bb15b8bb8a', name: "message" }))), (isSlotUsed(this.el, "interaction-controls") || expandable) && (h("div", { key: '0d1f66f5387c89bdb9b6be46636f6b092fd3b977', class: "interaction-area" }, h("div", { key: '9afed7575316981e6e696d58469f56746fdd78e3', class: "interaction-controls" }, h("slot", { key: 'f218de86f75106aab7b2a7c3b81b303a813cfcc3', name: "interaction-controls" })), expandable && (h("ic-tooltip", { key: '29ccf36efd77a936dd35fef1cc304f5ffdde47ea', id: "ic-tooltip-expand-button", label: "Toggle expandable area", silent: true }, h("button", { key: 'e25088479cfa1519d8ac728505138fb2730b0400', class: {
158
+ "toggle-button": true,
159
+ [`toggle-button-${this.areaExpanded ? "expanded" : "closed"}`]: true,
160
+ }, "aria-label": "Toggle expandable area", "aria-expanded": `${this.areaExpanded}`, "aria-controls": this.areaExpanded ? "expanded-content-area" : null, onClick: this.toggleExpanded, innerHTML: chevronIcon }))))), isSlotUsed(this.el, "expanded-content") && this.areaExpanded && (h("div", { key: '710a390ddcfd6464509e31a8bdc12213180a8e69', class: "expanded-content", id: "expanded-content-area" }, h("slot", { key: 'd315e1d72d612b75a04460d6a33a66a7f84f39c8', name: "expanded-content" }))), isSlotUsed(this.el, "badge") && h("slot", { key: '93bad888a177ab13ae50ea4d86fa6fd2c4ae01f7', name: "badge" }))));
161
+ }
162
+ get el() { return this; }
163
+ static get watchers() { return {
164
+ "disabled": ["watchDisabledHandler"]
165
+ }; }
166
+ static get style() { return IcCardVerticalStyle0; }
167
+ }, [1, "ic-card-vertical", {
168
+ "clickable": [1028],
169
+ "disabled": [4],
170
+ "expandable": [4],
171
+ "fullWidth": [4, "full-width"],
172
+ "heading": [1],
173
+ "href": [1],
174
+ "hreflang": [1],
175
+ "message": [1],
176
+ "referrerpolicy": [1],
177
+ "rel": [1],
178
+ "subheading": [1],
179
+ "target": [1],
180
+ "theme": [1025],
181
+ "areaExpanded": [32],
182
+ "isFocussed": [32],
183
+ "monochrome": [32],
184
+ "parentEl": [32],
185
+ "parentIsAnchorTag": [32],
186
+ "setFocus": [64]
187
+ }, [[2, "click", "handleHostClick"], [4, "brandChange", "brandChangeHandler"]], {
188
+ "disabled": ["watchDisabledHandler"]
189
+ }]);
190
+ function defineCustomElement$1() {
191
+ if (typeof customElements === "undefined") {
192
+ return;
193
+ }
194
+ const components = ["ic-card-vertical", "ic-tooltip", "ic-typography"];
195
+ components.forEach(tagName => { switch (tagName) {
196
+ case "ic-card-vertical":
197
+ if (!customElements.get(tagName)) {
198
+ customElements.define(tagName, CardVertical);
199
+ }
200
+ break;
201
+ case "ic-tooltip":
202
+ if (!customElements.get(tagName)) {
203
+ defineCustomElement$3();
204
+ }
205
+ break;
206
+ case "ic-typography":
207
+ if (!customElements.get(tagName)) {
208
+ defineCustomElement$2();
209
+ }
210
+ break;
211
+ } });
212
+ }
213
+
214
+ const IcCardVertical = CardVertical;
215
+ const defineCustomElement = defineCustomElement$1;
216
+
217
+ export { IcCardVertical, defineCustomElement };
218
+
219
+ //# sourceMappingURL=ic-card-vertical.js.map
@@ -0,0 +1 @@
1
+ {"file":"ic-card-vertical.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,44ZAA44Z,CAAC;AACv6Z,6BAAe,iBAAiB;;MC2CnB,YAAY;IALzB;;;;QAMU,yBAAoB,GAA4B,IAAI,CAAC;QAIpD,iBAAY,GAAY,KAAK,CAAC;QAC9B,eAAU,GAAY,KAAK,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,aAAQ,GAAuB,IAAI,CAAC;QACpC,sBAAiB,GAAY,KAAK,CAAC;;;;QAKnB,cAAS,GAAa,KAAK,CAAC;;;;QAK7C,aAAQ,GAAa,KAAK,CAAC;;;;QAS3B,eAAU,GAAa,KAAK,CAAC;;;;QAK7B,cAAS,GAAa,KAAK,CAAC;;;;QAe5B,aAAQ,GAAY,EAAE,CAAC;;;;QAKvB,YAAO,GAAY,EAAE,CAAC;;;;QAyBL,UAAK,GAAiB,SAAS,CAAC;QAkFjD,mBAAc,GAAG;YACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB,CAAC;QAEM,kBAAa,GAAG;YACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACzB,CAAC;QAcM,mBAAc,GAAG;YACvB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;SACxC,CAAC;KAoJH;IArTC,oBAAoB;QAClB,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,C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AC,kBAAkB,IAC3B,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,6DAAM,IAAI,EAAC,sBAAsB,GAAQ,CACrC,EACL,UAAU,KACT,mEACE,EAAE,EAAC,0BAA0B,EAC7B,KAAK,EAAC,wBAAwB,EAC9B,MAAM,UAEN,+DACE,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI;gBACrB,CAAC,iBACC,IAAI,CAAC,YAAY,GAAG,UAAU,GAAG,QACnC,EAAE,GAAG,IAAI;aACV,gBACU,wBAAwB,mBACpB,GAAG,IAAI,CAAC,YAAY,EAAE,mBAEnC,IAAI,CAAC,YAAY,GAAG,uBAAuB,GAAG,IAAI,EAEpD,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACd,CACC,CACd,CACG,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,KAC3D,4DAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB,IACtD,6DAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACjD,CACP,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-card-vertical/ic-card-vertical.css?tag=ic-card-vertical&encapsulation=shadow","src/components/ic-card-vertical/ic-card-vertical.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-card-text-primary) !important;\n}\n\na:visited {\n color: var(--ic-card-link-action-dark) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card {\n display: flex;\n flex-direction: column;\n border: var(--ic-space-1px) solid var(--ic-card-border-primary);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-card-text-primary);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: fit-content;\n height: fit-content;\n min-height: 100%;\n\n ::slotted(svg) {\n fill: var(--ic-card-icon);\n }\n\n &.monochrome {\n border: var(--ic-border-width) solid var(--ic-card-border-monochrome);\n }\n\n &.fullwidth {\n width: 100%;\n }\n\n &.clickable {\n &:hover {\n background-color: var(--ic-card-background-hover);\n border: var(--ic-space-1px) solid var(--ic-card-hover-border-color);\n cursor: pointer;\n }\n\n &.focussed,\n &:focus {\n background-color: var(--ic-card-background-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-space-1px) solid var(--ic-card-pressed-border-color);\n }\n\n &:active {\n background-color: var(--ic-card-background-pressed);\n box-shadow: var(--ic-border-focus);\n\n .card-title {\n text-decoration: none;\n }\n }\n\n .card-title {\n --ic-typography-color: var(--ic-card-clickable-text);\n\n color: var(--ic-card-clickable-text);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n margin-bottom: var(--ic-space-xxs);\n }\n\n .interaction-button,\n .icon {\n margin-bottom: var(--ic-space-xxs);\n }\n }\n\n &.disabled {\n border: var(--ic-space-1px) dashed var(--ic-card-disabled-border-color);\n\n .card-message,\n .subheading,\n .card-title {\n --ic-typography-color: var(--ic-card-disabled-text);\n }\n\n .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-card-disabled-text);\n color: var(--ic-card-disabled-text);\n }\n\n ::slotted(svg) {\n fill: var(--ic-card-icon-disabled);\n }\n }\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: 0 !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0.25rem !important;\n }\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n\n &:hover {\n background-color: var(--ic-card-background-hover);\n }\n\n &:focus {\n box-shadow: var(--ic-border-focus);\n }\n\n &:active:not(:focus) {\n background-color: var(--ic-card-background-pressed);\n }\n\n svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\n }\n}\n\n#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .card {\n ::slotted(svg) {\n fill: currentcolor;\n }\n\n &.disabled {\n border-color: GrayText !important;\n\n ::slotted(svg) {\n fill: GrayText !important;\n }\n\n .card-message,\n .subheading,\n .card-title {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n }\n }\n\n .toggle-button:focus,\n .toggle-button:hover {\n outline-color: Highlight;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .card,\n .toggle-button {\n transition: none;\n }\n}\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n Host,\n Watch,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getBrandFromContext,\n removeDisabledFalse,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot heading - Content will be placed at the top of the card to the right of the icon.\n * @slot message - Content will be placed in the main body of the card.\n * @slot subheading - Content will be placed below the card heading.\n * @slot adornment - Content will be placed below the card subheading.\n * @slot image-top - Content will be placed at the top of the card above all other content.\n * @slot image-mid - Content will be placed below the card heading section.\n * @slot icon - Content will be placed to the left of the card heading.\n * @slot interaction-button - Content will be placed in the top right corner of the heading section.\n * @slot interaction-controls - Content will be placed below the card message.\n * @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.\n * @slot badge - Badge component overlaying the top right of the card.\n */\n@Component({\n tag: \"ic-card-vertical\",\n styleUrl: \"ic-card-vertical.css\",\n shadow: true,\n})\nexport class CardVertical {\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcCardVerticalElement;\n\n @State() areaExpanded: boolean = false;\n @State() isFocussed: boolean = false;\n @State() monochrome: boolean = false;\n @State() parentEl: HTMLElement | null = null;\n @State() parentIsAnchorTag: boolean = false;\n\n /**\n * If `true`, the card will be a clickable variant, instead of static.\n */\n @Prop({ mutable: true }) clickable?: boolean = false;\n\n /**\n * If `true`, the card will be disabled if it is clickable.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the card will have an expandable area and expansion toggle button.\n */\n @Prop() expandable?: boolean = false;\n\n /**\n * If `true`, the card will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The heading for the card. This is required, unless a slotted heading is used.\n */\n @Prop() heading?: string;\n\n /**\n * The URL that the clickable card link points to. If set, the clickable card will render as an \"a\" tag, otherwise it will render as a button.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * The main body message of the card.\n */\n @Prop() message?: string = \"\";\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The subheading for the card.\n */\n @Prop() subheading?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop({ mutable: true }) theme?: IcThemeMode = \"inherit\";\n\n disconnectedCallback(): void {\n if (this.parentEl && this.parentIsAnchorTag) {\n this.parentEl.removeEventListener(\"focus\", this.parentFocussed);\n this.parentEl.removeEventListener(\"blur\", this.parentBlurred);\n }\n\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.parentEl = this.el.parentElement;\n\n if (this.parentEl?.tagName === \"A\") {\n this.clickable = true;\n this.parentIsAnchorTag = true;\n this.parentEl.classList.add(\"ic-card-wrapper-link\");\n this.parentEl.addEventListener(\"focus\", this.parentFocussed);\n this.parentEl.addEventListener(\"blur\", this.parentBlurred);\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Card\"\n );\n this.updateTheme();\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(\n mutationList,\n [\n \"message\",\n \"adornment\",\n \"expanded-content\",\n \"image-top\",\n \"image-mid\",\n \"icon\",\n \"interaction-button\",\n \"badge\",\n \"interaction-controls\",\n ],\n this\n )\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (this.disabled) {\n event.stopImmediatePropagation();\n }\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.updateTheme(ev.detail.mode);\n }\n\n /**\n * Sets focus on the card.\n */\n @Method()\n async setFocus(): Promise<void> {\n const shadowRoot = this.el.shadowRoot;\n\n if (shadowRoot) {\n if (shadowRoot.querySelector(\"a\")) {\n shadowRoot.querySelector(\"a\")?.focus();\n } else if (shadowRoot.querySelector(\"button\")) {\n shadowRoot.querySelector(\"button\")?.focus();\n }\n }\n }\n\n private parentFocussed = (): void => {\n this.isFocussed = true;\n };\n\n private parentBlurred = (): void => {\n this.isFocussed = false;\n };\n\n private updateTheme(mode: IcBrandForeground | null = null): void {\n const foregroundColor = getBrandFromContext(this.el, mode);\n\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.monochrome = true;\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n }\n }\n\n private toggleExpanded = (): void => {\n this.areaExpanded = !this.areaExpanded;\n };\n\n render() {\n const {\n clickable,\n disabled,\n expandable,\n fullWidth,\n heading,\n isFocussed,\n message,\n monochrome,\n href,\n hreflang,\n parentIsAnchorTag,\n referrerpolicy,\n rel,\n subheading,\n target,\n theme,\n } = this;\n\n const Component =\n parentIsAnchorTag || !clickable\n ? \"div\"\n : href === undefined\n ? \"button\"\n : \"a\";\n\n const attrs = Component == \"a\" && {\n href: href,\n hrefLang: hreflang,\n referrerPolicy: referrerpolicy,\n rel: rel,\n target: target,\n };\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <Component\n class={{\n card: true,\n clickable: !!clickable && !disabled,\n disabled: !!disabled,\n fullwidth: !!fullWidth,\n focussed: isFocussed,\n monochrome: monochrome,\n }}\n tabindex={clickable && !parentIsAnchorTag ? 0 : undefined}\n aria-disabled={disabled ? \"true\" : null}\n disabled={disabled}\n {...attrs}\n >\n {isSlotUsed(this.el, \"image-top\") && (\n <div class=\"image-top\">\n <slot name=\"image-top\"></slot>\n </div>\n )}\n <div class=\"card-header\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <div class=\"card-title\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">\n <p>{heading}</p>\n </ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"interaction-button\") && (\n <div class=\"interaction-button\">\n <slot name=\"interaction-button\"></slot>\n </div>\n )}\n </div>\n {(subheading || isSlotUsed(this.el, \"subheading\")) && (\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">\n {subheading}\n </ic-typography>\n </slot>\n </div>\n )}\n {isSlotUsed(this.el, \"adornment\") && (\n <div class=\"adornment\">\n <slot name=\"adornment\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"image-mid\") && (\n <div class=\"image-mid\">\n <slot name=\"image-mid\"></slot>\n </div>\n )}\n {(message || isSlotUsed(this.el, \"message\")) && (\n <div class=\"card-message\">\n {message && (\n <ic-typography variant=\"body\">{message}</ic-typography>\n )}\n {isSlotUsed(this.el, \"message\") && <slot name=\"message\"></slot>}\n </div>\n )}\n {(isSlotUsed(this.el, \"interaction-controls\") || expandable) && (\n <div class=\"interaction-area\">\n <div class=\"interaction-controls\">\n <slot name=\"interaction-controls\"></slot>\n </div>\n {expandable && (\n <ic-tooltip\n id=\"ic-tooltip-expand-button\"\n label=\"Toggle expandable area\"\n silent\n >\n <button\n class={{\n \"toggle-button\": true,\n [`toggle-button-${\n this.areaExpanded ? \"expanded\" : \"closed\"\n }`]: true,\n }}\n aria-label=\"Toggle expandable area\"\n aria-expanded={`${this.areaExpanded}`}\n aria-controls={\n this.areaExpanded ? \"expanded-content-area\" : null\n }\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )}\n {isSlotUsed(this.el, \"expanded-content\") && this.areaExpanded && (\n <div class=\"expanded-content\" id=\"expanded-content-area\">\n <slot name=\"expanded-content\"></slot>\n </div>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Component>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface IcCheckboxGroup extends Components.IcCheckboxGroup, HTMLElement {}
4
+ export const IcCheckboxGroup: {
5
+ prototype: IcCheckboxGroup;
6
+ new (): IcCheckboxGroup;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,198 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { r as removeDisabledFalse, o as onComponentRequiredPropUndefined, w as getInputDescribedByText, x as hasValidationStatus } from './helpers.js';
3
+ import { d as defineCustomElement$4 } from './ic-input-label2.js';
4
+ import { d as defineCustomElement$3 } from './ic-input-validation2.js';
5
+ import { d as defineCustomElement$2 } from './ic-typography2.js';
6
+
7
+ const icCheckboxGroupCss = "/*! 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-text-color:var(--ic-checkbox-group-label);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle);--ic-input-validation-error:var(--ic-checkbox-state-icon-error);--ic-input-validation-status-text-color:var(--ic-checkbox-state-text)}:host(.ic-checkbox-group-disabled){--ic-input-label-text-color:var(--ic-checkbox-group-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-checkbox-group-subtitle-disabled\n )}ic-input-label.error{color:var(--ic-checkbox-group-label-error);--ic-typography-color:var(--ic-checkbox-group-label-error);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle-error)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-large) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) * 1.5)}ic-input-label .helpertext{display:block}ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) * 1.5)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.ic-checkbox-group-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}.screen-reader-only-text:dir(rtl){right:-9999px}";
8
+ const IcCheckboxGroupStyle0 = icCheckboxGroupCss;
9
+
10
+ const CHECKBOX_SELECTOR = "ic-checkbox";
11
+ const CheckboxGroup = /*@__PURE__*/ proxyCustomElement(class CheckboxGroup extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ this.icChange = createEvent(this, "icChange", 7);
17
+ /**
18
+ * If `true`, the checkbox group will be set to the disabled state.
19
+ */
20
+ this.disabled = false;
21
+ /**
22
+ * The helper text that will be displayed for additional field guidance.
23
+ */
24
+ this.helperText = "";
25
+ /**
26
+ * If `true`, the label will be hidden and the required label value will be applied as an aria-label.
27
+ */
28
+ this.hideLabel = false;
29
+ /**
30
+ * If `true`, the checkbox group will require a value.
31
+ */
32
+ this.required = false;
33
+ /**
34
+ * The size of the checkboxes to be displayed. This does not affect the font size of the label.
35
+ */
36
+ this.size = "medium";
37
+ /**
38
+ * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
39
+ */
40
+ this.theme = "inherit";
41
+ /**
42
+ * The value of the `aria-live` attribute on the validation message.
43
+ */
44
+ this.validationAriaLive = "polite";
45
+ /**
46
+ * The validation status - e.g. 'error' | 'warning' | 'success'.
47
+ */
48
+ this.validationStatus = "";
49
+ /**
50
+ * The text to display as the validation message.
51
+ */
52
+ this.validationText = "";
53
+ this.setCheckboxProps = () => {
54
+ this.checkboxes = Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR));
55
+ this.checkboxes.forEach((checkbox) => {
56
+ if (!checkbox.disabled) {
57
+ checkbox.disabled = this.disabled;
58
+ }
59
+ if (!checkbox.size) {
60
+ checkbox.size = this.size;
61
+ }
62
+ });
63
+ };
64
+ }
65
+ watchDisabledHandler() {
66
+ this.checkboxes.forEach((checkbox) => {
67
+ checkbox.disabled = this.disabled;
68
+ });
69
+ removeDisabledFalse(this.disabled, this.el);
70
+ }
71
+ labelNameHandler(newValue, oldValue, propName) {
72
+ Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach((checkbox) => {
73
+ if (propName === "label")
74
+ checkbox.groupLabel = newValue;
75
+ else if (checkbox.name === oldValue) {
76
+ // If the checkbox name has been set by the parent, then override it
77
+ checkbox.name = newValue;
78
+ }
79
+ });
80
+ }
81
+ watchSizeHandler() {
82
+ this.checkboxes.forEach((checkbox) => {
83
+ checkbox.size = this.size;
84
+ });
85
+ }
86
+ watchThemeHandler(newValue) {
87
+ Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach((checkbox) => {
88
+ checkbox.theme = newValue;
89
+ });
90
+ }
91
+ handleChange(ev) {
92
+ //don't pass on the event if it has come from slotted text field
93
+ //otherwise any icChange handler bound to the checkbox group will also run
94
+ if (ev.target.tagName === "IC-TEXT-FIELD") {
95
+ ev.stopImmediatePropagation();
96
+ }
97
+ }
98
+ componentWillLoad() {
99
+ this.setCheckboxProps();
100
+ removeDisabledFalse(this.disabled, this.el);
101
+ this.watchThemeHandler(this.theme);
102
+ }
103
+ componentDidLoad() {
104
+ onComponentRequiredPropUndefined([
105
+ { prop: this.label, propName: "label" },
106
+ { prop: this.name, propName: "name" },
107
+ ], "Checkbox Group");
108
+ }
109
+ selectHandler({ target }) {
110
+ const checkedOptions = Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).filter(({ checked, disabled }) => checked && !disabled);
111
+ this.icChange.emit({
112
+ value: checkedOptions.map(({ value }) => value),
113
+ checkedOptions: checkedOptions.map((opt) => {
114
+ var _a;
115
+ return ({
116
+ checkbox: opt,
117
+ textFieldValue: (_a = opt.querySelector("ic-text-field")) === null || _a === void 0 ? void 0 : _a.value,
118
+ });
119
+ }),
120
+ selectedOption: target,
121
+ });
122
+ }
123
+ render() {
124
+ const { disabled, helperText, hideLabel, label, name, required, size, theme, validationAriaLive, validationStatus, validationText, } = this;
125
+ const describedBy = getInputDescribedByText(this.el, name, helperText !== "", validationStatus !== "");
126
+ const renderSRText = validationStatus === "error" || required || hideLabel;
127
+ const showValidation = hasValidationStatus(validationStatus, disabled);
128
+ return (h(Host, { key: '341fdb8e66b7d26e12cf7fc3f20a155496b79786', class: {
129
+ "ic-checkbox-group-disabled": !!disabled,
130
+ [`ic-checkbox-group-${size}`]: true,
131
+ [`ic-theme-${theme}`]: theme !== "inherit",
132
+ } }, renderSRText && (h("span", { key: '03c4ba0d42664b8b90b24b03d706511f0ba88137', id: "screenReaderOnlyText", class: "screen-reader-only-text", "aria-hidden": "true" }, label, " ", validationStatus === "error" ? "invalid data " : null, " ", required ? "required" : null)), h("fieldset", { key: '0c82676c357846ed04d71e7585ddb30474512c68', id: name, "aria-labelledby": `${renderSRText ? "screenReaderOnlyText" : ""} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (h("legend", { key: 'fa68b7a637731d3e372b67517e771c9a615491d8' }, h("ic-input-label", { key: 'aa1c65aa095273d12eaa48a985a460612774e0c0', class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, useLabelTag: false }, h("slot", { key: '273f50debbf2dd7d9be6285e4e7e937dc228e12c', name: "label", slot: "label" }), h("slot", { key: '508f4ca3cceb525b716fcbc4fe3467958d896b26', name: "helper-text", slot: "helper-text" })))), h("div", { key: 'ca304d719a39151857515e0082add76e00c659ab', class: "checkboxes-container" }, h("slot", { key: '948d2e299d90127031d0f0b28337db373a689f63' }))), h("ic-input-validation", { key: '81b3ec6068f5e14eb4b4b3d6aeecbbc87b248223', class: {
133
+ "show-validation": showValidation,
134
+ }, for: name, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "" })));
135
+ }
136
+ get el() { return this; }
137
+ static get watchers() { return {
138
+ "disabled": ["watchDisabledHandler"],
139
+ "label": ["labelNameHandler"],
140
+ "name": ["labelNameHandler"],
141
+ "size": ["watchSizeHandler"],
142
+ "theme": ["watchThemeHandler"]
143
+ }; }
144
+ static get style() { return IcCheckboxGroupStyle0; }
145
+ }, [1, "ic-checkbox-group", {
146
+ "disabled": [4],
147
+ "helperText": [1, "helper-text"],
148
+ "hideLabel": [4, "hide-label"],
149
+ "label": [1],
150
+ "name": [1],
151
+ "required": [4],
152
+ "size": [1],
153
+ "theme": [1],
154
+ "validationAriaLive": [1, "validation-aria-live"],
155
+ "validationStatus": [1, "validation-status"],
156
+ "validationText": [1, "validation-text"]
157
+ }, [[0, "icChange", "handleChange"], [0, "icCheck", "selectHandler"]], {
158
+ "disabled": ["watchDisabledHandler"],
159
+ "label": ["labelNameHandler"],
160
+ "name": ["labelNameHandler"],
161
+ "size": ["watchSizeHandler"],
162
+ "theme": ["watchThemeHandler"]
163
+ }]);
164
+ function defineCustomElement$1() {
165
+ if (typeof customElements === "undefined") {
166
+ return;
167
+ }
168
+ const components = ["ic-checkbox-group", "ic-input-label", "ic-input-validation", "ic-typography"];
169
+ components.forEach(tagName => { switch (tagName) {
170
+ case "ic-checkbox-group":
171
+ if (!customElements.get(tagName)) {
172
+ customElements.define(tagName, CheckboxGroup);
173
+ }
174
+ break;
175
+ case "ic-input-label":
176
+ if (!customElements.get(tagName)) {
177
+ defineCustomElement$4();
178
+ }
179
+ break;
180
+ case "ic-input-validation":
181
+ if (!customElements.get(tagName)) {
182
+ defineCustomElement$3();
183
+ }
184
+ break;
185
+ case "ic-typography":
186
+ if (!customElements.get(tagName)) {
187
+ defineCustomElement$2();
188
+ }
189
+ break;
190
+ } });
191
+ }
192
+
193
+ const IcCheckboxGroup = CheckboxGroup;
194
+ const defineCustomElement = defineCustomElement$1;
195
+
196
+ export { IcCheckboxGroup, defineCustomElement };
197
+
198
+ //# sourceMappingURL=ic-checkbox-group.js.map
@@ -0,0 +1 @@
1
+ {"file":"ic-checkbox-group.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,qpIAAqpI,CAAC;AACjrI,8BAAe,kBAAkB;;ACwBjC,MAAM,iBAAiB,GAAG,aAAa,CAAC;MAW3B,aAAa;IAL1B;;;;;;;;QAaU,aAAQ,GAAY,KAAK,CAAC;;;;QAY1B,eAAU,GAAW,EAAE,CAAC;;;;QAKxB,cAAS,GAAY,KAAK,CAAC;;;;QAiC3B,aAAQ,GAAY,KAA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GAAG,sBAAsB,GAAG,EAC1C,IAAI,WAAW,EAAE,CAAC,IAAI,EAAE,EACxB,QAAQ,EAAE,QAAQ,IAEjB,CAAC,SAAS,KACT,iEACE,uEACE,KAAK,EAAE,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,IAAI,EAAE,EACxC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,KAAK,IAElB,6DAAM,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,GAAQ,EACvC,6DAAM,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,GAAQ,CACpC,CACV,CACV,EACD,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,8DAAa,CACT,CACG,EACX,4EACE,KAAK,EAAE;gBACL,iBAAiB,EAAE,cAAc;aAClC,EACD,GAAG,EAAE,IAAI,EACT,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,cAAc,GAAG,gBAAgB,GAAG,EAAE,EAC9C,OAAO,EAAE,cAAc,GAAG,cAAc,GAAG,EAAE,GACxB,CAClB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n\n --ic-input-label-text-color: var(--ic-checkbox-group-label);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle);\n --ic-input-validation-error: var(--ic-checkbox-state-icon-error);\n --ic-input-validation-status-text-color: var(--ic-checkbox-state-text);\n}\n\n:host(.ic-checkbox-group-disabled) {\n --ic-input-label-text-color: var(--ic-checkbox-group-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-checkbox-group-subtitle-disabled\n );\n}\n\nic-input-label.error {\n color: var(--ic-checkbox-group-label-error);\n\n --ic-typography-color: var(--ic-checkbox-group-label-error);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle-error);\n}\n\nic-input-label:not(.with-helper) .ic-typography-label,\nic-input-label .helpertext {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-small) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-large) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) * 1.5);\n}\n\nic-input-label .helpertext {\n display: block;\n}\n\nic-input-validation.show-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) * 1.5);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-checkbox-group-small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n\n.screen-reader-only-text:dir(rtl) {\n right: -9999px;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcAriaLive,\n IcInformationStatusOrEmpty,\n IcSizes,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\nconst CHECKBOX_SELECTOR = \"ic-checkbox\";\n\n/**\n * @slot helper-text - Content is set as the helper text for the checkbox group.\n * @slot label - Content is placed as the label text.\n */\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\nexport class CheckboxGroup {\n private checkboxes: HTMLIcCheckboxElement[];\n\n @Element() el: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n this.checkboxes.forEach((checkbox) => {\n checkbox.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n @Watch(\"label\")\n @Watch(\"name\")\n labelNameHandler(\n newValue: string,\n oldValue: string,\n propName: \"label\" | \"name\"\n ): void {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach(\n (checkbox) => {\n if (propName === \"label\") checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n }\n );\n }\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size: IcSizes = \"medium\";\n @Watch(\"size\")\n watchSizeHandler(): void {\n this.checkboxes.forEach((checkbox) => {\n checkbox.size = this.size;\n });\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(newValue: IcThemeMode): void {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach(\n (checkbox) => {\n checkbox.theme = newValue;\n }\n );\n }\n\n /**\n * The value of the `aria-live` attribute on the validation message.\n */\n @Prop() validationAriaLive: IcAriaLive = \"polite\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icChange\")\n handleChange(ev: CustomEvent): void {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if ((ev.target as HTMLElement).tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n\n componentWillLoad(): void {\n this.setCheckboxProps();\n removeDisabledFalse(this.disabled, this.el);\n this.watchThemeHandler(this.theme);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler({ target }: CustomEvent): void {\n const checkedOptions = Array.from(\n this.el.querySelectorAll(CHECKBOX_SELECTOR)\n ).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: target as HTMLIcCheckboxElement,\n });\n }\n\n private setCheckboxProps = () => {\n this.checkboxes = Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR));\n\n this.checkboxes.forEach((checkbox) => {\n if (!checkbox.disabled) {\n checkbox.disabled = this.disabled;\n }\n if (!checkbox.size) {\n checkbox.size = this.size;\n }\n });\n };\n\n render() {\n const {\n disabled,\n helperText,\n hideLabel,\n label,\n name,\n required,\n size,\n theme,\n validationAriaLive,\n validationStatus,\n validationText,\n } = this;\n\n const describedBy = getInputDescribedByText(\n this.el,\n name,\n helperText !== \"\",\n validationStatus !== \"\"\n );\n\n const renderSRText = validationStatus === \"error\" || required || hideLabel;\n\n const showValidation = hasValidationStatus(validationStatus, disabled);\n\n return (\n <Host\n class={{\n \"ic-checkbox-group-disabled\": !!disabled,\n [`ic-checkbox-group-${size}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n {renderSRText && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {label} {validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={name}\n aria-labelledby={`${\n renderSRText ? \"screenReaderOnlyText\" : \"\"\n } ${describedBy}`.trim()}\n disabled={disabled}\n >\n {!hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${validationStatus}`]: true }}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n useLabelTag={false}\n >\n <slot name=\"label\" slot=\"label\"></slot>\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n <ic-input-validation\n class={{\n \"show-validation\": showValidation,\n }}\n for={name}\n ariaLiveMode={validationAriaLive}\n status={showValidation ? validationStatus : \"\"}\n message={showValidation ? validationText : \"\"}\n ></ic-input-validation>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface IcCheckbox extends Components.IcCheckbox, HTMLElement {}
4
+ export const IcCheckbox: {
5
+ prototype: IcCheckbox;
6
+ new (): IcCheckbox;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;