@ukic/canary-web-components 2.0.0-canary.16 → 2.0.0-canary.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -1
  3. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-checkbox.cjs.entry.js +18 -5
  7. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-data-table.cjs.entry.js +32 -28
  9. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-empty-state_2.cjs.entry.js +67 -113
  13. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-menu.cjs.entry.js +5 -7
  16. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-stepper.cjs.entry.js +29 -8
  27. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-tab-context.cjs.entry.js +8 -0
  29. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-toast.cjs.entry.js +6 -0
  32. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -2
  36. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  37. package/dist/cjs/loader.cjs.js +1 -1
  38. package/dist/collection/components/ic-data-table/ic-data-table.css +0 -4
  39. package/dist/collection/components/ic-data-table/ic-data-table.js +34 -29
  40. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  41. package/dist/collection/components/ic-data-table/story-data.js +22 -0
  42. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  43. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +67 -113
  44. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  45. package/dist/components/ic-back-to-top.js +2 -1
  46. package/dist/components/ic-back-to-top.js.map +1 -1
  47. package/dist/components/ic-button2.js +1 -1
  48. package/dist/components/ic-button2.js.map +1 -1
  49. package/dist/components/ic-checkbox.js +25 -7
  50. package/dist/components/ic-checkbox.js.map +1 -1
  51. package/dist/components/ic-data-table.js +32 -28
  52. package/dist/components/ic-data-table.js.map +1 -1
  53. package/dist/components/ic-dialog.js +1 -1
  54. package/dist/components/ic-dialog.js.map +1 -1
  55. package/dist/components/ic-input-label2.js.map +1 -1
  56. package/dist/components/ic-menu2.js +5 -7
  57. package/dist/components/ic-menu2.js.map +1 -1
  58. package/dist/components/ic-navigation-item.js +1 -1
  59. package/dist/components/ic-navigation-item.js.map +1 -1
  60. package/dist/components/ic-pagination-bar2.js +67 -113
  61. package/dist/components/ic-pagination-bar2.js.map +1 -1
  62. package/dist/components/ic-radio-option.js +1 -1
  63. package/dist/components/ic-radio-option.js.map +1 -1
  64. package/dist/components/ic-section-container2.js +1 -1
  65. package/dist/components/ic-section-container2.js.map +1 -1
  66. package/dist/components/ic-side-navigation.js +1 -1
  67. package/dist/components/ic-side-navigation.js.map +1 -1
  68. package/dist/components/ic-step.js.map +1 -1
  69. package/dist/components/ic-stepper.js +32 -8
  70. package/dist/components/ic-stepper.js.map +1 -1
  71. package/dist/components/ic-tab-context.js +9 -0
  72. package/dist/components/ic-tab-context.js.map +1 -1
  73. package/dist/components/ic-tab.js.map +1 -1
  74. package/dist/components/ic-toast.js +9 -1
  75. package/dist/components/ic-toast.js.map +1 -1
  76. package/dist/components/ic-toggle-button-group.js +1 -1
  77. package/dist/components/ic-toggle-button-group.js.map +1 -1
  78. package/dist/components/ic-toggle-button.js +4 -2
  79. package/dist/components/ic-toggle-button.js.map +1 -1
  80. package/dist/core/core.esm.js +1 -1
  81. package/dist/core/core.esm.js.map +1 -1
  82. package/dist/core/p-06e0b5b6.entry.js +2 -0
  83. package/dist/core/p-06e0b5b6.entry.js.map +1 -0
  84. package/dist/core/p-1fb48c84.entry.js.map +1 -1
  85. package/dist/core/p-303dc008.entry.js.map +1 -1
  86. package/dist/core/{p-ff697d68.entry.js → p-4c92a3dd.entry.js} +2 -2
  87. package/dist/core/p-4c92a3dd.entry.js.map +1 -0
  88. package/dist/core/p-52d5a3a5.entry.js +2 -0
  89. package/dist/core/p-52d5a3a5.entry.js.map +1 -0
  90. package/dist/core/{p-5a5a52d3.entry.js → p-5dfd9074.entry.js} +2 -2
  91. package/dist/core/p-5dfd9074.entry.js.map +1 -0
  92. package/dist/core/p-5fa17f98.entry.js +2 -0
  93. package/dist/core/p-5fa17f98.entry.js.map +1 -0
  94. package/dist/core/{p-e79e0292.entry.js → p-6358925c.entry.js} +2 -2
  95. package/dist/core/p-6358925c.entry.js.map +1 -0
  96. package/dist/core/p-70d734d4.entry.js +2 -0
  97. package/dist/core/p-70d734d4.entry.js.map +1 -0
  98. package/dist/core/p-79fa2f57.entry.js +2 -0
  99. package/dist/core/p-79fa2f57.entry.js.map +1 -0
  100. package/dist/core/{p-bbb1ce94.entry.js → p-8237cd57.entry.js} +2 -2
  101. package/dist/core/p-8237cd57.entry.js.map +1 -0
  102. package/dist/core/{p-d79bfead.entry.js → p-90992051.entry.js} +2 -2
  103. package/dist/core/{p-d79bfead.entry.js.map → p-90992051.entry.js.map} +1 -1
  104. package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
  105. package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
  106. package/dist/core/{p-940de102.entry.js → p-a0aa587b.entry.js} +2 -2
  107. package/dist/core/p-a0aa587b.entry.js.map +1 -0
  108. package/dist/core/p-a1df23b4.entry.js.map +1 -1
  109. package/dist/core/{p-450f72b2.entry.js → p-c292fd86.entry.js} +2 -2
  110. package/dist/core/p-c292fd86.entry.js.map +1 -0
  111. package/dist/core/p-d08f4fa7.entry.js +2 -0
  112. package/dist/core/p-d08f4fa7.entry.js.map +1 -0
  113. package/dist/core/p-d2d40668.entry.js +2 -0
  114. package/dist/core/p-d2d40668.entry.js.map +1 -0
  115. package/dist/core/p-dbbce628.entry.js +2 -0
  116. package/dist/core/p-dbbce628.entry.js.map +1 -0
  117. package/dist/esm/core.js +1 -1
  118. package/dist/esm/ic-back-to-top.entry.js +2 -1
  119. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  120. package/dist/esm/ic-button_3.entry.js +1 -1
  121. package/dist/esm/ic-button_3.entry.js.map +1 -1
  122. package/dist/esm/ic-checkbox.entry.js +18 -5
  123. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  124. package/dist/esm/ic-data-table.entry.js +32 -28
  125. package/dist/esm/ic-data-table.entry.js.map +1 -1
  126. package/dist/esm/ic-dialog.entry.js +1 -1
  127. package/dist/esm/ic-dialog.entry.js.map +1 -1
  128. package/dist/esm/ic-empty-state_2.entry.js +67 -113
  129. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  130. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  131. package/dist/esm/ic-menu.entry.js +5 -7
  132. package/dist/esm/ic-menu.entry.js.map +1 -1
  133. package/dist/esm/ic-navigation-item.entry.js +1 -1
  134. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  135. package/dist/esm/ic-radio-option.entry.js +1 -1
  136. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  137. package/dist/esm/ic-section-container.entry.js +1 -1
  138. package/dist/esm/ic-section-container.entry.js.map +1 -1
  139. package/dist/esm/ic-side-navigation.entry.js +1 -1
  140. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  141. package/dist/esm/ic-step.entry.js.map +1 -1
  142. package/dist/esm/ic-stepper.entry.js +29 -8
  143. package/dist/esm/ic-stepper.entry.js.map +1 -1
  144. package/dist/esm/ic-tab-context.entry.js +8 -0
  145. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  146. package/dist/esm/ic-tab.entry.js.map +1 -1
  147. package/dist/esm/ic-toast.entry.js +6 -0
  148. package/dist/esm/ic-toast.entry.js.map +1 -1
  149. package/dist/esm/ic-toggle-button-group.entry.js +1 -1
  150. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  151. package/dist/esm/ic-toggle-button.entry.js +4 -2
  152. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  153. package/dist/esm/loader.js +1 -1
  154. package/dist/types/components/ic-data-table/ic-data-table.d.ts +8 -5
  155. package/dist/types/components/ic-data-table/story-data.d.ts +1 -0
  156. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +7 -8
  157. package/dist/types/components.d.ts +2 -2
  158. package/hydrate/index.js +185 -173
  159. package/package.json +3 -3
  160. package/dist/core/p-20f244ad.entry.js +0 -2
  161. package/dist/core/p-20f244ad.entry.js.map +0 -1
  162. package/dist/core/p-25bbf4be.entry.js +0 -2
  163. package/dist/core/p-25bbf4be.entry.js.map +0 -1
  164. package/dist/core/p-450f72b2.entry.js.map +0 -1
  165. package/dist/core/p-53aeca18.entry.js +0 -2
  166. package/dist/core/p-53aeca18.entry.js.map +0 -1
  167. package/dist/core/p-5a5a52d3.entry.js.map +0 -1
  168. package/dist/core/p-895472da.entry.js +0 -2
  169. package/dist/core/p-895472da.entry.js.map +0 -1
  170. package/dist/core/p-940de102.entry.js.map +0 -1
  171. package/dist/core/p-b4949e9a.entry.js +0 -2
  172. package/dist/core/p-b4949e9a.entry.js.map +0 -1
  173. package/dist/core/p-b94ef8de.entry.js +0 -2
  174. package/dist/core/p-b94ef8de.entry.js.map +0 -1
  175. package/dist/core/p-bbb1ce94.entry.js.map +0 -1
  176. package/dist/core/p-bda7d350.entry.js +0 -2
  177. package/dist/core/p-bda7d350.entry.js.map +0 -1
  178. package/dist/core/p-d6ad82d8.entry.js +0 -2
  179. package/dist/core/p-d6ad82d8.entry.js.map +0 -1
  180. package/dist/core/p-e79e0292.entry.js.map +0 -1
  181. package/dist/core/p-ff697d68.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["icToggleButtonCss","ToggleButton","constructor","hostRef","this","handleFocus","ev","stopImmediatePropagation","handleClick","loading","disabled","icToggleChecked","emit","checked","toggleChecked","accessibleLabel","undefined","appearance","fullWidth","iconPlacement","label","size","variant","componentWillLoad","removeDisabledFalse","el","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleHostClick","e","render","h","Host","class","onFocus","toString","onClick","title","isSlotUsed","name","slot","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.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/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n );\n}\n\n:host(.dark) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n );\n}\n\n:host(.light) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n );\n}\n\n:host(.disabled) {\n --button-border: var(--toggle-button-border, var(--ic-border-disabled));\n}\n\n:host(.expand-toggle-group-child) ::part(button) {\n width: 100%;\n min-height: inherit;\n white-space: inherit;\n height: inherit;\n}\n\n:host(.expand-toggle-group-child) ic-button {\n min-width: 100%;\n min-height: 100%;\n white-space: normal;\n height: 100%;\n}\n\n:host(.expand-toggle-group-child) ::part(button):focus,\n:host(.expand-toggle-group-child.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus);\n}\n\n:host(.expand-toggle-group-child.light) ::part(button):focus,\n:host(.expand-toggle-group-child.dark) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus);\n}\n\n:host(:focus) {\n z-index: 1;\n}\n\n:host ::part(button) {\n border: var(--button-border);\n}\n\n:host(.checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.checked) ::part(button):active,\n:host(.icon.checked) ::part(button):active {\n background-color: var(--ic-action-default-active);\n}\n\n:host(.dark.checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.dark.checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.dark.checked) ::part(button):active,\n:host(.icon.dark.checked) ::part(button):active {\n background-color: var(--ic-action-dark-active);\n}\n\n:host(.light.checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-primary-text);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.light.checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.light.checked) ::part(button):active,\n:host(.icon.light.checked) ::part(button):active {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.light.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.disabled) ::part(button),\n:host(.icon.disabled) ::part(button) {\n border: var(--button-border);\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button) {\n background-color: transparent;\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.icon) ::part(button) {\n border: var(--button-border);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.icon.dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.icon.light) ::part(button):active {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.icon.small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.icon.large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.checked.loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.checked.loading.light) ::part(button) {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.checked.loading.dark) ::part(button) {\n background-color: var(--ic-action-dark-active);\n}\n\n@media (forced-colors: active) {\n :host(.checked) ::part(button),\n :host(.checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.light) ::part(button),\n :host(.checked.light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.dark) ::part(button),\n :host(.checked.dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\nexport class ToggleButton {\n constructor() {\n this.handleFocus = (ev) => {\n ev.stopImmediatePropagation();\n };\n this.handleClick = () => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.toggleChecked,\n });\n };\n this.accessibleLabel = undefined;\n this.appearance = \"default\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.label = undefined;\n this.loading = false;\n this.size = \"default\";\n this.toggleChecked = false;\n this.variant = \"default\";\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ], \"Toggle button\");\n }\n handleHostClick(e) {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n else if (!this.loading) {\n this.toggleChecked = !this.toggleChecked;\n }\n }\n render() {\n return (h(Host, { class: {\n [\"disabled\"]: this.disabled,\n [\"checked\"]: this.toggleChecked,\n [`${this.appearance}`]: true,\n [\"icon\"]: this.variant === \"icon\",\n [`${this.size}`]: true,\n [\"loading\"]: this.loading,\n }, onFocus: this.handleFocus }, h(\"ic-button\", { \"aria-pressed\": this.toggleChecked.toString(), variant: this.variant === \"icon\" ? \"icon\" : \"secondary\", onClick: this.handleClick, title: this.accessibleLabel, \"aria-label\": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.toggleChecked ? \"ticked\" : \"unticked\"}`, disabled: this.disabled, appearance: this.appearance, size: this.size, fullWidth: this.fullWidth, loading: this.loading, \"aria-disabled\": `${this.disabled}` }, this.variant !== \"icon\" && this.label, h(\"slot\", null), isSlotUsed(this.el, \"icon\") && (h(\"slot\", { name: \"icon\", slot: `${this.iconPlacement ? `${this.iconPlacement}-icon` : \"icon\"}` })), isSlotUsed(this.el, \"badge\") && (h(\"slot\", { name: \"badge\", slot: \"badge\" })))));\n }\n static get is() { return \"ic-toggle-button\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\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 accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the toggle button.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\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 toggle button will be in disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\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 toggle button will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icon in relation to the toggle button label.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"label\": {\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 label to display in the toggle button. This is required for the default variant of toggle buttons.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"loading\": {\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 toggle button will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle button to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"toggleChecked\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in a checked state.\"\n },\n \"attribute\": \"toggle-checked\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icToggleChecked\",\n \"name\": \"icToggleChecked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the user clicks a toggle button.\"\n },\n \"complexType\": {\n \"original\": \"{\\n checked: boolean;\\n }\",\n \"resolved\": \"{ checked: boolean; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleHostClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button.js.map\n"],"mappings":"0IAAA,MAAMA,EAAoB,gmN,MCMbC,EAAY,MACrB,WAAAC,CAAAC,G,2DACIC,KAAKC,YAAeC,IAChBA,EAAGC,0BAA0B,EAEjCH,KAAKI,YAAc,MACdJ,KAAKK,UACDL,KAAKM,UACNN,KAAKO,gBAAgBC,KAAK,CACtBC,QAAST,KAAKU,eAChB,EAEVV,KAAKW,gBAAkBC,UACvBZ,KAAKa,WAAa,UAClBb,KAAKM,SAAW,MAChBN,KAAKc,UAAY,MACjBd,KAAKe,cAAgBH,UACrBZ,KAAKgB,MAAQJ,UACbZ,KAAKK,QAAU,MACfL,KAAKiB,KAAO,UACZjB,KAAKU,cAAgB,MACrBV,KAAKkB,QAAU,S,CAEnB,iBAAAC,GACIC,EAAoBpB,KAAKM,SAAUN,KAAKqB,G,CAE5C,gBAAAC,GACIC,EAAiC,CAC7B,CACIC,KAAMxB,KAAKkB,UAAY,OAASlB,KAAKW,gBAAkBX,KAAKgB,MAC5DS,SAAUzB,KAAKkB,UAAY,OAAS,mBAAqB,UAE9D,gB,CAEP,eAAAQ,CAAgBC,GACZ,GAAI3B,KAAKM,SAAU,CACfqB,EAAExB,0B,MAED,IAAKH,KAAKK,QAAS,CACpBL,KAAKU,eAAiBV,KAAKU,a,EAGnC,MAAAkB,GACI,OAAQC,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,YAAa/B,KAAKM,SACnB,CAAC,WAAYN,KAAKU,cAClB,CAAC,GAAGV,KAAKa,cAAe,KACxB,CAAC,QAASb,KAAKkB,UAAY,OAC3B,CAAC,GAAGlB,KAAKiB,QAAS,KAClB,CAAC,WAAYjB,KAAKK,SACnB2B,QAAShC,KAAKC,aAAe4B,EAAE,YAAa,CAAE,eAAgB7B,KAAKU,cAAcuB,WAAYf,QAASlB,KAAKkB,UAAY,OAAS,OAAS,YAAagB,QAASlC,KAAKI,YAAa+B,MAAOnC,KAAKW,gBAAiB,aAAc,GAAGX,KAAKW,gBAAkBX,KAAKW,gBAAkBX,KAAKgB,UAAUhB,KAAKU,cAAgB,SAAW,aAAcJ,SAAUN,KAAKM,SAAUO,WAAYb,KAAKa,WAAYI,KAAMjB,KAAKiB,KAAMH,UAAWd,KAAKc,UAAWT,QAASL,KAAKK,QAAS,gBAAiB,GAAGL,KAAKM,YAAcN,KAAKkB,UAAY,QAAUlB,KAAKgB,MAAOa,EAAE,OAAQ,MAAOO,EAAWpC,KAAKqB,GAAI,SAAYQ,EAAE,OAAQ,CAAEQ,KAAM,OAAQC,KAAM,GAAGtC,KAAKe,cAAgB,GAAGf,KAAKe,qBAAuB,WAAcqB,EAAWpC,KAAKqB,GAAI,UAAaQ,EAAE,OAAQ,CAAEQ,KAAM,QAASC,KAAM,W,CAIpvB,yBAAWC,GAAmB,OAAO,IAAK,C"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,H as s,g as h}from"./p-8455d1bb.js";import{E as e,f as l}from"./p-1b4f852c.js";import"./p-fd186591.js";const p=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.default:not(.aligned-left)) .step-item-list{flex:auto}:host(.compact) ul ::slotted(ic-step){display:none}:host(.compact) ul ::slotted(ic-step.show){display:flex}:host(.compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const o=class{constructor(i){t(this,i);this.resizeObserver=null;this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=Array.from(this.el.querySelectorAll("ic-step[step-title]"))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=e(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.stepType!=="current"){t.current=false;this.stepTypes[i]=t.stepType}else{t.current=true}const s=t.shadowRoot&&t.shadowRoot.querySelector(".step > .step-title-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.stepTitle="Step "+t.stepNum;s&&s.querySelector(".step-title").setAttribute("aria-hidden","true")}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.stepTitle=undefined;s&&s.querySelector(".step-title").removeAttribute("aria-hidden")}}}if(this.variant==="compact"){if(t.current===true||t.stepType==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){t.nextStepTitle=this.steps[i+1].stepTitle;t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&s!==null){s.classList.remove("visually-hidden")}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth){t.style.width=e(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=e("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else{t.style.maxWidth=this.connectorWidth>100?e(`${this.connectorWidth+48}px`):e("148px")}}if(this.aligned==="left"){t.style.width=this.connectorWidth>100?e(`${this.connectorWidth+48}px`):e("148px");const i=t.shadowRoot.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?e(`${this.connectorWidth}px`):e("100px")}}if(this.hideStepInfo&&s!==null){s.classList.add("visually-hidden")}}}))};this.overrideVariant=()=>{let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.variantOverride){if(this.el.clientWidth<t){this.variant="compact";this.getChildren()}else{this.variant="default";this.getChildren()}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=document.querySelector("ic-stepper").getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.appearance="default";this.connectorWidth=100;this.hideStepInfo=false;this.variant="default"}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{class:{[`${this.variant}`]:true,["aligned-left"]:this.variant==="default"&&this.aligned==="left"}},i("ul",{class:"step-item-list"},i("slot",null)))}get el(){return h(this)}};o.style=p;export{o as ic_stepper};
2
- //# sourceMappingURL=p-b94ef8de.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icStepperCss","Stepper","constructor","hostRef","this","resizeObserver","getChildren","steps","Array","from","el","querySelectorAll","stepsWithStepTitles","checkStepTitles","length","variantOverride","variant","noOfResizes","console","error","setStepTypes","stepTypes","i","push","setStepperWidth","alignedFullWidth","aligned","lastStep","style","maxWidth","stepperWidth","offsetWidth","pxToRem","lastStepWidth","initialiseStepStates","forEach","step","index","stepNum","lastStepNum","stepType","current","stepTitleArea","shadowRoot","querySelector","autoSetStepTitles","stepTitle","setAttribute","undefined","removeAttribute","classList","remove","add","contains","nextStepTitle","progress","hideStepInfo","compactStepStyling","width","minWidth","connectorWidth","stepConnect","overrideVariant","minDefaultStepperWidth","clientWidth","resizeObserverCallback","runResizeObserver","ResizeObserver","observe","document","getBoundingClientRect","appearance","disconnectedCallback","disconnect","componentWillLoad","componentWillRender","componentDidLoad","checkResizeObserver","render","h","Host","class"],"sources":["../web-components/dist/collection/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","../web-components/dist/collection/components/ic-stepper/ic-stepper.js"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Host, h } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nexport class Stepper {\n constructor() {\n this.resizeObserver = null;\n // Get all steps currently within this stepper\n this.getChildren = () => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n this.stepsWithStepTitles = Array.from(this.el.querySelectorAll(\"ic-step[step-title]\"));\n };\n // Inform the user that stepTitles are required on all steps in a compact stepper\n this.checkStepTitles = () => {\n if (this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\") {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`);\n }\n }\n };\n this.setStepTypes = () => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n this.setStepperWidth = () => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n this.initialiseStepStates = () => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n }\n else {\n step.current = true;\n }\n const stepTitleArea = step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n }\n else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n }\n else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n }\n else {\n step.progress = 100;\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(\"visually-hidden\");\n }\n step.compactStepStyling = this.stepTypes[index];\n }\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)}px`);\n step.style.minWidth = pxToRem(\"148px\");\n }\n }\n else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\".step > .step-top > .step-connect\");\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(\"visually-hidden\");\n }\n }\n });\n };\n this.overrideVariant = () => {\n let minDefaultStepperWidth = 148 * this.steps.length;\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.variantOverride) {\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n this.getChildren();\n }\n else {\n this.variant = \"default\";\n this.getChildren();\n }\n }\n };\n this.resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n this.alignedFullWidth = true;\n this.autoSetStepTitles = true;\n this.lastStepWidth = 0;\n this.noOfResizes = 0;\n this.stepperWidth = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n this.stepTypes = [];\n this.variantOverride = this.variant !== \"compact\";\n this.aligned = \"full-width\";\n this.appearance = \"default\";\n this.connectorWidth = 100;\n this.hideStepInfo = false;\n this.variant = \"default\";\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentWillLoad() {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n componentWillRender() {\n this.initialiseStepStates();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n }\n render() {\n return (h(Host, { class: {\n [`${this.variant}`]: true,\n [\"aligned-left\"]: this.variant === \"default\" && this.aligned === \"left\",\n } }, h(\"ul\", { class: \"step-item-list\" }, h(\"slot\", null))));\n }\n static get is() { return \"ic-stepper\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStepperAlignment\",\n \"resolved\": \"\\\"full-width\\\" | \\\"left\\\"\",\n \"references\": {\n \"IcStepperAlignment\": {\n \"location\": \"import\",\n \"path\": \"./ic-stepper.types\",\n \"id\": \"src/components/ic-stepper/ic-stepper.types.ts::IcStepperAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the default stepper within its container.\"\n },\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"full-width\\\"\"\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"light\\\" | \\\"default\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"light\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the stepper.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"connectorWidth\": {\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 length of the connnector between each step in pixels. Minimum length is 100px.\"\n },\n \"attribute\": \"connector-width\",\n \"reflect\": false,\n \"defaultValue\": \"100\"\n },\n \"hideStepInfo\": {\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 information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\"\n },\n \"attribute\": \"hide-step-info\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStepVariants\",\n \"resolved\": \"\\\"compact\\\" | \\\"default\\\"\",\n \"references\": {\n \"IcStepVariants\": {\n \"location\": \"import\",\n \"path\": \"../ic-step/ic-step.types\",\n \"id\": \"src/components/ic-step/ic-step.types.ts::IcStepVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the stepper.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alignedFullWidth\": {},\n \"autoSetStepTitles\": {},\n \"lastStepWidth\": {},\n \"noOfResizes\": {},\n \"stepperWidth\": {},\n \"stepTypes\": {},\n \"variantOverride\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-stepper.js.map\n"],"mappings":"4HAAA,MAAMA,EAAe,6U,MCERC,EAAO,MAChB,WAAAC,CAAAC,G,UACIC,KAAKC,eAAiB,KAEtBD,KAAKE,YAAc,KACfF,KAAKG,MAAQC,MAAMC,KAAKL,KAAKM,GAAGC,iBAAiB,YACjDP,KAAKQ,oBAAsBJ,MAAMC,KAAKL,KAAKM,GAAGC,iBAAiB,uBAAuB,EAG1FP,KAAKS,gBAAkB,KACnB,GAAIT,KAAKQ,oBAAoBE,OAASV,KAAKG,MAAMO,QAC7CV,KAAKW,iBACLX,KAAKY,UAAY,UAAW,CAC5BZ,KAAKa,YAAcb,KAAKa,YAAc,EACtC,GAAIb,KAAKa,cAAgB,EAAG,CACxBC,QAAQC,MAAM,oI,IAI1Bf,KAAKgB,aAAe,KAChBhB,KAAKE,cACLF,KAAKiB,UAAY,GACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIlB,KAAKG,MAAMO,OAAQQ,IAAK,CACxClB,KAAKiB,UAAUE,KAAK,S,GAG5BnB,KAAKoB,gBAAkB,KACnBpB,KAAKqB,iBACDrB,KAAKY,UAAY,WAAaZ,KAAKsB,UAAY,aACnD,MAAMC,EAAWvB,KAAKG,MAAMH,KAAKG,MAAMO,OAAS,GAChDa,EAASC,MAAMC,SAAW,OAC1B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AAEC,MAAO,CACjB,CAAC,GAAG7E,KAAKY,WAAY,KACrB,CAAC,gBAAiBZ,KAAKY,UAAY,WAAaZ,KAAKsB,UAAY,SAChEqD,EAAE,KAAM,CAAEE,MAAO,kBAAoBF,EAAE,OAAQ,O"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icToastCss","AUTO_DISMISS_TIMER_REFRESH_RATE_MS","TOAST_HEADING_CHAR_LIMIT","TOAST_MESSAGE_CHAR_LIMIT","Toast","constructor","hostRef","this","interactiveElements","dismissAction","icDismiss","emit","handleProgressChange","timerProgress","autoDismissTimeout","visible","dismissButtonAriaLabel","dismissMode","heading","undefined","message","neutralIconAriaLabel","variant","disconnectedCallback","window","clearTimeout","dismissTimeout","clearInterval","timerRefreshInterval","componentWillLoad","_a","_b","handleLongText","length","isSlotUsed","el","isManual","neutralVariantLabel","VARIANT_ICONS","ariaLabel","toastMessage","isPropDefined","setAttribute","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","actionContent","getSlot","dismissButton","shadowRoot","querySelector","push","handleDismiss","handleKeyboard","ev","key","preventDefault","findNextInteractiveElement","shiftKey","setFocus","repeat","stopImmediatePropagation","handleTimer","type","setTimeout","setInterval","setVisible","document","activeElement","headingTooLong","messageTooLong","console","error","isBackwards","firstEl","lastEl","isActive","currentIndex","some","index","targetEl","render","h","Host","class","role","name","innerHTML","icon","appearance","size","progress","id","closeIcon","onClick","IcThemeForegroundEnum","Light"],"sources":["../web-components/dist/collection/components/ic-toast/ic-toast.css?tag=ic-toast&encapsulation=shadow","../web-components/dist/collection/components/ic-toast/ic-toast.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/**\n * @prop --ic-z-index-toast: z-index of toast\n */\n\n:host {\n --bottom-position: var(--ic-space-xl);\n\n position: fixed;\n bottom: var(--bottom-position);\n left: 50%;\n transform: translate(-50%);\n animation: fadein var(--ic-transition-duration-slow) ease-in-out;\n z-index: var(--ic-z-index-toast);\n}\n\n:host(.hidden) {\n display: none;\n animation: fadeout var(--ic-transition-duration-slow) ease-in-out;\n}\n\n.container {\n max-width: 32.5rem;\n min-width: 18rem;\n box-shadow: var(--ic-elevation-overlay);\n min-height: 3.5rem;\n background-color: var(--ic-architectural-800);\n color: var(--ic-color-white-text);\n display: flex;\n align-items: center;\n position: relative;\n border-radius: var(--ic-border-radius);\n}\n\n.toast-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n position: absolute;\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n}\n\n.divider-neutral {\n background-color: var(--ic-status-unknown);\n}\n\n.divider-info {\n background-color: var(--ic-status-info-contrast);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-contrast);\n}\n\n.divider-error {\n background-color: var(--ic-status-error-contrast);\n}\n\n.divider-success {\n background-color: var(--ic-status-success-contrast);\n}\n\n.toast-icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n:host([variant=\"neutral\"]) .toast-icon svg,\n::slotted(svg) {\n fill: var(--ic-status-unknown);\n}\n\n:host([variant=\"info\"]) .toast-icon svg {\n fill: var(--ic-status-info-contrast);\n}\n\n:host([variant=\"warning\"]) .toast-icon svg {\n fill: var(--ic-status-warning-contrast);\n}\n\n:host([variant=\"error\"]) .toast-icon svg {\n fill: var(--ic-status-error-contrast);\n}\n\n:host([variant=\"success\"]) .toast-icon svg {\n fill: var(--ic-status-success-contrast);\n}\n\n.toast-content {\n margin-left: var(--ic-space-xs);\n width: 100%;\n}\n\n.no-icon {\n margin-left: var(--ic-space-md);\n}\n\n.toast-message {\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n.toast-action-container {\n padding-bottom: var(--ic-space-md);\n}\n\nic-button,\n.toast-dismiss-timer {\n padding: var(--ic-space-xs);\n}\n\n@media (max-width: 576px) {\n :host {\n --bottom-position: var(--ic-space-lg);\n\n width: calc(100% - 2 * var(--ic-space-md));\n }\n}\n\n@media (min-width: 993px) {\n :host {\n --bottom-position: calc(var(--ic-space-xl) + var(--ic-space-xs));\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n\n@keyframes fadein {\n from {\n bottom: 0;\n opacity: 0;\n }\n\n to {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n}\n\n@keyframes fadeout {\n from {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n\n to {\n bottom: 0;\n opacity: 0;\n }\n}\n","import { h, Host, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\nimport { getSlot, isPropDefined, isSlotUsed, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nconst AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;\nconst TOAST_HEADING_CHAR_LIMIT = 70;\nconst TOAST_MESSAGE_CHAR_LIMIT = 140;\n/**\n * @slot action - IcButton or IcLink is placed below header and message. If used will default toast to manual `dismiss` type.\n * @slot neutral-icon - A custom neutral icon is placed on the left side of the component. If used will default toast to `neutral` variant.\n */\nexport class Toast {\n constructor() {\n this.interactiveElements = [];\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.handleProgressChange = () => {\n this.timerProgress -=\n (AUTO_DISMISS_TIMER_REFRESH_RATE_MS / this.autoDismissTimeout) * 100;\n };\n this.timerProgress = 100;\n this.visible = false;\n this.autoDismissTimeout = 5000;\n this.dismissButtonAriaLabel = \"dismiss\";\n this.dismissMode = \"manual\";\n this.heading = undefined;\n this.message = undefined;\n this.neutralIconAriaLabel = undefined;\n this.variant = undefined;\n }\n disconnectedCallback() {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n }\n componentWillLoad() {\n var _a, _b;\n this.handleLongText(this.heading.length > TOAST_HEADING_CHAR_LIMIT, ((_a = this.message) === null || _a === void 0 ? void 0 : _a.length) > TOAST_MESSAGE_CHAR_LIMIT);\n if (this.autoDismissTimeout < 5000)\n this.autoDismissTimeout = 5000;\n if (isSlotUsed(this.el, \"action\"))\n this.dismissMode = \"manual\";\n this.isManual = this.dismissMode === \"manual\";\n if (isSlotUsed(this.el, \"neutral-icon\"))\n this.variant = \"neutral\";\n if (this.variant === \"neutral\") {\n this.neutralVariantLabel =\n (_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;\n }\n if (this.isManual) {\n const toastMessage = isPropDefined(this.message)\n ? `. ${this.message}`\n : \"\";\n this.el.setAttribute(\"aria-label\", this.variant\n ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel\n : this.heading);\n (this.variant || this.message) &&\n this.el.setAttribute(\"aria-description\", this.variant ? `${this.heading}${toastMessage}` : this.message);\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Toast\");\n const actionContent = getSlot(this.el, \"action\");\n const dismissButton = this.el.shadowRoot.querySelector(\"ic-button\");\n if (actionContent)\n this.interactiveElements.push(actionContent);\n if (dismissButton)\n this.interactiveElements.push(dismissButton);\n }\n handleDismiss() {\n this.visible = false;\n clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n }\n handleKeyboard(ev) {\n if (this.isManual && this.visible) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.findNextInteractiveElement(ev.shiftKey).setFocus();\n break;\n case \"Escape\":\n !ev.repeat && this.dismissAction();\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n handleTimer(ev) {\n if (!this.isManual) {\n switch (ev.type) {\n case \"mouseenter\":\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n break;\n case \"mouseleave\":\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n break;\n }\n }\n }\n /**\n * @internal Used to display the individual toast.\n * @returns The element that previously had focus before the toast appeared\n */\n async setVisible() {\n if (!this.visible)\n this.visible = true;\n if (!this.isManual) {\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n return null;\n }\n else {\n window.setTimeout(() => this.interactiveElements[0].setFocus(), 200);\n return document.activeElement;\n }\n }\n handleLongText(headingTooLong, messageTooLong) {\n if (messageTooLong || headingTooLong) {\n console.error(`Too many characters in toast ${headingTooLong ? \"heading\" : \"\"}${headingTooLong && messageTooLong ? \" and \" : \"\"}${messageTooLong ? \"message\" : \"\"}. Refer to character limits specified in the prop description`);\n }\n }\n findNextInteractiveElement(isBackwards) {\n const firstEl = this.interactiveElements[0];\n const lastEl = this.interactiveElements[this.interactiveElements.length - 1];\n if (this.isActive(isBackwards ? firstEl : lastEl))\n return isBackwards ? lastEl : firstEl;\n let currentIndex;\n return this.interactiveElements.some((el, index) => {\n if (!this.isActive(el))\n return false;\n currentIndex = index;\n return true;\n })\n ? this.interactiveElements[currentIndex + (isBackwards ? -1 : 1)]\n : firstEl;\n }\n isActive(targetEl) {\n return targetEl === this.el\n ? !!this.el.shadowRoot.activeElement\n : document.activeElement === targetEl;\n }\n render() {\n const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, } = this;\n return (h(Host, { class: { [\"hidden\"]: !visible }, role: isManual ? \"dialog\" : \"status\" }, h(\"div\", { class: \"container\" }, variant && visible && (h(\"div\", { class: \"toast-icon-container\" }, h(\"div\", { class: {\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n } }), variant === \"neutral\" ? (h(\"slot\", { name: \"neutral-icon\" })) : (h(\"span\", { class: \"toast-icon\", innerHTML: VARIANT_ICONS[variant].icon })))), h(\"div\", { class: {\n [\"toast-content\"]: true,\n [\"no-icon\"]: variant === \"neutral\" && !isSlotUsed(this.el, \"neutral-icon\"),\n } }, h(\"div\", { class: \"toast-message\" }, h(\"ic-typography\", { variant: \"subtitle-large\" }, visible && h(\"h5\", null, heading)), message && (h(\"ic-typography\", { variant: \"body\" }, visible && h(\"p\", null, message)))), isSlotUsed(this.el, \"action\") && (h(\"div\", { class: \"toast-action-container\" }, h(\"slot\", { name: \"action\" })))), !isManual ? (h(\"ic-loading-indicator\", { class: \"toast-dismiss-timer\", appearance: \"light\", size: \"icon\", progress: this.timerProgress })) : (h(\"ic-button\", { id: \"dismiss-button\", innerHTML: closeIcon, onClick: this.dismissAction, variant: \"icon\", appearance: IcThemeForegroundEnum.Light, \"aria-label\": dismissButtonAriaLabel })))));\n }\n static get is() { return \"ic-toast\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get properties() {\n return {\n \"autoDismissTimeout\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\\n(NOTE: Has a minimum value of `5000ms`)\"\n },\n \"attribute\": \"auto-dismiss-timeout\",\n \"reflect\": false,\n \"defaultValue\": \"5000\"\n },\n \"dismissButtonAriaLabel\": {\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\": \"If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\"\n },\n \"attribute\": \"dismiss-button-aria-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dismiss\\\"\"\n },\n \"dismissMode\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"How the toast will be dismissed. If manual will display a dismiss button.\"\n },\n \"attribute\": \"dismiss-mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"heading\": {\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 title to display at the start of the toast. (NOTE: Should be no more than `70` characters)\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"message\": {\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 main body message of the toast. (NOTE: Should be no more than `140` characters)\"\n },\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"neutralIconAriaLabel\": {\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\": \"Provides a custom alt-text to be announced to screen readers, if slotting a custom neutral icon\"\n },\n \"attribute\": \"neutral-icon-aria-label\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStatusVariants\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcStatusVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcStatusVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toast being rendered\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"timerProgress\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the toast\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setVisible\": {\n \"complexType\": {\n \"signature\": \"() => Promise<HTMLElement>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n },\n \"return\": \"Promise<HTMLElement>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to display the individual toast.\"\n }, {\n \"name\": \"returns\",\n \"text\": \"The element that previously had focus before the toast appeared\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleDismiss\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyboard\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"mouseenter\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }, {\n \"name\": \"mouseleave\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }];\n }\n}\n//# sourceMappingURL=ic-toast.js.map\n"],"mappings":"wMAAA,MAAMA,EAAa,qpJCKnB,MAAMC,EAAqC,IAC3C,MAAMC,EAA2B,GACjC,MAAMC,EAA2B,I,MAKpBC,EAAK,MACd,WAAAC,CAAAC,G,+CACIC,KAAKC,oBAAsB,GAC3BD,KAAKE,cAAgB,KACjBF,KAAKG,UAAUC,MAAM,EAEzBJ,KAAKK,qBAAuB,KACxBL,KAAKM,eACAZ,EAAqCM,KAAKO,mBAAsB,GAAG,EAE5EP,KAAKM,cAAgB,IACrBN,KAAKQ,QAAU,MACfR,KAAKO,mBAAqB,IAC1BP,KAAKS,uBAAyB,UAC9BT,KAAKU,YAAc,SACnBV,KAAKW,QAAUC,UACfZ,KAAKa,QAAUD,UACfZ,KAAKc,qBAAuBF,UAC5BZ,KAAKe,QAAUH,S,CAEnB,oBAAAI,GACIC,OAAOC,aAAalB,KAAKmB,gBACzBF,OAAOG,cAAcpB,KAAKqB,qB,CAE9B,iBAAAC,GACI,IAAIC,EAAIC,EACRxB,KAAKyB,eAAezB,KAAKW,QAAQe,OAAS/B,IAA4B4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M,EAAsBC,MAAO,aAAcjF,K"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i,F as a,g as n}from"./p-8455d1bb.js";import{i as s,g as o}from"./p-20d4ded5.js";const l=`<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 r=`<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 h=`<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 d=':host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}ic-loading-indicator{position:sticky;top:20px}.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-row-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;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content: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;justify-content:end;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}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}.cell-container{display:flex}}';const c=class{constructor(n){t(this,n);this.icRowHeightChange=e(this,"icRowHeightChange",7);this.DENSITY_HEIGHT_MULTIPLIER={dense:.8,default:1,spacious:1.2};this.SORT_ICONS={unsorted:l,ascending:r,descending:h};this.hasLoadedForOneSecond=true;this.startLoadingTimer=()=>{this.hasLoadedForOneSecond=false;this.timerStarted=Date.now();setTimeout((()=>{this.hasLoadedForOneSecond=true;this.timerStarted=null}),this.minimumLoadingDisplayDuration)};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.createUpdatingIndicator=()=>{const{appearance:t,description:e,max:a,min:n,progress:s}=this.updatingOptions||{};return i("th",{colSpan:this.columns.length,class:"updating-state"},i("ic-loading-indicator",{appearance:t,description:e||"Updating table data",fullWidth:true,max:a,min:n,progress:s,type:"linear",size:"small"}))};this.createCells=(t,e)=>{const n=Object.values(t);const o=Object.keys(t);let l;let r;const h=o.indexOf("header");if(h>-1){l=this.getObjectValue(n[h],"rowAlignment");r=this.getObjectValue(n[h],"emphasis")}return n.map(((t,n)=>{var h,d,c,u,g;const v=this.columns[n];const p=`${v===null||v===void 0?void 0:v.key}-${e}`;const b=this.isObject(t)&&Object.keys(t).includes("icon");const m=e=>this.getObjectValue(t,e);return o[n]==="header"?i("th",{scope:"row",colSpan:m("colspan"),class:{["row-header"]:true,[`row-header-alignment-${m("cellAlignment")}`]:!!m("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},m("title")):i("td",{class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),[`data-type-${v===null||v===void 0?void 0:v.dataType}`]:true,[`cell-alignment-${((h=v===null||v===void 0?void 0:v.columnAlignment)===null||h===void 0?void 0:h.vertical)||l||this.getCellAlignment(t,"vertical")}`]:!!((d=v===null||v===void 0?void 0:v.columnAlignment)===null||d===void 0?void 0:d.vertical)||!!l||!!this.getCellAlignment(t,"vertical")}},i("div",{innerHTML:(v===null||v===void 0?void 0:v.dataType)==="element"&&!s(this.el,p)?t:null,class:{"cell-container":(v===null||v===void 0?void 0:v.dataType)!=="element",[`data-type-${v===null||v===void 0?void 0:v.dataType}`]:true,[`cell-alignment-${((c=v===null||v===void 0?void 0:v.columnAlignment)===null||c===void 0?void 0:c.horizontal)||this.getCellAlignment(t,"horizontal")}`]:!!((u=v===null||v===void 0?void 0:v.columnAlignment)===null||u===void 0?void 0:u.horizontal)||!!this.getCellAlignment(t,"horizontal")}},s(this.el,p)?i("slot",{name:p}):i(a,null,s(this.el,`${p}-icon`)?i("slot",{name:`${p}-icon`}):(b||((g=v===null||v===void 0?void 0:v.icon)===null||g===void 0?void 0:g.onAllCells))&&i("span",{class:"icon",innerHTML:m("icon")||(v===null||v===void 0?void 0:v.icon.icon)}),i("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(t)&&m("emphasis")||(v===null||v===void 0?void 0:v.emphasis)||r}`]:this.isObject(t)&&!!m("emphasis")||!!(v===null||v===void 0?void 0:v.emphasis)||!!r,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(t)&&(v===null||v===void 0?void 0:v.dataType)!=="date"?Object.keys(t).includes("href")?i("ic-link",{href:m("href")},m("data")):m("data"):this.getCellContent(t,v===null||v===void 0?void 0:v.dataType)))))}))};this.createColumnHeaders=()=>this.columns.map((({cellAlignment:t,colspan:e,icon:a,key:n,title:o})=>i("th",{scope:"col",class:{["column-header"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["updating-state-headers"]:this.updating&&!this.loading},colSpan:e},i("div",{class:{"column-header-inner-container":true,[`column-header-alignment-${t}`]:!!t}},s(this.el,`${n}-column-icon`)?i("slot",{name:`${n}-column-icon`}):a&&!a.hideOnHeader&&i("span",{class:"icon",innerHTML:a.icon}),i("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},o),this.sortable&&i("ic-button",{variant:"icon",id:`sort-button-${n}`,"aria-label":this.getSortButtonLabel(n),onClick:()=>this.sortRows(n),innerHTML:this.SORT_ICONS[this.sortedColumn===n?this.sortedColumnOrder:"unsorted"],class:{["sort-button"]:true,["sort-button-unsorted"]:this.sortedColumn!==n||this.sortedColumnOrder==="unsorted"}})))));this.createRows=()=>{const t=this.showPagination?this.data.slice(this.fromRow,this.toRow):this.data.slice();this.columns.forEach((({key:e})=>{t.forEach(((t,i)=>{const a=`${e}-${i}`;if(s(this.el,a)){t[e]=o(this.el,a)}}))}));return t.sort(!this.sortable?undefined:this.getSortFunction()).map(((t,e)=>{var a;const n=(a=this.variableRowHeight)===null||a===void 0?void 0:a.call(this,Object.assign(Object.assign({},t),{index:e}));const s=n?n!=="auto"&&n:this.globalRowHeight!=="auto"&&this.globalRowHeight;return i("tr",{onClick:()=>this.selectedRow=this.selectedRow!==t&&!this.loading&&!this.updating&&t,class:{["table-row"]:true,["table-row-selected"]:this.selectedRow===t},style:{height:s?`${s*this.DENSITY_HEIGHT_MULTIPLIER[this.density]}px`:null}},this.createCells(t,e))}))};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.globalRowHeight=40;this.hideColumnHeaders=false;this.loading=false;this.loadingOptions=undefined;this.minimumLoadingDisplayDuration=1e3;this.paginationBarOptions={itemsPerPageOptions:[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}],rangeLabelType:"page",type:"simple",showItemsPerPageControl:true,showGoToPageControl:true,alignment:"right",appearance:"default",itemLabel:"Item",pageLabel:"Page",hideRangeLabel:false};this.showPagination=false;this.sortable=false;this.sortOptions={sortOrders:["unsorted","ascending","descending"],defaultColumn:""};this.stickyColumnHeaders=false;this.stickyRowHeaders=false;this.updating=false;this.updatingOptions=undefined;this.variableRowHeight=undefined}componentWillLoad(){var t;this.rowsPerPage=Number(this.paginationBarOptions.itemsPerPageOptions[0].value);this.previousRowsPerPage=this.rowsPerPage;this.toRow=this.rowsPerPage;this.sortedColumn=this.sortOptions.defaultColumn;this.sortedColumnOrder=this.sortOptions.sortOrders[0];this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:((t=this.data)===null||t===void 0?void 0:t.length)>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}if(this.loading){this.startLoadingTimer();this.showLoadingIndicator()}}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}}handleDensityChange(t){this.density=t.detail.value}clickListener(t){if(t.target!==this.el)this.selectedRow=undefined}loadingHandler(t){if(t)this.startLoadingTimer();if(this.loading){setTimeout((()=>{this.showLoadingIndicator()}),500)}}dataHandler(t){this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:(t===null||t===void 0?void 0:t.length)>0});if(this.loading){!this.hasLoadedForOneSecond?setTimeout((()=>this.loading=false),this.minimumLoadingDisplayDuration-(Date.now()-this.timerStarted)):this.loading=false}if(this.updating)this.updating=false}rowHeightChangeHandler(){this.icRowHeightChange.emit()}async resetRowHeights(){this.globalRowHeight=40;this.variableRowHeight=null}showLoadingIndicator(){this.loadingIndicator.classList.add("show")}render(){const{caption:t,createColumnHeaders:e,createRows:a,createUpdatingIndicator:n,data:o,hideColumnHeaders:l,loading:r,loadingOptions:h,paginationBarOptions:d,scrollable:c,scrollOffset:u,showPagination:g,sortable:v,sortedColumnOrder:p,sortedColumn:b,stickyColumnHeaders:m,updateScrollOffset:f,updating:w}=this;return i("div",{class:"table-container"},s(this.el,"title-bar")&&i("slot",{name:"title-bar"}),i("div",{class:{["table-row-container"]:true,scrollable:c},tabIndex:c?0:null,onScroll:f},i("table",null,i("caption",{class:"table-caption"},t),!l&&i("thead",{class:{["column-header-sticky"]:m,["column-header-overlay"]:m&&u!==0}},i("tr",null,e())),w&&!r&&(l?i("thead",null,n()):n()),(o===null||o===void 0?void 0:o.length)>0&&i("tbody",null,a())),!(o===null||o===void 0?void 0:o.length)&&!r&&(s(this.el,"empty-state")?i("slot",{name:"empty-state"}):i("ic-empty-state",{aligned:"center",heading:"No Data",class:"loading-empty"}))),r&&i("ic-loading-indicator",{appearance:h===null||h===void 0?void 0:h.appearance,class:{"loading-empty":r,loading:true,"show-background":h.showBackground},description:h.description||"Loading table data",label:h.label||"Loading...",labelDuration:h===null||h===void 0?void 0:h.labelDuration,max:h===null||h===void 0?void 0:h.max,min:h===null||h===void 0?void 0:h.min,progress:h===null||h===void 0?void 0:h.progress,ref:t=>this.loadingIndicator=t}),g&&i("div",{class:"pagination-container"},i("ic-pagination-bar",{totalItems:o.length,type:d.type,rangeLabelType:d.rangeLabelType,showItemsPerPageControl:d.showItemsPerPageControl,showGoToPageControl:d.showGoToPageControl,itemsPerPageOptions:d.itemsPerPageOptions,alignment:d.alignment,appearance:d.appearance,itemLabel:d.itemLabel,pageLabel:d.pageLabel,hideRangeLabel:d.hideRangeLabel})),v&&i("div",{class:"screen-reader-sort-text","aria-live":"polite"},p!=="unsorted"&&b?`${b} sorted ${p}`:"table unsorted"))}get el(){return n(this)}static get watchers(){return{loading:["loadingHandler"],data:["dataHandler"],globalRowHeight:["rowHeightChangeHandler"],variableRowHeight:["rowHeightChangeHandler"]}}};c.style=d;export{c as ic_data_table};
2
- //# sourceMappingURL=p-bda7d350.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icDataTableCss","DataTable","this","DENSITY_HEIGHT_MULTIPLIER","dense","default","spacious","SORT_ICONS","unsorted","unsortedIcon","ascending","ascendingIcon","descending","descendingIcon","hasLoadedForOneSecond","startLoadingTimer","timerStarted","Date","now","setTimeout","minimumLoadingDisplayDuration","isObject","value","notDefaultDensity","density","getCellContent","cell","dataType","undefined","toLocaleDateString","getCellAlignment","alignment","Object","keys","includes","getObjectValue","createUpdatingIndicator","appearance","description","max","min","progress","updatingOptions","h","colSpan","columns","length","class","fullWidth","type","size","createCells","row","rowIndex","rowValues","values","rowKeys","rowAlignment","rowEmphasis","headerIndex","indexOf","map","index","columnProps","cellSlotName","key","hasIcon","cellValue","scope","stickyRowHeaders","_a","columnAlignment","vertical","_b","innerHTML","isSlotUsed","el","_c","horizontal","_d","name","Fragment","_e","icon","onAllCells","variant","emphasis","href","createColumnHeaders","cellAlignment","colspan","title","updating","loading","hideOnHeader","sortable","id","getSortButtonLabel","onClick","sortRows","sortedColumn","sortedColumnOrder","createRows","data","showPagination","slice","fromRow","toRow","forEach","getSlotContent","sort","getSortFunction","variableRowHeightVal","variableRowHeight","call","assign","findRowHeight","globalRowHeight","selectedRow","style","height","label","getNextSortOption","option","sortOrders","sortOptions","sortOption","getComparison","targetRow","comparisonRow","targetRowValue","comparisonRowValue","find","col","valueOf","String","localeCompare","numeric","sensitivity","a","b","column","sortButton","shadowRoot","querySelector","previousSortedButton","setAttribute","nextSortOrderIndex","updateScrollOffset","scrollOffset","scrollTop","itemsPerPageOptions","rangeLabelType","showItemsPerPageControl","showGoToPageControl","itemLabel","pageLabel","hideRangeLabel","defaultColumn","componentWillLoad","rowsPerPage","Number","paginationBarOptions","previousRowsPerPage","loadingOptions","showBackground","componentDidLoad","tableElement","tableContainer","clientHeight","clientWidth","scrollable","showLoadingIndicator","handleItemsPerPageChange","ev","detail","handlePageChange","tableRowsContainer","handleDensityChange","clickListener","target","loadingHandler","newValue","dataHandler","newData","rowHeightChangeHandler","icRowHeightChange","emit","resetRowHeights","loadingIndicator","classList","add","render","caption","hideColumnHeaders","stickyColumnHeaders","tabIndex","onScroll","aligned","heading","labelDuration","ref","totalItems"],"sources":["src/components/ic-data-table/ic-data-table.css?tag=ic-data-table&encapsulation=shadow","src/components/ic-data-table/ic-data-table.tsx"],"sourcesContent":["/**\n * @prop --height: height of the table row container\n */\n\n:host {\n position: relative;\n display: block;\n height: 100%;\n max-height: 100%;\n}\n\n.table-container {\n position: relative;\n height: calc(100% - var(--ic-space-xxxs));\n}\n\nic-loading-indicator {\n position: sticky;\n top: 20px;\n}\n\n.table-row-container {\n position: relative;\n height: 100%;\n overflow: auto;\n transition: var(--ic-easing-transition-fast);\n overflow-anchor: none;\n}\n\n:host([show-pagination=\"true\"]) .table-row-container {\n height: calc(100% - 3.5625rem);\n}\n\ntable {\n table-layout: fixed;\n border-spacing: 0;\n width: 100%;\n}\n\n.table-row-container:focus {\n outline: none;\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n z-index: 1;\n}\n\n:host([embedded=\"true\"]) .table-row-container {\n border: var(--ic-border-light);\n}\n\n.column-header-sticky {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.column-header-overlay {\n position: sticky;\n top: 0;\n z-index: 1;\n box-shadow: 0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%);\n}\n\n.row-header-sticky {\n position: sticky;\n left: 0;\n}\n\n.column-header,\n.table-row {\n box-sizing: border-box;\n}\n\n.table-row-selected {\n background-color: var(--ic-table-row-selected) !important;\n}\n\n.sort-button {\n margin-left: auto;\n}\n\n.sort-button:hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.sort-button:active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.sort-button svg {\n color: var(--ic-architectural-black);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-color-tertiary-text);\n}\n\n.table-density-dense {\n padding: var(--ic-space-xxs) var(--ic-space-xs) !important;\n}\n\n.text-dense {\n font-size: var(--ic-font-size-label);\n}\n\n.table-density-spacious {\n padding: 0.625rem var(--ic-space-xs) !important;\n}\n\n.text-spacious {\n font-size: 1.125rem;\n}\n\n.column-header-text {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.column-header,\n.row-header {\n text-align: left;\n padding: var(--ic-space-xs);\n background-color: var(--ic-architectural-40);\n border-right: var(--ic-border-light);\n border-bottom: var(--ic-border-light);\n}\n\n.column-header:last-child {\n border-right: none;\n}\n\n.scrollable .column-header:last-child {\n border-right: var(--ic-border-light) !important;\n}\n\n:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header {\n border-bottom: none;\n}\n\n.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left {\n text-align: left !important;\n justify-content: start !important;\n}\n\n.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right {\n text-align: right !important;\n justify-content: end !important;\n}\n\n.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center {\n text-align: center !important;\n justify-content: center !important;\n}\n\n.table-row:nth-child(even) {\n background-color: var(--ic-architectural-20);\n}\n\n.table-cell {\n padding: var(--ic-space-xs);\n border-bottom: solid var(--ic-architectural-100) var(--ic-space-1px);\n}\n\n.data-type-string {\n text-align: left;\n vertical-align: top;\n}\n\n.data-type-number,\n.data-type-date {\n text-align: right;\n justify-content: end;\n vertical-align: top;\n}\n\n.cell-alignment-top {\n vertical-align: top;\n}\n\n.cell-alignment-middle {\n vertical-align: middle;\n}\n\n.cell-alignment-bottom {\n vertical-align: bottom;\n}\n\n.cell-emphasis-low {\n color: var(--ic-color-secondary-text);\n}\n\n.cell-emphasis-high {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.pagination-container {\n background-color: var(--ic-architectural-40);\n border-top: var(--ic-border-light);\n}\n\n.screen-reader-sort-text,\n.table-caption {\n position: absolute;\n left: -100rem;\n}\n\n.table-cell,\n.column-header,\n.row-header {\n word-wrap: break-word;\n white-space: pre-wrap;\n}\n\n.loading-empty {\n padding: var(--ic-space-xl) var(--ic-space-xxl);\n margin-top: var(--ic-space-xl);\n}\n\n.updating-state {\n padding: 0;\n border-bottom: var(--ic-border-light);\n}\n\n.updating-state-headers {\n border-bottom: none;\n}\n\n.loading {\n position: absolute;\n left: calc(50% - 5.9741rem);\n opacity: 0;\n transition: opacity var(--ic-transition-duration-slow);\n}\n\n.loading.show-background {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-light);\n}\n\n.loading.show {\n opacity: 1;\n}\n\n.icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-right: var(--ic-space-xxs);\n}\n\n.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg) {\n margin-right: auto;\n}\n\n.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography {\n flex: 1;\n}\n\n.icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n@media screen and (min-width: 576px) {\n .column-header-inner-container {\n display: flex;\n align-items: center;\n }\n\n .cell-container {\n display: flex;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDensityUpdateEventDetail,\n} from \"./ic-data-table.types\";\nimport { IcThemeForegroundNoDefault } from \"@ukic/web-components/dist/types/utils/types\";\nimport { IcPaginationBarOptions } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport { getSlotContent, isSlotUsed } from \"../../utils/helpers\";\n\n/**\n * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.\n * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.\n * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.\n * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.\n */\n@Component({\n tag: \"ic-data-table\",\n styleUrl: \"ic-data-table.css\",\n shadow: true,\n})\nexport class DataTable {\n private DENSITY_HEIGHT_MULTIPLIER = {\n dense: 0.8,\n default: 1,\n spacious: 1.2,\n };\n\n private SORT_ICONS = {\n unsorted: unsortedIcon,\n ascending: ascendingIcon,\n descending: descendingIcon,\n };\n\n private hasLoadedForOneSecond: boolean = true;\n private loadingIndicator: HTMLIcLoadingIndicatorElement;\n private timerStarted: number;\n\n @Element() el: HTMLIcDataTableElement;\n\n @State() fromRow: number = 0;\n\n @State() previousRowsPerPage: number;\n\n @State() rowsPerPage: number;\n\n @State() scrollable: boolean = false;\n\n @State() scrollOffset: number = 0;\n\n @State() selectedRow: object;\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n\n /**\n * The row content for the table.\n */\n @Prop() data: { [key: string]: any }[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = 40;\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n };\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the pagination bar.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n };\n\n /**\n * If `true`, adds a pagination bar to the bottom of the table.\n */\n @Prop() showPagination?: boolean = false;\n\n /**\n * If `true`, allows table columns to be sorted using applied sort buttons.\n */\n @Prop() sortable?: boolean = false;\n\n /**\n * Sets the order columns will be sorted in and allows for 'default' sorts to be added.\n */\n @Prop() sortOptions?: {\n sortOrders: IcDataTableSortOrderOptions[];\n defaultColumn?: string;\n } = {\n sortOrders: [\"unsorted\", \"ascending\", \"descending\"],\n defaultColumn: \"\",\n };\n\n /**\n * If `true`, column headers will remain at the top of the table when scrolling vertically.\n */\n @Prop() stickyColumnHeaders?: boolean = false;\n\n /**\n * If `true`, row headers will remain to the left when scrolling horizontally.\n */\n @Prop() stickyRowHeaders?: boolean = false;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n };\n\n /**\n * Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\n * If the function returns `null`, that row's height will be set to the `globalRowHeight` property.\n */\n @Prop({ mutable: true }) variableRowHeight?: (params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n componentWillLoad(): void {\n this.rowsPerPage = Number(\n this.paginationBarOptions.itemsPerPageOptions[0].value\n );\n this.previousRowsPerPage = this.rowsPerPage;\n this.toRow = this.rowsPerPage;\n this.sortedColumn = this.sortOptions.defaultColumn;\n this.sortedColumnOrder = this.sortOptions.sortOrders[0];\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: this.data?.length > 0,\n };\n }\n\n componentDidLoad(): void {\n const tableElement = this.el.shadowRoot.querySelector(\"table\");\n const tableContainer = this.el.shadowRoot.querySelector(\".table-container\");\n if (\n tableElement?.clientHeight > tableContainer?.clientHeight ||\n tableElement?.clientWidth > tableContainer?.clientWidth\n ) {\n this.scrollable = true;\n }\n if (this.loading) {\n this.startLoadingTimer();\n this.showLoadingIndicator();\n }\n }\n\n @Listen(\"icItemsPerPageChange\")\n handleItemsPerPageChange(ev: CustomEvent): void {\n this.previousRowsPerPage = this.rowsPerPage;\n this.rowsPerPage = ev.detail.value;\n }\n\n @Listen(\"icPageChange\")\n handlePageChange(ev: CustomEvent): void {\n this.fromRow = (ev.detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (this.previousRowsPerPage === this.rowsPerPage) {\n tableRowsContainer.scrollTop = 0;\n } else if (this.previousRowsPerPage < this.rowsPerPage) {\n tableRowsContainer.scrollTop = this.scrollOffset;\n this.previousRowsPerPage = this.rowsPerPage;\n } else {\n this.previousRowsPerPage = this.rowsPerPage;\n }\n }\n\n @Listen(\"icTableDensityUpdate\")\n handleDensityChange(ev: CustomEvent<IcDensityUpdateEventDetail>): void {\n this.density = ev.detail.value;\n }\n\n @Listen(\"click\", { target: \"window\" })\n clickListener(ev: MouseEvent): void {\n if (ev.target !== this.el) this.selectedRow = undefined;\n }\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n if (newValue) this.startLoadingTimer();\n\n if (this.loading) {\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"data\")\n dataHandler(newData: { [key: string]: any }[]): void {\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: newData?.length > 0,\n };\n if (this.loading) {\n !this.hasLoadedForOneSecond\n ? setTimeout(\n () => (this.loading = false),\n this.minimumLoadingDisplayDuration -\n (Date.now() - this.timerStarted)\n )\n : (this.loading = false);\n }\n if (this.updating) this.updating = false;\n }\n\n @Watch(\"globalRowHeight\")\n @Watch(\"variableRowHeight\")\n rowHeightChangeHandler(): void {\n this.icRowHeightChange.emit();\n }\n\n /**\n * Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.\n */\n @Method()\n async resetRowHeights(): Promise<void> {\n this.globalRowHeight = 40;\n this.variableRowHeight = null;\n }\n\n private showLoadingIndicator() {\n this.loadingIndicator.classList.add(\"show\");\n }\n\n private startLoadingTimer = (): void => {\n this.hasLoadedForOneSecond = false;\n this.timerStarted = Date.now();\n setTimeout(() => {\n this.hasLoadedForOneSecond = true;\n this.timerStarted = null;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) => typeof value === \"object\";\n\n private notDefaultDensity = () => this.density !== \"default\";\n\n private getCellContent = (\n cell: any,\n dataType: IcDataTableColumnDataTypes\n ): any => {\n switch (dataType) {\n case \"element\":\n return undefined;\n case \"date\":\n return (\n cell instanceof Date ? cell : new Date(cell)\n ).toLocaleDateString();\n default:\n return cell;\n }\n };\n\n private getCellAlignment = (\n cell: any,\n alignment: \"horizontal\" | \"vertical\"\n ) => {\n if (this.isObject(cell) && Object.keys(cell).includes(\"cellAlignment\")) {\n return this.getObjectValue(\n this.getObjectValue(cell, \"cellAlignment\"),\n alignment\n );\n }\n };\n\n private createUpdatingIndicator = () => {\n const { appearance, description, max, min, progress } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n appearance={appearance}\n description={description || \"Updating table data\"}\n fullWidth={true}\n max={max}\n min={min}\n progress={progress}\n type=\"linear\"\n size=\"small\"\n ></ic-loading-indicator>\n </th>\n );\n };\n\n private createCells = (row: object, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\n let rowAlignment: string;\n let rowEmphasis: string;\n const headerIndex = rowKeys.indexOf(\"header\");\n if (headerIndex > -1) {\n rowAlignment = this.getObjectValue(\n rowValues[headerIndex],\n \"rowAlignment\"\n );\n rowEmphasis = this.getObjectValue(rowValues[headerIndex], \"emphasis\");\n }\n return rowValues.map((cell, index) => {\n const columnProps = this.columns[index];\n const cellSlotName = `${columnProps?.key}-${rowIndex}`;\n const hasIcon = this.isObject(cell) && Object.keys(cell).includes(\"icon\");\n const cellValue = (key: string) => this.getObjectValue(cell, key);\n\n return rowKeys[index] === \"header\" ? (\n <th\n scope=\"row\"\n colSpan={cellValue(\"colspan\")}\n class={{\n [\"row-header\"]: true,\n [`row-header-alignment-${cellValue(\"cellAlignment\")}`]:\n !!cellValue(\"cellAlignment\"),\n [\"row-header-sticky\"]: this.stickyRowHeaders,\n }}\n >\n {cellValue(\"title\")}\n </th>\n ) : (\n <td\n class={{\n [\"table-cell\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [`data-type-${columnProps?.dataType}`]: true,\n [`cell-alignment-${\n columnProps?.columnAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!columnProps?.columnAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n }}\n >\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : null\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\n [`data-type-${columnProps?.dataType}`]: true,\n [`cell-alignment-${\n columnProps?.columnAlignment?.horizontal ||\n this.getCellAlignment(cell, \"horizontal\")\n }`]:\n !!columnProps?.columnAlignment?.horizontal ||\n !!this.getCellAlignment(cell, \"horizontal\"),\n }}\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) && (\n <span\n class=\"icon\"\n innerHTML={cellValue(\"icon\") || columnProps?.icon.icon}\n ></span>\n )\n )}\n <ic-typography\n variant=\"body\"\n class={{\n [`cell-emphasis-${\n (this.isObject(cell) && cellValue(\"emphasis\")) ||\n columnProps?.emphasis ||\n rowEmphasis\n }`]:\n (this.isObject(cell) && !!cellValue(\"emphasis\")) ||\n !!columnProps?.emphasis ||\n !!rowEmphasis,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {this.isObject(cell) && columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link href={cellValue(\"href\")}>\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n </Fragment>\n )}\n </div>\n </td>\n );\n });\n };\n\n private createColumnHeaders = () => {\n return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,\n }}\n >\n {isSlotUsed(this.el, `${key}-column-icon`) ? (\n <slot name={`${key}-column-icon`} />\n ) : (\n icon &&\n !icon.hideOnHeader && (\n <span class=\"icon\" innerHTML={icon.icon}></span>\n )\n )}\n <ic-typography\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n {this.sortable && (\n <ic-button\n variant=\"icon\"\n id={`sort-button-${key}`}\n aria-label={this.getSortButtonLabel(key)}\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.sortRows(key)}\n innerHTML={\n this.SORT_ICONS[\n this.sortedColumn === key\n ? this.sortedColumnOrder\n : \"unsorted\"\n ]\n }\n class={{\n [\"sort-button\"]: true,\n [\"sort-button-unsorted\"]:\n this.sortedColumn !== key ||\n this.sortedColumnOrder === \"unsorted\",\n }}\n ></ic-button>\n )}\n </div>\n </th>\n ));\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data.slice(this.fromRow, this.toRow)\n : this.data.slice();\n\n /**\n * Ensures that createCells has a value in data to map over to actually render the slot.\n * Removes the need for the user to add it multiple times.\n */\n this.columns.forEach(({ key }) => {\n data.forEach((row, rowIndex) => {\n const cellSlotName = `${key}-${rowIndex}`;\n if (isSlotUsed(this.el, cellSlotName)) {\n row[key] = getSlotContent(this.el, cellSlotName);\n }\n });\n });\n\n return data\n .sort(!this.sortable ? undefined : this.getSortFunction())\n .map((row, index) => {\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index,\n });\n const findRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n return (\n <tr\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() =>\n (this.selectedRow =\n this.selectedRow !== row &&\n !this.loading &&\n !this.updating &&\n row)\n }\n class={{\n [\"table-row\"]: true,\n [\"table-row-selected\"]: this.selectedRow === row,\n }}\n style={{\n height: findRowHeight\n ? `${\n findRowHeight * this.DENSITY_HEIGHT_MULTIPLIER[this.density]\n }px`\n : null,\n }}\n >\n {this.createCells(row, index)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) => {\n return Object.values(cell)[Object.keys(cell).indexOf(key)];\n };\n\n private getSortButtonLabel = (key: string) => {\n let label = \"\";\n const getNextSortOption = (option: IcDataTableSortOrderOptions) => {\n const sortOrders = this.sortOptions.sortOrders;\n return sortOrders[(sortOrders.indexOf(option) + 1) % sortOrders.length];\n };\n\n if (this.sortedColumn === key) {\n const sortOption = getNextSortOption(this.sortedColumnOrder);\n label = sortOption !== \"unsorted\" ? `Sort ${sortOption}` : \"Remove sort\";\n } else {\n label = `Sort ${getNextSortOption(\"unsorted\")}`;\n }\n\n return label;\n };\n\n private getComparison = (targetRow: any, comparisonRow: any): number => {\n const targetRowValue = targetRow[this.sortedColumn];\n const comparisonRowValue = comparisonRow[this.sortedColumn];\n return this.columns.find((col) => col.key === this.sortedColumn)\n .dataType === \"date\"\n ? new Date(targetRowValue).valueOf() -\n new Date(comparisonRowValue).valueOf()\n : String(\n this.isObject(targetRowValue)\n ? Object.values(targetRowValue)[0]\n : targetRowValue\n ).localeCompare(\n String(\n this.isObject(comparisonRowValue)\n ? Object.values(comparisonRowValue)[0]\n : comparisonRowValue\n ),\n undefined,\n { numeric: true, sensitivity: \"base\" }\n );\n };\n\n private getSortFunction = () => {\n switch (this.sortedColumnOrder) {\n case \"ascending\":\n return (a: any, b: any) => this.getComparison(a, b);\n case \"descending\":\n return (a: any, b: any) => this.getComparison(b, a);\n default:\n return undefined;\n }\n };\n\n private sortRows = (column: string) => {\n const sortButton = this.el.shadowRoot.querySelector(\n `#sort-button-${column}`\n ) as HTMLIcButtonElement;\n\n const sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n const previousSortedButton = this.el.shadowRoot.querySelector(\n `#sort-button-${this.sortedColumn}`\n ) as HTMLIcButtonElement;\n previousSortedButton.setAttribute(\n \"aria-label\",\n this.getSortButtonLabel(column)\n ); // Passing through unsorted column returns correct label for newly unsorted column\n }\n this.sortedColumn = column;\n this.sortedColumnOrder = \"unsorted\";\n }\n\n let nextSortOrderIndex = sortOrders.indexOf(this.sortedColumnOrder) + 1;\n\n if (nextSortOrderIndex > sortOrders.length - 1) {\n nextSortOrderIndex = 0;\n }\n\n this.sortedColumnOrder = sortOrders[nextSortOrderIndex];\n\n sortButton.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n };\n\n private updateScrollOffset = () => {\n this.scrollOffset = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n ).scrollTop;\n };\n\n render() {\n const {\n caption,\n createColumnHeaders,\n createRows,\n createUpdatingIndicator,\n data,\n hideColumnHeaders,\n loading,\n loadingOptions,\n paginationBarOptions,\n scrollable,\n scrollOffset,\n showPagination,\n sortable,\n sortedColumnOrder,\n sortedColumn,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n } = this;\n\n return (\n <div class=\"table-container\">\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <div\n class={{\n [\"table-row-container\"]: true,\n scrollable,\n }}\n tabIndex={scrollable ? 0 : null}\n onScroll={updateScrollOffset}\n >\n <table>\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{createColumnHeaders()}</tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {data?.length > 0 && <tbody>{createRows()}</tbody>}\n </table>\n {!data?.length &&\n !loading &&\n (isSlotUsed(this.el, \"empty-state\") ? (\n <slot name=\"empty-state\" />\n ) : (\n <ic-empty-state\n aligned=\"center\"\n heading=\"No Data\"\n class=\"loading-empty\"\n ></ic-empty-state>\n ))}\n </div>\n {loading && (\n <ic-loading-indicator\n appearance={loadingOptions?.appearance}\n class={{\n \"loading-empty\": loading,\n loading: true,\n \"show-background\": loadingOptions.showBackground,\n }}\n description={loadingOptions.description || \"Loading table data\"}\n label={loadingOptions.label || \"Loading...\"}\n labelDuration={loadingOptions?.labelDuration}\n max={loadingOptions?.max}\n min={loadingOptions?.min}\n progress={loadingOptions?.progress}\n ref={(el: HTMLIcLoadingIndicatorElement) =>\n (this.loadingIndicator = el)\n }\n ></ic-loading-indicator>\n )}\n {showPagination && (\n <div class=\"pagination-container\">\n <ic-pagination-bar\n totalItems={data.length}\n type={paginationBarOptions.type}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n alignment={paginationBarOptions.alignment}\n appearance={paginationBarOptions.appearance}\n itemLabel={paginationBarOptions.itemLabel}\n pageLabel={paginationBarOptions.pageLabel}\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n ></ic-pagination-bar>\n </div>\n )}\n {sortable && (\n <div class=\"screen-reader-sort-text\" aria-live=\"polite\">\n {sortedColumnOrder !== \"unsorted\" && sortedColumn\n ? `${sortedColumn} sorted ${sortedColumnOrder}`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Ac,MAAdA,SAAc,SAAdA,EAAgB/H,WAC5BU,MAAO,CACL,gBAAiB8C,EACjBA,QAAS,KACT,kBAAmBuE,EAAeC,gBAEpC/H,YAAa8H,EAAe9H,aAAe,qBAC3CmF,MAAO2C,EAAe3C,OAAS,aAC/B+E,cAAepC,IAAc,MAAdA,SAAc,SAAdA,EAAgBoC,cAC/BjK,IAAK6H,IAAc,MAAdA,SAAc,SAAdA,EAAgB7H,IACrBC,IAAK4H,IAAc,MAAdA,SAAc,SAAdA,EAAgB5H,IACrBC,SAAU2H,IAAc,MAAdA,SAAc,SAAdA,EAAgB3H,SAC1BgK,IAAM7H,GACH1E,KAAK2L,iBAAmBjH,IAI9B4B,GACC7D,EAAA,OAAKI,MAAM,wBACTJ,EAAA,qBACE+J,WAAYnG,EAAKzD,OACjBG,KAAMiH,EAAqBjH,KAC3BuG,eAAgBU,EAAqBV,eACrCC,wBACES,EAAqBT,wBAEvBC,oBAAqBQ,EAAqBR,oBAC1CH,oBAAqBW,EAAqBX,oBAC1CxH,UAAWmI,EAAqBnI,UAChCM,WAAY6H,EAAqB7H,WACjCsH,UAAWO,EAAqBP,UAChCC,UAAWM,EAAqBN,UAChCC,eAAgBK,EAAqBL,kBAI1C9D,GACCpD,EAAA,OAAKI,MAAM,0BAAyB,YAAW,UAC5CsD,IAAsB,YAAcD,EACjC,GAAGA,YAAuBC,IAC1B,kB"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as o,f as i,h as a,H as e,g as r}from"./p-8455d1bb.js";import{w as n,j as s,v as c,T as l,k as d,i as h,d as u,a as b}from"./p-1b4f852c.js";import{I as v}from"./p-fd186591.js";import{c as p}from"./p-aae38bee.js";const f=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>\n</svg>`;const g='/*! 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;position:relative;--button-default:var(--ic-action-default);--button-default-hover:var(--ic-action-default-hover);--button-default-active:var(--ic-action-default-active);--button-default-background-hover:var(--ic-action-default-bg-hover);--button-default-background-active:var(--ic-action-default-bg-active);--icon-width:100%;--icon-height:100%}.button,::slotted(a){font-family:var(--ic-font-body-family);text-decoration:none;font-weight:600;font-size:0.875rem;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);min-width:var(--min-width, 6.25rem);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}:host(.with-badge) .button{border-radius:0.2188rem}.button:hover,::slotted(a:hover){cursor:pointer}.button:focus,:host .button:focus,:host(.light) .button:focus,::slotted(a:focus){box-shadow:var(--ic-border-focus)}.button:focus-visible,::slotted(a:focus-visible){outline:var(--ic-hc-focus-outline)}:host(.dark) .button,:host(.dark) ::slotted(a){--button-default:var(--ic-action-dark);--button-default-hover:var(--ic-action-dark);--button-default-active:var(--ic-action-dark);--button-default-background-hover:var(--ic-action-dark-bg-hover);--button-default-background-active:var(--ic-action-dark-bg-active)}:host(.light) .button,:host(.light) ::slotted(a){--button-default:var(--ic-action-light);--button-default-hover:var(--ic-action-light);--button-default-active:var(--ic-action-light);--button-default-background-hover:var(--ic-action-light-bg-hover);--button-default-background-active:var(--ic-action-light-bg-active)}:host(.white-background) .button,:host(.white-background) ::slotted(a){--button-default-background-hover:var(--ic-action-default-bg-hover-no-alpha);--button-default-background-active:var(\n --ic-action-default-bg-active-no-alpha\n );background-color:var(--ic-architectural-white)}:host(.white-background.dark) .button,:host(.white-background.dark) ::slotted(a){--button-default-background-hover:var(--ic-action-dark-bg-hover-no-alpha);--button-default-background-active:var(--ic-action-dark-bg-active-no-alpha)}:host(.button-variant-primary.light) .button,:host(.button-variant-primary.light) ::slotted(a){color:var(--ic-color-primary-text);--button-default-hover:var(--ic-action-light-hover);--button-default-active:var(--ic-action-light-active)}:host(.button-variant-primary.dark) .button,:host(.button-variant-primary.dark) ::slotted(a){--button-default-hover:var(--ic-action-dark-hover);--button-default-active:var(--ic-action-dark-active)}:host(.disabled),:host(.disabled) .button,:host(.disabled) ::slotted(a),:host(.loading),:host(.loading) .button{pointer-events:none}:host(.top-icon) .button{flex-direction:column;--height:fit-content}:host(.top-icon) .button .icon-container{margin-right:0}:host(.button-variant-primary) .button,:host(.button-variant-primary) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--button-default)}:host(.button-variant-primary) .button:hover:not(:focus){background-color:var(--button-default-hover)}:host(.button-variant-primary) .button:hover:focus{background-color:var(--button-default-hover);border-color:var(--button-default-hover)}:host(.button-variant-primary:not(.light)) .button:hover:focus,:host(.button-variant-primary:not(.light)) ::slotted(a:hover:focus){color:var(--ic-architectural-white)}:host(.button-variant-primary) .button:active:not(:focus),:host(.button-variant-primary.loading) .button{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active:focus{background-color:var(--button-default-active)}:host(.button-variant-primary) .button:active{background-color:var(--button-default-active)}:host(.button-variant-primary:not(.light)) .button:active,:host(.button-variant-primary:not(.light)) ::slotted(a:active){color:var(--ic-architectural-white)}:host(.button-variant-primary.disabled) .button,:host(.button-variant-primary.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-primary.light.disabled) .button,:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600);color:var(--ic-architectural-500)}:host(.button-variant-secondary) .button,:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default);color:var(--button-default)}:host(.button-variant-secondary) .button:hover:not(:focus),:host(.button-variant-secondary) .button:hover:focus,:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-secondary) .button:active:not(:focus),:host(.button-variant-secondary) .button:active:focus,:host(.button-variant-secondary) .button:active,:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.loading) .button{border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-secondary.disabled) .button,:host(.button-variant-secondary.disabled) .button:hover,:host(.button-variant-secondary.disabled) .button:active,:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-secondary.light.disabled) .button,:host(.button-variant-secondary.light.disabled) .button:hover,:host(.button-variant-secondary.light.disabled) .button:active,:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-tertiary) .button,:host(.button-variant-tertiary) ::slotted(a){color:var(--button-default)}:host(.button-variant-tertiary) .button:hover:not(:focus),:host(.button-variant-tertiary) .button:hover:focus,:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-tertiary) .button:active:not(:focus),:host(.button-variant-tertiary) .button:active:focus,:host(.button-variant-tertiary) .button:active,:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-tertiary.disabled) .button,:host(.button-variant-tertiary.disabled) .button:hover,:host(.button-variant-tertiary.disabled) .button:active,:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-tertiary.light.disabled) .button,:host(.button-variant-tertiary.light.disabled) .button:hover,:host(.button-variant-tertiary.light.disabled) .button:active,:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-destructive) .button,:host(.button-variant-destructive) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);text-transform:uppercase}:host(.button-variant-destructive) .button:hover:not(:focus),:host(.button-variant-destructive) .button:hover:focus{background-color:var(--ic-action-destructive-hover)}:host(.button-variant-destructive) .button:active:not(:focus),:host(.button-variant-destructive) .button:active:focus,:host(.button-variant-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-destructive.disabled) .button,:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-variant-icon) .button,:host(.button-variant-icon) ::slotted(a){color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon) .button:hover:not(:focus),:host(.button-variant-icon) .button:hover:focus,:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon) .button:active:not(:focus),:host(.button-variant-icon) ::slotted(a:active:not(:focus)),:host(.button-variant-icon.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon.disabled) .button,:host(.button-variant-icon.disabled) .button:hover,:host(.button-variant-icon.disabled) .button:active,:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){color:var(--ic-architectural-300);background:none}:host(.button-variant-icon-primary) .button,:host(.button-variant-icon-primary) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon-primary) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon-primary) .button:hover:not(:focus),:host(.button-variant-icon-primary) ::slotted(a:hover:not(:focus)){background-color:var(--button-default-hover)}:host(.button-variant-icon-primary) .button:hover:focus,:host(.button-variant-icon-primary) ::slotted(a:hover:focus){background-color:var(--button-default-hover);border-color:var(--button-default-hover)}:host(.button-variant-icon-primary) .button:active:not(:focus),:host(.button-variant-icon-primary) .button:active:focus,:host(.button-variant-icon-primary) .button:active,:host(.button-variant-icon-primary) ::slotted(a:active:not(:focus)),:host(.button-variant-icon-primary) ::slotted(a:active:focus),:host(.button-variant-icon-primary) ::slotted(a:active),:host(.button-variant-icon-primary.loading) .button{background:var(--button-default-active)}:host(.button-variant-icon-primary.loading) .button ic-loading-indicator{--inner-color:var(--ic-architectural-white)}:host(.button-variant-icon-primary:not(.light)) .button:active,:host(.button-variant-icon-primary:not(.light)) ::slotted(a:active){color:var(--ic-architectural-white)}:host(.button-variant-icon-primary.disabled) .button,:host(.button-variant-icon-primary.disabled) .button:hover,:host(.button-variant-icon-primary.disabled) .button:active,:host(.button-variant-icon-primary.disabled) ::slotted(a),:host(.button-variant-icon-primary.disabled) ::slotted(a:hover),:host(.button-variant-icon-primary.disabled) ::slotted(a:active){color:var(--ic-architectural-300);background:var(--ic-architectural-200)}:host(.button-variant-icon-primary.light) .button,:host(.button-variant-icon-primary.light) ::slotted(a){color:var(--ic-color-primary-text)}:host(.button-variant-icon-primary.light) .button,:host(.button-variant-icon-primary.light) ::slotted(a){color:var(--ic-color-primary-text)}:host(.button-variant-icon-primary.light) .button:hover,:host(.button-variant-icon-primary.light) ::slotted(a:hover){background:var(--ic-action-light-hover)}:host(.button-variant-icon-primary.light) .button:active,:host(.button-variant-icon-primary.light) ::slotted(a:active),:host(.button-variant-icon-primary.light.loading) .button,:host(.button-variant-icon-primary.light.loading) ::slotted(a){background:var(--ic-architectural-300)}:host(.button-variant-icon-primary.dark) .button,:host(.button-variant-icon-primary.dark) ::slotted(a){color:var(--ic-architectural-white)}:host(.button-variant-icon-primary.dark) .button:hover,:host(.button-variant-icon-primary.dark) ::slotted(a:hover){background:var(--ic-action-dark-hover)}:host(.button-variant-icon-primary.dark) .button:active,:host(.button-variant-icon-primary.dark) ::slotted(a:active),:host(.button-variant-icon-primary.dark.loading) .button,:host(.button-variant-icon-primary.dark.loading) ::slotted(a){background:var(--ic-action-dark-active)}:host(.button-variant-icon-secondary) .button,:host(.button-variant-icon-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default);color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon-secondary) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon-secondary) .button:hover:not(:focus),:host(.button-variant-icon-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon-secondary) .button:hover:focus,:host(.button-variant-icon-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);border-color:var(--button-default-hover);color:var(--button-default-hover)}:host(.button-variant-icon-secondary) .button:active:not(:focus),:host(.button-variant-icon-secondary) .button:active:focus,:host(.button-variant-icon-secondary) .button:active,:host(.button-variant-icon-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-icon-secondary) ::slotted(a:active:focus),:host(.button-variant-icon-secondary) ::slotted(a:active){border-color:var(--button-default-active);background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon-secondary.loading) .button{border-color:var(--button-default-active);background:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon-secondary.disabled) .button,:host(.button-variant-icon-secondary.disabled) .button:hover,:host(.button-variant-icon-secondary.disabled) .button:active,:host(.button-variant-icon-secondary.disabled) ::slotted(a),:host(.button-variant-icon-secondary.disabled) ::slotted(a:hover),:host(.button-variant-icon-secondary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300);color:var(--ic-architectural-300);background:none}:host(.button-variant-icon-secondary.light.disabled) .button,:host(.button-variant-icon-secondary.light.disabled) .button:hover,:host(.button-variant-icon-secondary.light.disabled) .button:active,:host(.button-variant-icon-secondary.light.disabled) ::slotted(a),:host(.button-variant-icon-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-icon-secondary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500);color:var(--ic-architectural-500);background:none}:host(.button-variant-icon-tertiary) .button,:host(.button-variant-icon-tertiary) ::slotted(a){color:var(--button-default);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon-tertiary) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon-tertiary) .button:hover:not(:focus),:host(.button-variant-icon-tertiary) .button:hover:focus,:host(.button-variant-icon-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon-tertiary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover);color:var(--button-default-hover)}:host(.button-variant-icon-tertiary) .button:active:not(:focus),:host(.button-variant-icon-tertiary) .button:active:focus,:host(.button-variant-icon-tertiary) .button:active,:host(.button-variant-icon-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-icon-tertiary) ::slotted(a:active:focus),:host(.button-variant-icon-tertiary) ::slotted(a:active),:host(.button-variant-icon-tertiary.loading) .button{background-color:var(--button-default-background-active);color:var(--button-default-active)}:host(.button-variant-icon-tertiary.disabled) .button,:host(.button-variant-icon-tertiary.disabled) .button:hover,:host(.button-variant-icon-tertiary.disabled) .button:active,:host(.button-variant-icon-tertiary.disabled) ::slotted(a),:host(.button-variant-icon-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-icon-tertiary.disabled) ::slotted(a:active){color:var(--ic-architectural-300);background:none}:host(.button-variant-icon-destructive) .button,:host(.button-variant-icon-destructive) ::slotted(a){color:var(--ic-architectural-white);background-color:var(--ic-action-destructive);min-width:0;gap:var(--ic-space-xs);margin:var(--ic-space-1px) 0}:host(.button-variant-icon-destructive) .icon-container{width:var(--ic-space-lg) !important;height:var(--ic-space-lg) !important}:host(.button-variant-icon-destructive) .button:hover:not(:focus),:host(.button-variant-icon-destructive) .button:hover:focus,:host(.button-variant-icon-destructive) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon-destructive) ::slotted(a:hover:focus){background-color:var(--ic-action-destructive-hover)}:host(.button-variant-icon-destructive) .button:active:not(:focus),:host(.button-variant-icon-destructive) .button:active:focus,:host(.button-variant-icon-destructive) ::slotted(a:active:not(:focus)),:host(.button-variant-icon-destructive.loading) .button{background-color:var(--ic-action-destructive-active)}:host(.button-variant-icon-destructive.loading) .button ic-loading-indicator{--inner-color:var(--ic-architectural-white)}:host(.button-variant-icon-destructive.disabled) .button,:host(.button-variant-icon-destructive.disabled) .button:hover,:host(.button-variant-icon-destructive.disabled) .button:active,:host(.button-variant-icon-destructive.disabled) ::slotted(a),:host(.button-variant-icon-destructive.disabled) ::slotted(a:hover),:host(.button-variant-icon-destructive.disabled) ::slotted(a:active){background:var(--ic-architectural-200);color:var(--ic-architectural-300)}:host(.button-size-default) .button{height:var(--height, 2.5rem);padding:var(--ic-space-xs) var(--ic-space-md)}:host(.button-size-small) .button{height:var(--height, var(--ic-space-xl));padding:var(--ic-space-xxs) var(--ic-space-md)}:host(.button-size-large) .button{height:var(--height, var(--ic-space-xxl));padding:var(--ic-space-sm) var(--ic-space-md)}:host(.button-size-default.button-variant-icon) .button,:host(.button-size-default.button-variant-icon-primary) .button,:host(.button-size-default.button-variant-icon-secondary) .button,:host(.button-size-default.button-variant-icon-tertiary) .button,:host(.button-size-default.button-variant-icon-destructive) .button,:host(.button-size-default.button-variant-icon-primary) ::slotted(a),:host(.button-size-default.button-variant-icon-secondary) ::slotted(a),:host(.button-size-default.button-variant-icon-tertiary) ::slotted(a),:host(.button-size-default.button-variant-icon-destructive) ::slotted(a),:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl));width:var(--ic-space-xl);padding:0.375rem}:host(.button-size-small.button-variant-icon) .button,:host(.button-size-small.button-variant-icon-primary) .button,:host(.button-size-small.button-variant-icon-secondary) .button,:host(.button-size-small.button-variant-icon-tertiary) .button,:host(.button-size-small.button-variant-icon-destructive) .button,:host(.button-size-small.button-variant-icon-primary) ::slotted(a),:host(.button-size-small.button-variant-icon-secondary) ::slotted(a),:host(.button-size-small.button-variant-icon-tertiary) ::slotted(a),:host(.button-size-small.button-variant-icon-destructive) ::slotted(a),:host(.button-size-small.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-lg));width:var(--ic-space-lg);padding:var(--ic-space-xxs)}:host(.button-size-large.button-variant-icon) .button,:host(.button-size-large.button-variant-icon-primary) .button,:host(.button-size-large.button-variant-icon-secondary) .button,:host(.button-size-large.button-variant-icon-tertiary) .button,:host(.button-size-large.button-variant-icon-destructive) .button,:host(.button-size-large.button-variant-icon-primary) ::slotted(a),:host(.button-size-large.button-variant-icon-secondary) ::slotted(a),:host(.button-size-large.button-variant-icon-tertiary) ::slotted(a),:host(.button-size-large.button-variant-icon-destructive) ::slotted(a),:host(.button-size-large.button-variant-icon) ::slotted(a){height:var(--height, 2.5rem);width:2.5rem;padding:var(--ic-space-xs)}:host(.full-width),:host(.full-width) .button,:host(.full-width) ::slotted(a){width:100%}div.loading-container{position:relative;align-items:center;width:100%}ic-loading-indicator{--outer-color:transparent}@keyframes loading-animation{0%{width:0%;left:0%}25%{width:0%;left:0%;opacity:0}50%{width:100%;left:0%;opacity:1}75%{width:0%;left:100%}100%{width:0%;left:100%;opacity:0}}div.icon-container{box-sizing:border-box;width:var(--ic-space-lg);height:var(--ic-space-lg);display:flex;justify-content:center;align-items:center;margin-right:var(--ic-space-xs)}div.right-icon{margin-right:auto;margin-left:var(--ic-space-xs)}:host(.full-width) .right-icon{margin-right:var(--ic-space-xs)}::slotted(:not(ic-badge)){width:var(--icon-width) !important;height:var(--icon-height) !important;fill:currentcolor !important;pointer-events:none}:host(.button-variant-icon) .button .icon-container{margin:0;pointer-events:none}:host(.search-submit-button) ::slotted(svg){--icon-height:1.25rem;--icon-width:1.25rem}:host(.search-submit-button-small) ::slotted(svg){--icon-height:1rem;--icon-width:1rem}:host(.clear-button){margin:0 var(--ic-space-xxs)}:host(.clear-button) .button:focus,:host(.calendar-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:focus{box-shadow:none}:host(.search-submit-button) .button:not(:active):focus{box-shadow:none;background-color:var(--ic-action-default-bg-hover)}:host(.search-submit-button){display:flex;align-items:center;margin:0 var(--ic-space-xxs)}:host(.menu-close-button) ::slotted(svg){--icon-height:0.875rem;--icon-width:0.875rem}:host(.popout-menu-button) .button{height:var(--height);justify-content:left;border-radius:0;white-space:pre-line;text-align:start}:host(.popout-menu-button) div.icon-container{flex:none}:host(.popout-menu-button) .button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}.ic-button-describedby{display:none}:host .ic-tooltip{display:block}:host .arrow-dropdown{margin-top:auto}:host .dropdown-expanded{transform:rotate(180deg);margin-bottom:var(--ic-space-xxxs)}:host(.dropdown-no-icon) .button{padding-right:var(--ic-space-xs)}slot[name="router-item"]::slotted(a){pointer-events:all}::slotted(a){font-size:0.875rem !important;border:none !important;vertical-align:middle !important}:host(.white-background) ::slotted(a){background-color:var(--ic-architectural-white) !important}:host(.button-variant-primary) ::slotted(a){background-color:var(--button-default) !important}:host(.button-variant-primary) ::slotted(a:hover:not(:focus)),:host(.button-variant-primary) ::slotted(a:hover:focus){background-color:var(--button-default-hover) !important}:host(.button-variant-primary) ::slotted(a:active:not(:focus)),:host(.button-variant-primary) ::slotted(a:active),:host(.button-variant-primary) ::sloted(a:active:focus){background-color:var(--button-default-active) !important}:host(.button-variant-primary.disabled) ::slotted(a),:host(.button-variant-destructive.disabled) ::slotted(a){background:var(--ic-architectural-200) !important}:host(.button-variant-primary.light.disabled) ::slotted(a){background:var(--ic-architectural-600) !important}:host(.button-variant-secondary) ::slotted(a){border:var(--ic-border-width) solid var(--button-default) !important}:host(.button-variant-secondary) ::slotted(a:hover:not(:focus)),:host(.button-variant-secondary) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important;border-color:var(--button-default-hover) !important}:host(.button-variant-secondary) ::slotted(a:active:not(:focus)),:host(.button-variant-secondary) ::slotted(a:active:focus),:host(.button-variant-secondary) ::slotted(a:active){border-color:var(--button-default-active) !important;background-color:var(--button-default-background-active) !important}:host(.button-variant-secondary.disabled) ::slotted(a),:host(.button-variant-secondary.disabled) ::slotted(a:hover),:host(.button-variant-secondary.disabled) ::slotted(a:active),:host(.button-variant-tertiary.disabled) ::slotted(a),:host(.button-variant-tertiary.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.disabled) ::slotted(a:active){border-color:var(--ic-architectural-300) !important;background:none !important}:host(.button-variant-secondary.light.disabled) ::slotted(a),:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),:host(.button-variant-secondary.light.disabled) ::slotted(a:active),:host(.button-variant-tertiary.light.disabled) ::slotted(a),:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),:host(.button-variant-tertiary.light.disabled) ::slotted(a:active){border-color:var(--ic-architectural-500) !important;background:none !important}:host(.button-variant-tertiary) ::slotted(a:hover:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:hover:focus),:host(.button-variant-icon) ::slotted(a:hover:not(:focus)),:host(.button-variant-icon) ::slotted(a:hover:focus){background-color:var(--button-default-background-hover) !important}:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),:host(.button-variant-tertiary) ::slotted(a:active:focus),:host(.button-variant-tertiary) ::slotted(a:active),:host(.button-variant-icon) ::slotted(a:active:not(:focus)){background-color:var(--button-default-background-active) !important}:host(.button-variant-icon.disabled) ::slotted(a),:host(.button-variant-icon.disabled) ::slotted(a:hover),:host(.button-variant-icon.disabled) ::slotted(a:active){background:none !important}:host(.button-variant-destructive) ::slotted(a){background-color:var(--ic-action-destructive) !important}:host(.button-variant-destructive) ::slotted(a:hover:not(:focus)),:host(.button-variant-destructive) ::slotted(a:hover:focus){background-color:var(--ic-action-destructive-hover) !important}:host(.button-variant-destructive) ::slotted(a:active:not(:focus)),:host(.button-variant-destructive) ::slotted(a:active:focus){background-color:var(--ic-action-destructive-active) !important}:host(.button-size-default) ::slotted(a){height:var(--height, 2.5rem) !important;padding:var(--ic-space-xs) var(--ic-space-md) !important}:host(.button-size-small) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:var(--ic-space-xxs) var(--ic-space-md) !important}:host(.button-size-large) ::slotted(a){height:var(--height, var(--ic-space-xxl)) !important;padding:var(--ic-space-sm) var(--ic-space-md) !important}:host(.button-size-default.button-variant-icon) ::slotted(a){height:var(--height, var(--ic-space-xl)) !important;padding:0.375rem !important}:host(.button-size-small.button-variant-icon) ::slotted(a){padding:var(--ic-space-xxs) !important}:host(.button-size-large.button-variant-icon) ::slotted(a){padding:var(--ic-space-xs) !important}@media (forced-colors: active){.button,::slotted(a){border:0.125rem solid transparent !important}}:host(.flip) ::slotted(svg){transform:scaleX(-1)}';var m=undefined&&undefined.__rest||function(t,o){var i={};for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&o.indexOf(a)<0)i[a]=t[a];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var e=0,a=Object.getOwnPropertySymbols(t);e<a.length;e++){if(o.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(t,a[e]))i[a[e]]=t[a[e]]}return i};let y=0;const k=class{constructor(a){t(this,a);this.icBlur=o(this,"icBlur",7);this.icFileSelection=o(this,"icFileSelection",7);this.icFocus=o(this,"icFocus",7);this.buttonIdNum=y++;this.hasTooltip=false;this.inheritedAttributes={};this.describedbyEl=null;this.describedById=null;this.mutationObserver=null;this.hostMutationObserver=null;this.handleClick=()=>{if((this.el.type==="submit"||this.el.type==="reset")&&!this.hasRouterSlot()&&!!this.el.closest("FORM")){const t=document.createElement("button");t.setAttribute("type",this.el.type);t.style.display="none";this.el.closest("FORM").appendChild(t);t.click();t.remove()}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.mutationCallback=()=>{this.describedByContent=this.describedbyEl.innerText};this.hostMutationCallback=t=>{let o=false;t.forEach((({attributeName:t})=>{const i=this.el.getAttribute(t);if(t==="title")this.title=i;else if(t==="aria-label")this.ariaLabel=i;if(n.includes(t)){this.inheritedAttributes[t]=i;o=true}}));if(o){i(this)}};this.setHasTooltip=()=>{this.hasTooltip=!this.disableTooltip&&(!!this.title||this.variant==="icon")};this.ariaLabel=null;this.describedByContent=null;this.title=null;this.accept="*";this.appearance="default";this.ariaControlsId=undefined;this.ariaOwnsId=undefined;this.disabled=false;this.disableTooltip=false;this.download=false;this.dropdown=false;this.dropdownExpanded=false;this.fileUpload=false;this.fileInputName=`ic-button-file-upload-input-${y++}`;this.form=undefined;this.formaction=undefined;this.formenctype=undefined;this.formmethod=undefined;this.formnovalidate=undefined;this.formtarget=undefined;this.fullWidth=false;this.href=undefined;this.hreflang=undefined;this.loading=false;this.multiple=false;this.referrerpolicy=undefined;this.rel=undefined;this.selectedFiles=undefined;this.size="default";this.target=undefined;this.tooltipPlacement="bottom";this.transparentBackground=true;this.type="button";this.variant="primary"}watchDisabledHandler(){s(this.disabled,this.el)}disconnectedCallback(){if(this.mutationObserver!==null&&this.mutationObserver!==undefined){this.mutationObserver.disconnect()}if(this.hostMutationObserver!==null&&this.hostMutationObserver!==undefined){this.hostMutationObserver.disconnect()}}componentWillUpdate(){if(this.loading){this.el.style.setProperty("--min-width",`${this.el.getBoundingClientRect().width}px`)}this.setHasTooltip()}componentWillLoad(){const t=c(this.el,[...n,"title"]),{title:o,"aria-label":i}=t,a=m(t,["title","aria-label"]);this.title=o;this.ariaLabel=i;this.inheritedAttributes=a;s(this.disabled,this.el);this.el.setAttribute("exportparts","button");this.id=this.el.id||null;this.setHasTooltip();if(!this.hasTooltip){const t=this.inheritedAttributes["aria-describedby"];if(t!==undefined){this.describedById=t;const o=this.el.parentElement.querySelector(`#${t}`);if(o){this.describedByContent=o.innerText;this.describedbyEl=o}}}}componentDidLoad(){this.updateTheme();if(typeof MutationObserver!=="undefined"){if(this.describedById){this.mutationObserver=new MutationObserver(this.mutationCallback);this.mutationObserver.observe(this.describedbyEl,{characterData:true,childList:true,subtree:true})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true})}}componentWillRender(){const t=this.hasIconSlot("left")?this.el.querySelector(`[slot="left-icon"]`):this.hasIconSlot("right")?this.el.querySelector(`[slot="right-icon"]`):null;t===null||t===void 0?void 0:t.setAttribute("viewBox","0 0 24 24")}handleHostClick(t){if(!this.hasRouterSlot()){if(this.fileUpload){l(this.icFileSelection,this.el,this.multiple,this.fileInputName,this.selectedFiles,this.disabled,this.accept)}if(this.disabled||this.loading){t.stopImmediatePropagation()}if(this.dropdown){this.dropdownExpanded=!this.dropdownExpanded}}}themeChangeHandler({detail:t}){this.updateTheme(t.mode)}async setFocus(){var t;(t=this.buttonEl)===null||t===void 0?void 0:t.focus()}hasIconSlot(t){const o=t?`${t}-`:"";return this.el.querySelector(`[slot="${o}icon"]`)!==null}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}updateTheme(t=null){const o=d(this.el,t);if(o!==v.Default){this.appearance=o}}render(){const t=this.href&&"a"||"button";const{title:o,ariaLabel:i,inheritedAttributes:r}=this;const n=t==="button"?{type:this.type,disabled:this.disabled,form:this.form,formaction:this.formaction,formenctype:this.formenctype,formmethod:this.formmethod,formnovalidate:this.formnovalidate,formtarget:this.formtarget}:{download:this.download!==false?this.download:null,href:this.href,rel:this.rel,target:this.target,referrerpolicy:this.referrerpolicy,hreflang:this.hreflang};let s=null;let c=null;if(this.hasTooltip){c=this.id!==null?`ic-button-with-tooltip-${this.id}`:`ic-button-with-tooltip-${this.buttonIdNum}`;s=this.variant==="icon"&&!!i?null:`ic-tooltip-${c}`}else{s=this.describedById}const l=()=>a(t,Object.assign({class:"button","aria-disabled":this.loading||this.disabled?"true":null,"aria-label":this.loading?"Loading":i,"aria-expanded":this.dropdown&&`${this.dropdownExpanded}`},n,r,{onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.buttonEl=t,"aria-describedby":s,part:"button"}),this.hasIconSlot()&&!this.loading&&a("div",{class:"icon-container"},a("slot",{name:"icon"})),this.hasIconSlot("left")&&!this.loading&&a("div",{class:"icon-container"},a("slot",{name:"left-icon"})),this.hasIconSlot("top")&&!this.hasIconSlot("left")&&!this.hasIconSlot("right")&&!this.loading&&a("div",{class:"icon-container"},a("slot",{name:"top-icon"})),this.loading?a("div",{class:"loading-container"},a("ic-loading-indicator",{type:"linear",appearance:this.variant==="primary"||this.variant==="destructive"||this.appearance===v.Dark||this.appearance===v.Light?"light":"dark"})):a("slot",null),this.hasIconSlot("right")&&!this.loading&&!this.dropdown&&a("div",{class:{"icon-container":true,"right-icon":true}},a("slot",{name:"right-icon"})),this.dropdown&&!this.loading&&this.variant!=="icon"&&this.variant!=="destructive"&&a("span",{class:{["arrow-dropdown"]:!this.dropdownExpanded,["dropdown-expanded"]:this.dropdownExpanded},innerHTML:f}));return a(e,{class:{["disabled"]:this.disabled&&!this.loading,[`button-variant-${this.variant}`]:true,[`button-size-${this.size}`]:true,["loading"]:this.loading,["dark"]:this.appearance===v.Dark,["light"]:this.appearance===v.Light,["full-width"]:this.fullWidth,["with-badge"]:h(this.el,"badge"),["dropdown-no-icon"]:this.dropdown&&!h(this.el,"icon")&&!h(this.el,"left-icon"),["top-icon"]:h(this.el,"top-icon"),["white-background"]:this.variant==="secondary"&&!this.transparentBackground&&this.appearance!=="light"},onClick:this.handleClick,"aria-owns":this.ariaOwnsId,"aria-controls":this.ariaControlsId,"aria-expanded":this.dropdown&&`${this.dropdownExpanded}`},this.hasTooltip&&a("ic-tooltip",{id:s,label:o||i,target:c,placement:this.tooltipPlacement,silent:this.variant==="icon"&&!!i},this.hasRouterSlot()?a("slot",{name:"router-item"}):a(l,null)),h(this.el,"badge")&&a("slot",{name:"badge"}),!this.hasTooltip&&(this.hasRouterSlot()?a("slot",{name:"router-item"}):a(l,null)),this.describedByContent&&a("span",{id:s,class:"ic-button-describedby"},this.describedByContent))}static get delegatesFocus(){return true}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};k.style=g;const w='/*! 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;--linear-border-radius:0.25rem;--inner-color:var(--ic-action-default);--outer-color:var(--ic-architectural-100);--label-color:var(--ic-color-primary-text);--margin:none;--linear-line-height:var(--ic-space-xs)}:host(.light){--inner-color:var(--ic-architectural-white);--outer-color:var(--ic-architectural-800);--label-color:var(--ic-architectural-white)}.ic-loading-container{display:flex;flex-direction:column;justify-content:center;align-items:center}:host([size="small"]){--circular-diameter:2.5rem;--linear-line-height:var(--ic-space-xxs)}:host([size="default"]){--circular-diameter:5rem}:host([size="large"]){--circular-diameter:7.5rem}:host([size="icon"]){display:inline-block;--margin:var(--ic-space-xxxs);--circular-diameter:1.25rem}:host(.label){--margin:0 0 var(--ic-space-xs) 0}.ic-loading-label{color:var(--label-color);margin-left:var(--label-margin-left)}.ic-loading-circular-outer{height:var(--circular-diameter);width:var(--circular-diameter)}.ic-loading-circular-outer.indeterminate{animation:circular-animation 1s linear;animation-iteration-count:infinite}@keyframes circular-animation{100%{transform:rotate(360deg)}}.ic-loading-circular-outer,.ic-loading-linear-outer{margin:var(--margin)}.ic-loading-linear-outer{background-color:var(--outer-color);height:var(--linear-line-height);width:100%;border-radius:var(--linear-border-radius);overflow:hidden}.ic-loading-linear-inner{position:relative;height:100%;background-color:var(--inner-color);border-radius:var(--linear-border-radius)}.indeterminate>.ic-loading-linear-inner{animation:linear-animation 2s infinite}.determinate>.ic-loading-linear-inner{transition:width 0.5s;width:var(--linear-width)}:host(.full-width){--linear-border-radius:none}@keyframes linear-animation{0%{width:0%;left:-1%}25%{width:0%;left:-1%}50%{width:101%;left:-1%}75%{width:0%;left:101%}100%{width:0%;left:101%}}.ic-loading-circular-svg{position:relative;width:100%;height:100%;transform:rotate(-90deg)}.ic-loading-circular-svg circle{width:100%;height:100%;fill:none;stroke:var(--compact-step-outer-color, var(--outer-color));stroke-width:var(--circular-line-width);stroke-linecap:round}.ic-loading-circular-svg circle:nth-child(2){--circular-indeterminate:calc(\n (0.25 * var(--stroke-dasharray)) - var(--stroke-dasharray)\n );stroke-dasharray:var(--stroke-dasharray), var(--stroke-dasharray);stroke-dashoffset:var(--stroke-dashoffset, var(--circular-indeterminate));stroke:var(--compact-step-inner-color, var(--inner-color))}:host(.inner-label) .ic-loading-circular-inner{display:grid}:host(.inner-label) .ic-loading-circular-svg,.inner-text{grid-column:1;grid-row:1}:host(.not-required.compact-step-progress-indicator) .ic-loading-circular-svg circle:nth-child(2){stroke:var(--ic-architectural-300)}.inner-text{display:flex;align-items:center;justify-content:center;width:var(--ic-space-lg);height:inherit;overflow:hidden;margin:auto;color:var(--compact-step-inner-color, var(--ic-status-info))}:host(.not-required.compact-step-progress-indicator) .inner-text{color:var(--ic-color-tertiary-text)}:host(.light.not-required.compact-step-progress-indicator) .inner-text{color:var(--ic-architectural-400)}@media (forced-colors: active){.indeterminate>.ic-loading-circular-inner{forced-color-adjust:none}.ic-loading-linear-outer{border:var(--ic-hc-border)}.ic-loading-linear-inner{background-color:canvastext}.ic-loading-circular-svg circle{stroke:Background}.ic-loading-circular-svg circle:nth-child(2){stroke:canvastext}:host(.not-required.compact-step-progress-indicator) .ic-loading-circular-svg circle:nth-child(2){stroke:GrayText}}';const x=class{constructor(o){t(this,o);this.updateCircularProgressMeter=()=>{if(!this.indeterminate){this.circularMeter.style.setProperty("--progress-value",String(this.progress))}};this.getLabel=(t,o)=>new Promise((()=>{this.interval=setInterval((()=>{if(t<this.labelList.length-1){t++}else{t=0}o(this.labelList[t])}),this.labelDuration)}));this.getLabelVariant=()=>{var t;let o="h4";const i=(t=this.outerElement)===null||t===void 0?void 0:t.offsetWidth;if(this.size==="small"||this.type==="circular"&&i<60){o="label"}else if(this.size==="large"||this.type==="circular"&&i>=120){o="h2"}return o};this.setCircleLineWidth=()=>{const{offsetWidth:t}=this.outerElement;const o=this.el.classList.contains("compact-step-progress-indicator")?40:0;const i=this.el.classList.contains("toast-dismiss-timer")?20:0;if(t||o||i){this.circularLineWidth=(o||i||t)*.1;this.circularDiameter=o||i||t;this.outerElement.style.setProperty("--circular-line-width",`${this.circularLineWidth}px`)}};this.setLinearDeterminateWidth=()=>{if(!this.innerElement)return;const t=Math.min(this.max,Math.max(this.min,this.progress));const o=(t-this.min)/(this.max-this.min);this.showSecond=o>.5;if(this.showSecond){this.innerElement.classList.remove("clip")}else{this.innerElement.classList.add("clip")}this.innerElement.style.setProperty("--linear-width",`${o*100}%`)};this.calcOuterClass=()=>{let t=`ic-loading-${this.type}-outer`;t+=this.indeterminate?" indeterminate":" determinate";return t};this.updateLabel=()=>{if(u(this.label)){this.labelList=this.label.split("/");const t=0;this.indicatorLabel=this.labelList[t];if(this.labelList.length>1){this.getLabel(t,(t=>{this.indicatorLabel=t}))}}};this.setCircleXY=()=>{if(this.circularDiameter>0){const t=this.circularDiameter/2;const o=t;const i=t;const a=t-this.circularLineWidth/2;this.setDashSteps(a);return{x:o,y:i,r:a}}return{x:0,y:0,r:0}};this.setDashSteps=t=>{const o=2*Math.PI*t;const i=Math.min(Math.max(this.progress,this.min),this.max);const a=-1-(i-this.min)/(this.max-this.min);this.circularMeter.style.setProperty("--stroke-dasharray",`${o}px`);if(!this.indeterminate){this.circularMeter.style.setProperty("--circular-steps-max",String(this.max));this.circularMeter.style.setProperty("--stroke-dashoffset",`${a*o}px`)}};this.circularDiameter=undefined;this.circularLineWidth=undefined;this.indeterminate=undefined;this.indicatorLabel=undefined;this.showSecond=false;this.appearance="dark";this.description="Loading";this.fullWidth=false;this.innerLabel=undefined;this.labelDuration=8e3;this.max=100;this.min=0;this.size="default";this.type="circular";this.label=undefined;this.progress=undefined}watchPropHandler(){this.updateLabel()}watchProgressHandler(){if(this.type==="circular"){this.updateCircularProgressMeter()}}disconnectedCallback(){clearInterval(this.interval)}componentWillLoad(){this.indeterminate=this.progress===undefined;this.updateLabel();this.el.setAttribute("exportparts","ic-loading-container")}componentDidLoad(){if(this.type==="circular"){this.setCircleLineWidth();this.circularMeter=this.el.shadowRoot.querySelector(".ic-loading-circular-svg circle:nth-child(2)");this.updateCircularProgressMeter()}if(Number(this.progress)>=0&&this.type==="linear"){this.setLinearDeterminateWidth()}}componentWillUpdate(){this.indeterminate=this.progress===undefined}componentDidUpdate(){if(Number(this.progress)>=0&&this.type==="linear"){this.setLinearDeterminateWidth()}}render(){const{appearance:t,label:o,description:i,size:r,fullWidth:n,innerLabel:s}=this;const{x:c,y:l,r:d}=this.setCircleXY();return a(e,{class:{["light"]:t===v.Light,["label"]:!!o,["full-width"]:n,["inner-label"]:!!s}},a("div",{class:"ic-loading-container",part:"ic-loading-container"},a("div",{ref:t=>this.outerElement=t,class:this.calcOuterClass(),role:"progressbar","aria-labelledby":this.label&&this.size!=="icon"&&"ic-loading-label","aria-label":i,"aria-valuenow":this.progress,"aria-valuemin":this.min,"aria-valuemax":this.max},a("div",{ref:t=>this.innerElement=t,class:`ic-loading-${this.type}-inner`},this.innerLabel&&this.innerLabel!==undefined&&this.size==="small"&&a("ic-typography",{variant:"subtitle-small",class:"inner-text"},this.innerLabel),this.type==="circular"&&a("svg",{class:"ic-loading-circular-svg",viewBox:`0 0 ${this.circularDiameter||0} ${this.circularDiameter||0}`},a("circle",{cx:`${c}`,cy:`${l}`,r:`${d}`}),a("circle",{cx:`${c}`,cy:`${l}`,r:`${d}`})))),o&&r!=="icon"&&a("ic-typography",{id:"ic-loading-label",class:"ic-loading-label",role:"status",variant:this.getLabelVariant()},a("p",null,this.indicatorLabel))))}get el(){return r(this)}static get watchers(){return{label:["watchPropHandler"],progress:["watchProgressHandler"]}}};x.style=w;const z='/*! 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(.ic-tooltip){width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content}:host(.ic-tooltip) .ic-tooltip-container{background-color:var(--ic-architectural-800);color:#ffff;text-align:center;padding:var(--ic-space-xxxs) var(--ic-space-xs);border-radius:var(--ic-border-radius);border:var(--ic-border-width) solid var(--ic-architectural-40);position:absolute;max-width:20rem;display:none;z-index:var(--ic-z-index-tooltip);box-shadow:var(--ic-elevation-overlay)}:host(.tooltip-navigation-item:not(.tooltip-navigation-item-side-nav-collapsed)) .ic-tooltip-container,:host(.tooltip-disabled) .ic-tooltip-container{display:none !important}:host(.tooltip-long-label-navigation-item-side-nav-expanded) .ic-tooltip-container[data-show]{display:block !important}:host(.ic-tooltip) .ic-tooltip-arrow,:host(.ic-tooltip) .ic-tooltip-arrow::before{position:absolute;background:inherit}:host(.ic-tooltip) .ic-tooltip-arrow{visibility:hidden;width:var(--ic-space-md);height:var(--ic-space-md)}:host(.ic-tooltip) .ic-tooltip-arrow::before{visibility:visible;content:"";border:var(--ic-border-width) solid var(--ic-architectural-40);width:100%;height:100%}:host(.ic-tooltip) .ic-tooltip-container[data-show]{display:block}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="top"]>.ic-tooltip-arrow{height:var(--ic-space-xxxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="top"]>.ic-tooltip-arrow::before{border-radius:0 0 var(--ic-border-radius) var(--ic-border-radius);left:0;top:var(--ic-space-xxxs);border-top:0;transform:translateX(var(--tooltip-arrow-translate))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="bottom"]>.ic-tooltip-arrow{top:calc(-1 * var(--ic-space-xxs));height:var(--ic-space-xxxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="bottom"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) var(--ic-border-radius) 0 0;left:0;top:var(--ic-space-1px);border-bottom:0;transform:translateX(var(--tooltip-arrow-translate))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="left"]>.ic-tooltip-arrow{width:var(--ic-space-xxxs);right:calc(-1 * var(--ic-space-1px))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="left"]>.ic-tooltip-arrow::before{border-radius:0 var(--ic-border-radius) var(--ic-border-radius) 0;border-left:0;top:calc(-1 * var(--ic-space-1px))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="right"]>.ic-tooltip-arrow{width:var(--ic-space-xxxs);left:calc(-1 * var(--ic-space-xxs))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^="right"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) 0 0 var(--ic-border-radius);border-right:0;top:calc(-1 * var(--ic-space-1px))}:host(.on-dialog) .ic-tooltip-container{transform:translate(\n var(--tooltip-translate-x),\n var(--tooltip-translate-y)\n ) !important}@media screen and (max-width: 576px){:host(.ic-tooltip) .ic-tooltip-container{max-width:18.875rem}}@media (forced-colors: active){:host(.ic-tooltip) .ic-tooltip-container,:host(.ic-tooltip) .ic-tooltip-arrow::before{border:var(--ic-hc-border)}}';const $=class{constructor(o){t(this,o);this.delayedHideEvents=["mouseleave"];this.dialogOverflow=false;this.instantHideEvents=["focusout"];this.mouseOverTool=false;this.persistTooltip=false;this.onDialog=false;this.showEvents=[!this.disableHover&&"mouseenter",!this.disableHover&&"focusin",!this.disableClick&&"click"];this.getTooltipTranslate=t=>{const o=this.el.children[0].getBoundingClientRect();let i;let a;switch(this.placement){case"bottom":i=o.left-t.left-.5*o.width;a=o.bottom-t.top;break;case"bottom-start":i=o.left-t.left;a=o.bottom-t.top;break;case"bottom-end":i=o.right-t.right;a=o.bottom-t.top;break;case"top":i=o.left-t.left-.5*o.width;a=o.top-t.bottom;break;case"top-start":i=o.left-t.left;a=o.top-t.bottom;break;case"top-end":i=o.right-t.right;a=o.top-t.bottom;break;case"left":case"left-start":i=o.right-t.right-o.width;a=o.bottom-t.top-o.height;break;case"left-end":i=o.right-t.right-o.width;a=o.top-t.bottom+o.height;break;case"right":case"right-start":i=o.left-t.left+o.width;a=o.bottom-t.top-o.height;break;case"right-end":i=o.left-t.left+o.width;a=o.top-t.bottom+o.height;break}if(this.dialogOverflow&&i<0){if(this.placement.includes("top")||this.placement.includes("bottom")){this.toolTip.style.setProperty("--tooltip-arrow-translate",`${i}px`);i=o.left-t.left}if(this.placement.includes("left")){this.placement="right";i=o.left-t.left+o.width}}this.toolTip.style.setProperty("--tooltip-translate-x",`${i}px`);this.toolTip.style.setProperty("--tooltip-translate-y",`${a}px`)};this.show=()=>{if(this.label){this.toolTip.setAttribute("data-show","");if(this.onDialog){this.el.classList.add("on-dialog");const t=this.icDialogEl.shadowRoot.querySelector("dialog").getBoundingClientRect();this.getTooltipTranslate(t)}this.popperInstance=p(this.el,this.toolTip,{placement:this.placement,modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"arrow",options:{element:this.arrow}},{name:"eventListeners",options:{scroll:false,resize:false}}]})}else{console.warn(`Tooltip can't display without prop 'label' set`)}};this.hide=()=>{this.toolTip.removeAttribute("data-show");this.persistTooltip=false};this.checkCloseTooltip=()=>{setTimeout((()=>{if(!this.mouseOverTool&&!this.persistTooltip){this.hide()}}),100)};this.mouseEnterTooltip=()=>{this.mouseOverTool=true};this.mouseLeaveTooltip=()=>{this.mouseOverTool=false;this.checkCloseTooltip()};this.handleKeyDown=t=>{if(t.key==="Escape"&&!this.persistTooltip){this.hide()}};this.manageEventListeners=t=>{const o=t==="add"?"addEventListener":"removeEventListener";this.showEvents.forEach((t=>{this.el[o](t,this.show);if(this.toolTip!==undefined){this.toolTip[o](t,this.mouseEnterTooltip)}}));if(!this.persistTooltip){this.instantHideEvents.forEach((t=>{this.el[o](t,this.hide)}))}this.delayedHideEvents.forEach((t=>{this.el[o](t,this.checkCloseTooltip);if(this.toolTip!==undefined){this.toolTip[o](t,this.mouseLeaveTooltip)}}));document[o]("keydown",this.handleKeyDown)};this.disableClick=false;this.disableHover=false;this.maxLines=undefined;this.placement="bottom";this.silent=false;this.target=undefined;this.label=undefined}disconnectedCallback(){this.manageEventListeners("remove");if(this.popperInstance!==undefined){this.popperInstance.destroy()}}componentDidLoad(){var t;this.manageEventListeners("add");this.icDialogEl=this.el.closest("ic-dialog");this.dialogOverflow=((t=this.icDialogEl)===null||t===void 0?void 0:t.getAttribute("data-overflow"))==="true";this.onDialog=this.icDialogEl!==null;b([{prop:this.label,propName:"label"}],"Tooltip")}componentDidRender(){const t=this.el.shadowRoot.querySelector(".ic-tooltip-container > ic-typography");this.maxLines>0&&t.setAttribute("style",`--truncation-max-lines: ${this.maxLines}`)}async displayTooltip(t,o){this.persistTooltip=o;t?this.show():this.hide()}render(){const{label:t,maxLines:o,silent:i}=this;return a(e,{class:{"ic-tooltip":true}},a("div",{ref:t=>this.toolTip=t,role:"tooltip",class:"ic-tooltip-container","aria-hidden":`${i}`},a("ic-typography",{maxLines:o,variant:"caption"},t),a("div",{ref:t=>this.arrow=t,class:"ic-tooltip-arrow"})),a("slot",null))}get el(){return r(this)}};$.style=z;export{k as ic_button,x as ic_loading_indicator,$ as ic_tooltip};
2
- //# sourceMappingURL=p-d6ad82d8.entry.js.map