@ukic/canary-web-components 3.0.0-canary.13 → 3.0.0-canary.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-0e4c4fdd.js → helpers-32016c21.js} +21 -3
  3. package/dist/cjs/helpers-32016c21.js.map +1 -0
  4. package/dist/cjs/ic-button_3.cjs.entry.js +59 -1
  5. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-data-table.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-date-input.cjs.entry.js +52 -19
  11. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-date-picker.cjs.entry.js +15 -10
  13. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-empty-state_2.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-navigation-group.cjs.entry.js +6 -3
  18. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-navigation-menu.cjs.entry.js +36 -22
  20. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-pagination_4.cjs.entry.js +13 -10
  22. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -4
  24. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-side-navigation.cjs.entry.js +7 -4
  26. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-skip-link.cjs.entry.js +10 -9
  28. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-step.cjs.entry.js +13 -12
  32. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  34. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-tree-item.cjs.entry.js +29 -8
  36. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-tree-view.cjs.entry.js +113 -12
  38. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/components/ic-data-table/ic-data-table.css +3 -2
  41. package/dist/collection/components/ic-date-input/ic-date-input.js +83 -24
  42. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  43. package/dist/collection/components/ic-date-input/ic-date-input.stories.js +18 -0
  44. package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -1
  45. package/dist/collection/components/ic-date-picker/ic-date-picker.js +34 -9
  46. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  47. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +9 -1
  48. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -1
  49. package/dist/collection/components/ic-date-picker/story-data.js +16 -1
  50. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  51. package/dist/collection/components/ic-tree-item/ic-tree-item.js +50 -7
  52. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  53. package/dist/collection/components/ic-tree-view/ic-tree-view.js +146 -16
  54. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  55. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +384 -12
  56. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -1
  57. package/dist/collection/components/ic-tree-view/ic-tree-view.types.js +2 -0
  58. package/dist/collection/components/ic-tree-view/ic-tree-view.types.js.map +1 -0
  59. package/dist/collection/utils/helpers.js.map +1 -1
  60. package/dist/components/helpers.js +1 -1
  61. package/dist/components/helpers2.js +19 -3
  62. package/dist/components/helpers2.js.map +1 -1
  63. package/dist/components/ic-button2.js +59 -1
  64. package/dist/components/ic-button2.js.map +1 -1
  65. package/dist/components/ic-data-table.js +1 -1
  66. package/dist/components/ic-data-table.js.map +1 -1
  67. package/dist/components/ic-date-input2.js +58 -21
  68. package/dist/components/ic-date-input2.js.map +1 -1
  69. package/dist/components/ic-date-picker.js +15 -9
  70. package/dist/components/ic-date-picker.js.map +1 -1
  71. package/dist/components/ic-menu-item2.js +1 -1
  72. package/dist/components/ic-menu-item2.js.map +1 -1
  73. package/dist/components/ic-navigation-group.js +6 -3
  74. package/dist/components/ic-navigation-group.js.map +1 -1
  75. package/dist/components/ic-navigation-menu2.js +37 -23
  76. package/dist/components/ic-navigation-menu2.js.map +1 -1
  77. package/dist/components/ic-popover-menu.js +5 -4
  78. package/dist/components/ic-popover-menu.js.map +1 -1
  79. package/dist/components/ic-select2.js +13 -10
  80. package/dist/components/ic-select2.js.map +1 -1
  81. package/dist/components/ic-side-navigation.js +7 -4
  82. package/dist/components/ic-side-navigation.js.map +1 -1
  83. package/dist/components/ic-skip-link.js +10 -9
  84. package/dist/components/ic-skip-link.js.map +1 -1
  85. package/dist/components/ic-status-tag.js +1 -1
  86. package/dist/components/ic-status-tag.js.map +1 -1
  87. package/dist/components/ic-step.js +13 -12
  88. package/dist/components/ic-step.js.map +1 -1
  89. package/dist/components/ic-toast.js +4 -4
  90. package/dist/components/ic-toast.js.map +1 -1
  91. package/dist/components/ic-top-navigation.js +1 -1
  92. package/dist/components/ic-tree-item.js +29 -7
  93. package/dist/components/ic-tree-item.js.map +1 -1
  94. package/dist/components/ic-tree-view.js +119 -14
  95. package/dist/components/ic-tree-view.js.map +1 -1
  96. package/dist/core/core.css +35 -29
  97. package/dist/core/core.esm.js +1 -1
  98. package/dist/core/core.esm.js.map +1 -1
  99. package/dist/core/p-0ad472d0.entry.js +2 -0
  100. package/dist/core/p-0ad472d0.entry.js.map +1 -0
  101. package/dist/core/{p-fde3bbb2.entry.js → p-0c97a53d.entry.js} +2 -2
  102. package/dist/core/p-250bf568.entry.js +2 -0
  103. package/dist/core/p-250bf568.entry.js.map +1 -0
  104. package/dist/core/{p-c6f1e205.entry.js → p-48163a2a.entry.js} +2 -2
  105. package/dist/core/p-48163a2a.entry.js.map +1 -0
  106. package/dist/core/{p-95f2c59a.entry.js → p-4f00aa91.entry.js} +2 -2
  107. package/dist/core/{p-95f2c59a.entry.js.map → p-4f00aa91.entry.js.map} +1 -1
  108. package/dist/core/p-54e01fad.entry.js +2 -0
  109. package/dist/core/p-54e01fad.entry.js.map +1 -0
  110. package/dist/core/p-5d85bd73.entry.js +2 -0
  111. package/dist/core/p-5d85bd73.entry.js.map +1 -0
  112. package/dist/core/p-6040a025.entry.js +2 -0
  113. package/dist/core/p-6040a025.entry.js.map +1 -0
  114. package/dist/core/p-62f7f2bd.entry.js +2 -0
  115. package/dist/core/p-62f7f2bd.entry.js.map +1 -0
  116. package/dist/core/p-72310da8.js +2 -0
  117. package/dist/core/p-72310da8.js.map +1 -0
  118. package/dist/core/p-762a4d7c.entry.js +2 -0
  119. package/dist/core/p-762a4d7c.entry.js.map +1 -0
  120. package/dist/core/p-836d302a.entry.js +2 -0
  121. package/dist/core/p-836d302a.entry.js.map +1 -0
  122. package/dist/core/p-881bb783.entry.js +2 -0
  123. package/dist/core/p-881bb783.entry.js.map +1 -0
  124. package/dist/core/{p-3dc4e128.entry.js → p-895a3eb1.entry.js} +2 -2
  125. package/dist/core/p-9a46b1e5.entry.js +2 -0
  126. package/dist/core/p-9a46b1e5.entry.js.map +1 -0
  127. package/dist/core/{p-67f3bf1a.entry.js → p-a13dc5ba.entry.js} +2 -2
  128. package/dist/core/{p-e86c1c95.entry.js → p-c0687222.entry.js} +2 -2
  129. package/dist/core/p-c0687222.entry.js.map +1 -0
  130. package/dist/core/p-c4f7e479.entry.js +2 -0
  131. package/dist/core/p-c4f7e479.entry.js.map +1 -0
  132. package/dist/core/{p-f6013934.entry.js → p-ef25bb6d.entry.js} +2 -2
  133. package/dist/core/p-ef25bb6d.entry.js.map +1 -0
  134. package/dist/core/p-fb11ce9b.entry.js +2 -0
  135. package/dist/core/p-fb11ce9b.entry.js.map +1 -0
  136. package/dist/esm/core.js +1 -1
  137. package/dist/esm/{helpers-4e38ba2b.js → helpers-5479985d.js} +20 -4
  138. package/dist/esm/helpers-5479985d.js.map +1 -0
  139. package/dist/esm/ic-button_3.entry.js +59 -1
  140. package/dist/esm/ic-button_3.entry.js.map +1 -1
  141. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  142. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  143. package/dist/esm/ic-data-table.entry.js +2 -2
  144. package/dist/esm/ic-data-table.entry.js.map +1 -1
  145. package/dist/esm/ic-date-input.entry.js +52 -19
  146. package/dist/esm/ic-date-input.entry.js.map +1 -1
  147. package/dist/esm/ic-date-picker.entry.js +15 -10
  148. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  149. package/dist/esm/ic-empty-state_2.entry.js +1 -1
  150. package/dist/esm/ic-menu-item.entry.js +1 -1
  151. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  152. package/dist/esm/ic-navigation-group.entry.js +6 -3
  153. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  154. package/dist/esm/ic-navigation-menu.entry.js +37 -23
  155. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  156. package/dist/esm/ic-pagination_4.entry.js +13 -10
  157. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  158. package/dist/esm/ic-popover-menu.entry.js +5 -4
  159. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  160. package/dist/esm/ic-side-navigation.entry.js +7 -4
  161. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  162. package/dist/esm/ic-skip-link.entry.js +10 -9
  163. package/dist/esm/ic-skip-link.entry.js.map +1 -1
  164. package/dist/esm/ic-status-tag.entry.js +1 -1
  165. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  166. package/dist/esm/ic-step.entry.js +13 -12
  167. package/dist/esm/ic-step.entry.js.map +1 -1
  168. package/dist/esm/ic-toast.entry.js +3 -3
  169. package/dist/esm/ic-toast.entry.js.map +1 -1
  170. package/dist/esm/ic-tree-item.entry.js +29 -8
  171. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  172. package/dist/esm/ic-tree-view.entry.js +113 -12
  173. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  174. package/dist/esm/loader.js +1 -1
  175. package/dist/types/components/ic-date-input/ic-date-input.d.ts +15 -4
  176. package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +6 -0
  177. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  178. package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +8 -0
  179. package/dist/types/components/ic-date-picker/story-data.d.ts +1 -0
  180. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +6 -0
  181. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +17 -0
  182. package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +91 -13
  183. package/dist/types/components/ic-tree-view/ic-tree-view.types.d.ts +12 -0
  184. package/dist/types/components.d.ts +39 -6
  185. package/dist/types/utils/helpers.d.ts +2 -2
  186. package/hydrate/index.js +449 -184
  187. package/hydrate/index.mjs +449 -184
  188. package/package.json +3 -3
  189. package/dist/cjs/helpers-0e4c4fdd.js.map +0 -1
  190. package/dist/core/p-44ffa951.entry.js +0 -2
  191. package/dist/core/p-44ffa951.entry.js.map +0 -1
  192. package/dist/core/p-47962514.entry.js +0 -2
  193. package/dist/core/p-47962514.entry.js.map +0 -1
  194. package/dist/core/p-5329e478.entry.js +0 -2
  195. package/dist/core/p-5329e478.entry.js.map +0 -1
  196. package/dist/core/p-5b2a7c1a.entry.js +0 -2
  197. package/dist/core/p-5b2a7c1a.entry.js.map +0 -1
  198. package/dist/core/p-8c4f212a.entry.js +0 -2
  199. package/dist/core/p-8c4f212a.entry.js.map +0 -1
  200. package/dist/core/p-9265efef.entry.js +0 -2
  201. package/dist/core/p-9265efef.entry.js.map +0 -1
  202. package/dist/core/p-a35cdfc3.entry.js +0 -2
  203. package/dist/core/p-a35cdfc3.entry.js.map +0 -1
  204. package/dist/core/p-ac74cdac.entry.js +0 -2
  205. package/dist/core/p-ac74cdac.entry.js.map +0 -1
  206. package/dist/core/p-ad3e543e.entry.js +0 -2
  207. package/dist/core/p-ad3e543e.entry.js.map +0 -1
  208. package/dist/core/p-ae2bae87.entry.js +0 -2
  209. package/dist/core/p-ae2bae87.entry.js.map +0 -1
  210. package/dist/core/p-afde50b8.js +0 -2
  211. package/dist/core/p-afde50b8.js.map +0 -1
  212. package/dist/core/p-b84213d1.entry.js +0 -2
  213. package/dist/core/p-b84213d1.entry.js.map +0 -1
  214. package/dist/core/p-c6f1e205.entry.js.map +0 -1
  215. package/dist/core/p-cd59dc16.entry.js +0 -2
  216. package/dist/core/p-cd59dc16.entry.js.map +0 -1
  217. package/dist/core/p-e86c1c95.entry.js.map +0 -1
  218. package/dist/core/p-f6013934.entry.js.map +0 -1
  219. package/dist/esm/helpers-4e38ba2b.js.map +0 -1
  220. /package/dist/core/{p-fde3bbb2.entry.js.map → p-0c97a53d.entry.js.map} +0 -0
  221. /package/dist/core/{p-3dc4e128.entry.js.map → p-895a3eb1.entry.js.map} +0 -0
  222. /package/dist/core/{p-67f3bf1a.entry.js.map → p-a13dc5ba.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-00135a74.js";import{b as h,s as r,u as n,r as o,v as l,w as c,o as d,x as u,y as f,z as b,k as p,l as v}from"./p-72310da8.js";import{b as m,i as w,j as y,s as g,h as k,k as x}from"./p-33dd24eb.js";const $=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>\n</svg>\n`;const D=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M16.6667 2.50004H15.8334V0.833374H14.1667V2.50004H5.83342V0.833374H4.16675V2.50004H3.33341C2.41675 2.50004 1.66675 3.25004 1.66675 4.16671V17.5C1.66675 18.4167 2.41675 19.1667 3.33341 19.1667H16.6667C17.5834 19.1667 18.3334 18.4167 18.3334 17.5V4.16671C18.3334 3.25004 17.5834 2.50004 16.6667 2.50004ZM16.6667 17.5H3.33341V6.66671H16.6667V17.5Z" fill="currentColor"/>\n</svg>`;const Y='/*! 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-input-label-helpertext-padding:var(--ic-space-xxs);--input-bg-color:var(--ic-date-input-bg);--ic-input-label-text-color:var(--ic-date-input-label);--ic-input-label-helper-text-color:var(--ic-date-input-subtitle);--border-color:var(--ic-date-input-border);--border-color-disabled:var(--ic-date-input-border-disabled);--border-color-hover:var(--ic-date-input-border-default-hover);--border-color-pressed:var(--ic-date-input-border-default-pressed);--border-error-color:var(--ic-date-input-border-error);--border-error-color-hover:var(--ic-date-input-border-error-hover);--border-error-color-pressed:var(--ic-date-input-border-error-pressed);--border-success-color:var(--ic-date-input-border-success);--border-success-color-hover:var(--ic-date-input-border-success-hover);--border-success-color-pressed:var(--ic-date-input-border-success-pressed);--border-warning-color:var(--ic-date-input-border-warning);--border-warning-color-hover:var(--ic-date-input-border-warning-hover);--border-warning-color-pressed:var(--ic-date-input-border-warning-pressed)}:host(.ic-date-input-disabled){--ic-input-label-text-color:var(--ic-date-input-label-disabled);--ic-input-label-helper-text-color:var(--ic-date-input-subtitle-disabled)}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;color:var(--ic-date-input-text-filled);caret-color:var(--ic-date-input-typing-cursor)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;-webkit-text-fill-color:var(--ic-date-input-text-filled) !important}input::-moz-placeholder{color:var(--ic-date-input-text-placeholder)}input::placeholder{color:var(--ic-date-input-text-placeholder)}ic-input-component-container{cursor:text}ic-input-component-container .focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.date-inputs{color:var(--ic-date-input-text-placeholder)}.day-input{width:1.438rem}.month-input{width:1.813rem}.year-input,.year-input.fit-to-value{width:2.313rem}.fit-to-value{width:1.25rem}.sr-only{position:absolute;left:-9999px}.input-container{width:100%;display:flex;justify-content:space-between;align-items:center;position:relative}.action-buttons{display:flex;align-items:center}.show-calendar-button-wrapper{display:flex;justify-content:center;align-items:center}.clear-button,.calendar-button{border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);margin:0}.clear-button.hidden{display:none}.clear-button:focus,.calendar-button:focus,.clear-button:active,.calendar-button:active{background-color:var(--ic-color-focus-inner) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;border-radius:0.25rem}.calendar-button:focus,.calendar-button:active{--ic-button-tertiary-text-active:var(--ic-atoms-input-clear-button-focus);--ic-button-tertiary-text-hover-active:var(\n --ic-atoms-input-clear-button-focus\n );--ic-button-tertiary-text-pressed-active:var(\n --ic-atoms-input-clear-button-focus\n )}.clear-button:focus,.calendar-button:focus,.clear-button:active *,.calendar-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.clear-button svg{color:var(--ic-date-input-clear-icon)}.clear-button:focus svg{color:var(--ic-atoms-input-clear-button-focus)}.divider{margin:0 var(--ic-space-xxs);width:var(--ic-space-1px);background-color:var(--ic-atoms-input-divider);border-radius:var(--ic-space-1px)}.divider.small{height:var(--ic-space-md)}.divider.medium{height:calc(var(--ic-space-sm) + var(--ic-space-xs))}.divider.large{height:var(--ic-space-lg)}ic-input-validation{--ic-input-validation-status-text-color:var(--ic-date-input-status-text);--ic-input-validation-error:var(--ic-date-input-icon-error);--ic-input-validation-warning-icon-color:var(--ic-date-input-icon-warning);--ic-input-validation-success-icon-color:var(--ic-date-input-icon-success)}';const z=Y;let H=0;const M=class{constructor(e){t(this,e);this.calendarButtonClicked=i(this,"calendarButtonClicked",7);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.ARIA_INVALID="aria-invalid";this.ARIA_LABEL="aria-label";this.ARIA_LABELLED_BY="aria-labelledby";this.EVENT_OBJECT_STRING="[object Event]";this.FIT_TO_VALUE="fit-to-value";this.initialValue=this.value;this.INPUT_EVENT_OBJECT_STRING="[object InputEvent]";this.inputsInOrder=[];this.isAfterMax=false;this.isBeforeMin=false;this.isDateSetFromKeyboardEvent=false;this.isDisabledDate=false;this.isValidDay=true;this.isValidMonth=true;this.isValidDate=true;this.isZuluTime=false;this.KEYBOARD_EVENT_OBJECT_STRING="[object KeyboardEvent]";this.MAX_DAY=31;this.MAX_MONTH=12;this.previousSelectedDate=null;this.selectedDate=null;this.externalSetDate=false;this.clearInput=false;this.calendarFocused=false;this.clearButtonFocused=false;this.removeLabelledBy=false;this.day="";this.month="";this.year="";this.dateFormat="DD/MM/YYYY";this.emitDatePartChange=false;this.disabled=false;this.disableDays=[];this.disableDaysMessage="The date you have selected is on a day of the week that is not allowed. Please select another date.";this.disableFuture=false;this.disableFutureMessage="Dates in the future are not allowed. Please select a date in the past.";this.disablePast=false;this.disablePastMessage="Dates in the past are not allowed. Please select a date in the future.";this.hideHelperText=false;this.hideLabel=false;this.inputId=`ic-date-input-${H++}`;this.invalidDateMessage="Please enter a valid date.";this.max="";this.min="";this.name=this.inputId;this.required=false;this.showCalendarButton=false;this.showClearButton=true;this.size="medium";this.theme="inherit";this.value="";this.validationStatus="";this.validationText="";this.setInputPasteValue=(t,i)=>{const s=t;s.value=i;s.classList.add(this.FIT_TO_VALUE)};this.checkSingleCopiedValueIsValid=(t,i)=>{let s=false;const e=Number(i);switch(t){case this.dayInputEl:s=e>=1&&e<=this.MAX_DAY;break;case this.monthInputEl:s=e>=1&&e<=this.MAX_MONTH;break;case this.yearInputEl:s=true;break;default:s=false;break}return s};this.isKeyboardOrEvent=t=>Object.prototype.toString.call(t)===this.EVENT_OBJECT_STRING||Object.prototype.toString.call(t)===this.KEYBOARD_EVENT_OBJECT_STRING;this.setDateValidity=()=>{if(!h(this.day)){this.isValidDay=+this.day>this.MAX_DAY?false:true}else{this.isValidDay=true}if(!h(this.month)){this.isValidMonth=+this.month>this.MAX_MONTH?false:true}else{this.isValidMonth=true}};this.handleInput=t=>{const i=t;const s=t.target;if(s!==this.yearInputEl){if(i.inputType!=="deleteContentBackward"&&!this.preventAutoFormatting){if(s.value.length===1&&(s===this.dayInputEl&&+s.value>=4||s===this.monthInputEl&&+s.value>=2)&&+s.value<=9){this.setInputValue(s);this.notifyScreenReader(s,t);this.moveToNextInput(s)}if(s.value.length===2){if(+s.value===0){s.value="01"}this.setInputValue(s);this.setPreventInput(s,true);this.notifyScreenReader(s,t);this.moveToNextInput(s)}else{this.setPreventInput(s,false)}}else if(this.preventAutoFormatting){if(s.value.length===2&&!this.isKeyboardOrEvent(t)){this.setInputValue(s);this.setPreventInput(s,true);this.moveToNextInput(s)}else{this.setInputValue(s)}}if(s.value.length!==2){this.setPreventInput(s,false)}}else{if(s.value.length===4){this.setInputValue(s);if(Object.prototype.toString.call(t)!==this.EVENT_OBJECT_STRING){this.moveToNextInput(s)}this.setPreventInput(s,true)}else{this.setInputValue(s,true);this.setPreventInput(s,false)}}this.setFitToValueStyling(s);if(s.value.length===0){this.setInputValue(s,true);this.setValidationMessage()}this.notifyScreenReader(s,t)};this.handleKeyDown=(t,i)=>{var s;const e=t.target;const a=(s=t.key)===null||s===void 0?void 0:s.toLowerCase();const h=/-?\d*\.?\d+(e[-+]?\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;if(!h.test(a)&&!((t.ctrlKey||t.metaKey)&&(a==="v"||a==="c"))){t.preventDefault()}switch(a){case"/":case"-":case".":t.preventDefault();this.setPasteInvalidText();this.moveToNextInput(e);break;case"arrowright":case"arrowleft":t.preventDefault();this.handleLeftRightArrowKeyPress(e,a);break;case"arrowup":case"arrowdown":this.preventAutoFormatting=true;this.handleUpDownArrowKeyPress(e,t);break;case"backspace":if(e.value.length===0){t.preventDefault();this.moveToPreviousInput(e)}break}this.preventInput(t,i);this.isDateSetFromKeyboardEvent=true};this.handleFocus=t=>{const i=t.target;i.select()};this.handleBlur=t=>{const i=t.target;this.setPasteInvalidText();this.autocompleteInput(i)};this.handleLeftRightArrowKeyPress=(t,i)=>{if(i==="arrowright"){this.moveToNextInput(t)}else{this.moveToPreviousInput(t)}this.setPasteInvalidText()};this.notifyScreenReaderSelectedDate=()=>{const t=r(p);const i=r(v);this.selectedDateInfoEl.textContent=`Selected date: ${t[this.selectedDate.getDay()]}, ${this.selectedDate.getDate()} ${i[this.selectedDate.getMonth()]} ${this.selectedDate.getFullYear()}`};this.handleUpDownArrowKeyPress=(t,i)=>{const s=t===this.yearInputEl?0:1;let e;switch(t){case this.dayInputEl:e=this.MAX_DAY;break;case this.monthInputEl:e=this.MAX_MONTH;break;case this.yearInputEl:e=9999}if(t===null||t===void 0?void 0:t.value){if(i.key==="ArrowUp"){if(+t.value===e){i.preventDefault();t.value=`0${s}`}else{t.value=+t.value+1<10?`0${+t.value+1}`:(+t.value+1).toString()}this.notifyScreenReader(t,i)}if(i.key==="ArrowDown"){if(+t.value===s){i.preventDefault();t.value=e.toString()}else{t.value=+t.value-1<10?`0${+t.value-1}`:(+t.value-1).toString()}this.notifyScreenReader(t,i)}}else{if(i.key==="ArrowDown"){i.preventDefault();if(t===this.yearInputEl){t.value=(new Date).getFullYear().toString()}else{t.value=e.toString()}this.notifyScreenReader(t,i)}else if(i.key==="ArrowUp"){i.preventDefault();if(t===this.yearInputEl){t.value=(new Date).getFullYear().toString()}else{t.value=`0${s}`}this.notifyScreenReader(t,i)}}this.setInputValue(t);this.setFitToValueStyling(t)};this.handleDateChange=t=>{if(t||!m(this.selectedDate,this.previousSelectedDate)){if(this.value){this.inputsInOrder.forEach((t=>{t.classList.add(this.FIT_TO_VALUE)}))}if(this.day&&this.month&&this.year&&this.invalidDateText===""){this.setValueAndEmitChange(this.selectedDate);this.notifyScreenReaderSelectedDate()}else if(!(this.selectedDate===null&&this.previousSelectedDate===null)){this.setValueAndEmitChange(null);this.selectedDateInfoEl.textContent=""}this.previousSelectedDate=this.selectedDate;if(!this.isDateSetFromKeyboardEvent){this.updateInputValues(this.day,this.month,this.year)}}};this.slicePastedDate=(t,i)=>i.length>t?i.slice(0,t):i;this.isPastedStringDateValid=t=>{if(/\d+-\d+-\d+$/.test(t)||/\d+\/\d+\/\d+/.test(t)||/\d+\.\d+\.\d+/.test(t)){return true}if(/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\.\d+)?)?Z/.test(t)){this.isZuluTime=true;return true}return false};this.handlePaste=t=>{t.preventDefault();const i=t.clipboardData.getData("Text");const s=this.isPastedStringDateValid(i);this.setPastedValueAndValidation(s,i,t)};this.setDate=t=>{if(t===null||t===""||t===undefined){if(this.day)this.day=null;if(this.month)this.month=null;if(this.year)this.year=null;this.inputsInOrder.forEach((t=>{t.classList.remove(this.FIT_TO_VALUE);this.setPreventInput(t,false)}));this.handleDateChange(true)}else{if(w(t)){let i;if(typeof t==="string"){i=new Date(+t)}else{i=t}this.day=y(i.getDate());this.month=y(i.getMonth()+1);this.year=i.getFullYear().toString()}else if(typeof t==="string"){const i=g(t,this.dateFormat);this.selectedDate=new Date(Number(i[0]),Number(i[1])-1,Number(i[2]));this.year=i[0];this.month=i[1];this.day=i[2];this.setValueAndEmitChange(this.selectedDate)}}this.setValidationMessage()};this.formatMinMax=t=>{let i;const s=y(t.getDate());const e=y(t.getMonth()+1);const a=t.getFullYear();switch(this.dateFormat){case"DD/MM/YYYY":i=`${s}/${e}/${a}`;break;case"MM/DD/YYYY":i=`${e}/${s}/${a}`;break;case"YYYY/MM/DD":i=`${a}/${e}/${s}`;break}return i};this.updateInputValues=(t,i,s)=>{this.dayInputEl.value=t;this.monthInputEl.value=i;this.yearInputEl.value=s};this.setInputValue=(t,i=false)=>{const s=i?"":t.value;switch(t){case this.dayInputEl:this.day=s;break;case this.monthInputEl:this.month=s;break;case this.yearInputEl:if(this.year!==s){this.year=s}}this.setValidationMessage()};this.setValidationMessage=()=>{this.setDateValidity();if(!h(this.day)&&!h(this.month)&&!h(this.year)){this.selectedDate=this.convertToDate(this.year,this.month,this.day);this.isValidDate=+this.selectedDate!==0&&this.selectedDate.getDate()==+this.day;this.isDisabledDate=this.isSelectedDateDisabled();if(!this.isValidDate||this.isDisabledDate){this.inputsInOrder.forEach((t=>t.setAttribute(this.ARIA_INVALID,"true")))}else{this.inputsInOrder.forEach((t=>t.removeAttribute(this.ARIA_INVALID)))}}else{this.selectedDate=null}if(!(this.isValidDay&&this.isValidMonth&&this.isValidDate)){this.invalidDateText=this.invalidDateMessage}else if(this.isDisabledDate&&this.selectedDate!==null){if(this.isBeforeMin){if(this.disablePast){this.invalidDateText=this.disablePastMessage}else{this.invalidDateText=`Please enter a date after ${this.formatMinMax(this.minDate)}.`}}else if(this.isAfterMax){if(this.disableFuture){this.invalidDateText=this.disableFutureMessage}else{this.invalidDateText=`Please enter a date before ${this.formatMinMax(this.maxDate)}.`}}else if(this.disableDays.length!==0){this.invalidDateText=this.disableDaysMessage}else{if(this.disablePast){this.invalidDateText=this.disablePastMessage}if(this.disableFuture){this.invalidDateText=this.disableFutureMessage}}}else{this.invalidDateText=""}};this.setInputsInOrder=()=>{const t=this.el.shadowRoot.querySelectorAll("input");t.forEach((t=>this.inputsInOrder.push(t)))};this.setAriaLabelledBy=()=>{var t,i;if(this.disabled&&!h((t=this.inputCompContainerEl)===null||t===void 0?void 0:t.getAttribute(this.ARIA_LABELLED_BY))){this.removeAriaLabelledBy();return}if(this.disabled){return}const s=this.el.shadowRoot.querySelector("label");const e=`${this.inputId}-label`;if(s!==null&&s!==undefined){s.id=e}const a=!h(this.validationStatus)||!h(this.invalidDateText);const r=`${(i=s===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:""} ${this.screenReaderInfoId} ${n(this.inputId,this.helperText!==""&&this.helperText!==this.defaultHelperText,a)} ${this.selectedDate?this.selectedDateInfoId:""} ${this.assistiveHintId}`;this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY,r)};this.setPreventInput=(t,i)=>{switch(t){case this.dayInputEl:this.preventDayInput=i;break;case this.monthInputEl:this.preventMonthInput=i;break;case this.yearInputEl:this.preventYearInput=i}};this.getInputFromDatePart=t=>{const i=s("input",{class:"day-input",id:"day-input",ref:t=>this.dayInputEl=t,"aria-label":"day",placeholder:"DD",disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventDayInput)});const e=s("input",{id:"month-input",class:"month-input",ref:t=>this.monthInputEl=t,"aria-label":"month",placeholder:"MM",disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventMonthInput)});const a=s("input",{id:"year-input",class:"year-input",ref:t=>this.yearInputEl=t,"aria-label":"year",placeholder:"YYYY",maxLength:4,disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventYearInput)});let h;switch(t){case"D":h=i;break;case"M":h=e;break;case"Y":h=a}return h};this.getInputsInOrder=()=>{const t=this.dateFormat.split("/");const i=[];t.forEach((t=>{i.push(this.getInputFromDatePart(t.substring(0,1)))}));return i};this.getDescOfInputsOrder=()=>{let t;switch(this.dateFormat){case"DD/MM/YYYY":t="day, month, and year";break;case"MM/DD/YYYY":t="month, day, and year";break;case"YYYY/MM/DD":t="year, month, and day"}return t};this.getScreenReaderInfo=t=>{let i="";if(this.required){i+="required"}if(t===f.Error){i+=" invalid data"}return i===""?"":i+", "};this.preventInput=(t,i)=>{const s=t.key;const e=t.target;let a;if(e){a=e.value.substring(e.selectionStart,e.selectionEnd)}if(s==="e"||s==="."||s==="-"||t.key>="0"&&t.key<="9"&&i&&!a){t.preventDefault()}};this.isSelectedDateDisabled=()=>{const t=new Date;this.isAfterMax=false;this.isBeforeMin=false;let i=false;const s=this.selectedDate.toDateString()!==t.toDateString();if(this.minDate&&this.selectedDate<this.minDate&&s){this.isBeforeMin=true;i=true}if(this.maxDate&&this.selectedDate>this.maxDate&&s){this.isAfterMax=true;i=true}if(this.disableDays.includes(this.selectedDate.getDay())){i=true}if((this.disablePast&&this.selectedDate<t||this.disableFuture&&this.selectedDate>t)&&s){i=true}return i};this.moveToNextInput=t=>{const i=this.inputsInOrder.findIndex((i=>i===t));const s=this.inputsInOrder[i+1];this.preventAutoFormatting=false;if(s){s.focus()}};this.moveToPreviousInput=t=>{const i=this.inputsInOrder.findIndex((i=>i===t));this.preventAutoFormatting=false;if(this.inputsInOrder[i-1]){this.inputsInOrder[i-1].focus()}};this.autocompleteInput=t=>{if(t===this.yearInputEl){this.autocompleteYear()}else{const i=t.value;if(i.length===1){if(+i===0){t.value="01"}else{t.value=`0${i}`}}}if(t.value){this.setInputValue(t)}};this.autocompleteYear=()=>{const t=this.yearInputEl.value;const i=["2","0","0"];let s="";if(t){i.forEach(((i,e)=>{if(t.length+e<=3){s+=i}}));this.yearInputEl.value=`${s}${t}`}};this.convertToDate=(t,i,s)=>{if(!h(t)&&!h(i)&&!h(s)){return new Date(+t,+i-1,+s)}else{return null}};this.handleHostBlur=()=>{this.removeLabelledBy=false;this.icBlur.emit({value:this.selectedDate})};this.handleHostFocus=()=>{var t;if((t=this.el.shadowRoot.activeElement)===null||t===void 0?void 0:t.id.match(/(day|month|year)-input$/)){this.removeLabelledBy=false}else{this.removeLabelledBy=true}this.icFocus.emit({value:this.selectedDate})};this.handleFormReset=()=>{this.setDate(this.initialValue);this.setValidationMessage();this.handleDateChange(false)};this.getAriaLabel=t=>t.getAttribute(this.ARIA_LABEL);this.notifyScreenReaderArrowKeys=t=>{const i=this.el.shadowRoot.querySelector("#live-region");let s="";const e=this.getAriaLabel(t);if(i&&t.value){if(t===this.monthInputEl&&!!v[+t.value-1]){s=`${t.value} - ${v[+t.value-1]}, ${e}`}if(t===this.dayInputEl||t===this.yearInputEl){s=`${t.value}, ${e}`}i.textContent=s}};this.notifyScreenReaderInput=(t,i)=>{let s="";const e=this.getAriaLabel(t);if(t===this.dayInputEl||t===this.monthInputEl){if(t.value.length===2){if(t===this.monthInputEl&&!!v[+t.value-1]&&this.isValidMonth){s=`${t.value} - ${v[+t.value-1]}, ${e}`}if(t===this.dayInputEl&&this.isValidDay){s=`${t.value}, ${e}`}}else{s=""}}else{if(t.value.length===4){s=`${t.value}, ${e}`}else{s=""}}i.textContent=s};this.setFitToValueStyling=t=>{if(t.value){t.classList.add(this.FIT_TO_VALUE)}else{t.classList.remove(this.FIT_TO_VALUE)}};this.setAriaInvalid=(t,i,s,e)=>{if(this.inputsInOrder.length){this.inputsInOrder.forEach((t=>{t.removeAttribute(this.ARIA_INVALID)}));if(!t){this.dayInputEl.setAttribute(this.ARIA_INVALID,"true")}if(!i){this.monthInputEl.setAttribute(this.ARIA_INVALID,"true")}if(!s||e){this.inputsInOrder.forEach((t=>{t.setAttribute(this.ARIA_INVALID,"true")}))}}};this.handleClear=()=>{this.clearInput=true;this.inputsInOrder.forEach((t=>{t.classList.remove(this.FIT_TO_VALUE);this.setInputValue(t,true);this.setPreventInput(t,false)}));this.clearInput=false;this.isDateSetFromKeyboardEvent=false;this.setValidationMessage();this.handleDateChange(true);this.inputsInOrder[0].focus()};this.handleCalendarOpen=t=>{var i,s;t.stopImmediatePropagation();(i=this.calendarButtonEl)===null||i===void 0?void 0:i.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);this.calendarButtonClicked.emit({value:this.selectedDate});(s=this.calendarButtonEl)===null||s===void 0?void 0:s.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);this.isDateSetFromKeyboardEvent=false};this.setValueAndEmitChange=t=>{if(!m(new Date(this.value),t)){this.emitIcChange(t);this.value=t}};this.handleCalendarFocus=()=>{this.calendarFocused=true};this.handleCalendarBlur=()=>{this.calendarFocused=false};this.handleClearFocus=()=>{this.removeLabelledBy=true;this.clearButtonFocused=true};this.handleClearBlur=t=>{var i;this.clearButtonFocused=false;if((i=t.relatedTarget)===null||i===void 0?void 0:i.id.match(/(day|year)-input$/)){this.removeLabelledBy=false;return}this.removeLabelledBy=true};this.emitIcChange=t=>{this.selectedDate=t;if(!m(this.selectedDate,t)||this.day!==null||this.month!==null||this.year!==null){this.icChange.emit({value:t,dateObject:{day:this.day===""?null:this.day,month:this.month===""?null:this.month,year:this.year===""?null:this.year}})}}}watchInputHandler(){if(this.emitDatePartChange&&!this.externalSetDate&&!this.clearInput&&!(this.day&&this.month&&this.year)&&this.selectedDate===null){this.emitIcChange(this.selectedDate)}}watchDisabledHandler(){o(this.disabled,this.el)}watchDisableFutureHandler(){this.watchMaxHandler()}watchDisablePastHandler(){this.watchMinHandler()}watchMaxHandler(){if(this.disableFuture){this.maxDate=new Date}else{this.maxDate=k(this.max,this.dateFormat)}}watchMinHandler(){if(this.disablePast){this.minDate=new Date}else{this.minDate=k(this.min,this.dateFormat)}}watchRequiredHandler(){const t=this.el.shadowRoot.querySelector("label");if(this.required){const i=document.createElement("span");i.setAttribute("id","asterisk-span");i.setAttribute("aria-hidden","true");i.textContent=" *";t===null||t===void 0?void 0:t.appendChild(i)}else{const t=this.el.shadowRoot.querySelector("#asterisk-span");if(t){t.remove()}}}disconnectedCallback(){l(this.el,this.handleFormReset)}componentWillLoad(){this.defaultHelperText=`Use format ${this.dateFormat}`;if(h(this.helperText))this.helperText=this.defaultHelperText;this.watchMinHandler();this.watchMaxHandler();if(this.value){this.externalSetDate=true;this.setDate(this.value)}this.screenReaderInfoId=`${this.inputId}-screen-reader-info`;this.assistiveHintId=`${this.inputId}-assistive-hint`;this.selectedDateInfoId=`${this.inputId}-selected-date-info`;c(this.el,this.handleFormReset);o(this.disabled,this.el)}componentDidLoad(){this.setInputsInOrder();d([{prop:this.label,propName:"label"}],"Date Input");if(this.value){this.updateInputValues(this.day,this.month,this.year);this.inputsInOrder.forEach((t=>{t.classList.add(this.FIT_TO_VALUE)}))}this.setAriaInvalid(this.isValidDay,this.isValidMonth,this.isValidDate,this.isDisabledDate);if(this.value){this.notifyScreenReaderSelectedDate()}this.inputsInOrder.forEach((t=>{t.addEventListener("input",this.handleInput);t.addEventListener("focus",this.handleFocus);t.addEventListener("blur",this.handleBlur)}));this.watchRequiredHandler()}componentWillUpdate(){if(h(this.helperText))this.helperText=this.defaultHelperText;if(!this.isDateSetFromKeyboardEvent)this.setDate(this.value);this.setAriaInvalid(this.isValidDay,this.isValidMonth,this.isValidDate,this.isDisabledDate);this.handleDateChange(false);this.isDateSetFromKeyboardEvent=false}componentDidRender(){if(this.removeLabelledBy){this.removeAriaLabelledBy();return}this.setAriaLabelledBy()}async getDate(){return this.selectedDate}async setCalendarFocus(){if(this.calendarButtonEl){this.calendarButtonEl.focus()}}async setDisableDays(t){this.disableDays=t}async triggerIcChange(t){this.externalSetDate=true;this.setDate(t);this.emitIcChange(t);this.externalSetDate=false}removeAriaLabelledBy(){this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY)}setPastedValueAndValidation(t,i,s){switch(true){case t:{const t=this.isZuluTime?x(i):i;const s=t.split(/-|\/|\./);this.inputsInOrder.forEach(((t,i)=>{t.classList.add(this.FIT_TO_VALUE);if(this.isZuluTime){this.pasteZuluDateTime(s,i)}else{let e;if(t===this.dayInputEl||t===this.monthInputEl){e=this.slicePastedDate(2,s[i])}else{e=this.slicePastedDate(4,s[i])}t.value=e;this.setInputValue(t);this.autocompleteInput(t)}}));this.isZuluTime=false;break}case(i.length===1||i.length===2||i.length===4)&&u(i):if(this.checkSingleCopiedValueIsValid(s.target,i)){this.setInputPasteValue(s.target,i);this.setInputValue(s.target)}else{this.displayPastedValidation(s)}break;case i.length===3&&u(i):if(s.target!==this.yearInputEl){this.displayPastedValidation(s)}else{this.setInputPasteValue(s.target,i);this.setInputValue(s.target)}break;case i.length>=5&&u(i):this.displayPastedValidation(s)}}pasteZuluDateTime(t,i){if(i===0){const s=this.slicePastedDate(4,t[i]);this.yearInputEl.value=s;this.setInputValue(this.yearInputEl)}else if(i===1){const s=this.slicePastedDate(2,t[i]);this.monthInputEl.value=s;this.setInputValue(this.monthInputEl)}else{const s=this.slicePastedDate(2,t[i]);this.dayInputEl.value=s;this.setInputValue(this.dayInputEl)}}displayPastedValidation(t){var i;if(((i=this.invalidDateText)===null||i===void 0?void 0:i.length)>0){this.previousInvalidDateTest=this.invalidDateText}this.invalidDateText=`Please paste a valid ${this.getAriaLabel(t.target)}`;this.validationStatus=f.Error;this.isPasteValidationDisplayed=true}setPasteInvalidText(){var t;if(this.isPasteValidationDisplayed){this.invalidDateText=(t=this.previousInvalidDateTest)!==null&&t!==void 0?t:"";this.isPasteValidationDisplayed=false;this.isDateSetFromKeyboardEvent=true}}notifyScreenReader(t,i){const s=this.el.shadowRoot.querySelector("#live-region");if(s){if(this.isKeyboardOrEvent(i)){this.notifyScreenReaderArrowKeys(t)}else if(Object.prototype.toString.call(i)===this.INPUT_EVENT_OBJECT_STRING){this.notifyScreenReaderInput(t,s)}}}render(){const{inputId:t,label:i,disabled:a,helperText:r,hideHelperText:n,hideLabel:o,showClearButton:l,showCalendarButton:c,size:d,theme:u}=this;const p=!h(this.validationStatus);const v=p?this.validationStatus:!h(this.invalidDateText)?f.Error:"";const m=`Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;b(true,this.el,this.name,this.convertToDate(this.year,this.month,this.day),this.disabled);return s(e,{key:"a37b652ab1896d583a970f2fe3f23480fe923406",class:{[`ic-theme-${u}`]:u!=="inherit",[`ic-date-input-disabled`]:a},onBlur:this.handleHostBlur,onFocus:this.handleHostFocus},s("ic-input-container",{key:"41c1cd439879613d8920593309e19c050e5d451e",disabled:a},!(o&&n)&&s("ic-input-label",{key:"a598faa23eda4cf283cd5e542008aad20150736e",for:t,label:i,hideLabel:o,helperText:!n?r:"",disabled:a}),s("span",{key:"71265eb5808610652efe874a2ad9828c970a9176",id:this.screenReaderInfoId,class:"sr-only","aria-hidden":"true"},this.getScreenReaderInfo(v),o&&`${i}\n`,n&&`${r}\n`,`${this.defaultHelperText}.`),s("span",{key:"67121b1b28fa69acd5c143d8dacb9c634db15f05",id:this.assistiveHintId,class:"sr-only","aria-hidden":"true"},m),s("span",{key:"2af3f97d24ed25ba868b08d13b4467075b350a36",id:"live-region","aria-live":"assertive",class:"sr-only"}),s("ic-input-component-container",{key:"c7c455f3f16458f6a56e604e8f8499834f277933",id:t,ref:t=>this.inputCompContainerEl=t,disabled:a,validationStatus:v,size:d,role:"group",class:{[`ic-theme-${u}`]:u!=="inherit"}},s("div",{key:"ccf2a9ca8154cdc108fdbbe4a8b1cf2fd6fb5070",class:"input-container"},s("div",{key:"c044b44ee99dcf32722bdbfa481c8464a9a4d7bb",class:"date-inputs"},this.getInputsInOrder()[0],"/",this.getInputsInOrder()[1],"/",this.getInputsInOrder()[2]),s("div",{key:"30818ad45a24cdca204f8b629f064840420afb44",class:"action-buttons"},l&&s("ic-button",{key:"99a6a5b62893e56cf5d3a4f6645ce2aa1b77e538",id:"clear-button","aria-label":"Clear input",class:{["clear-button"]:true,["hidden"]:h(this.day)&&h(this.month)&&h(this.year)},disabled:this.disabled,innerHTML:$,onClick:this.handleClear,onFocus:this.handleClearFocus,onBlur:this.handleClearBlur,variant:"icon-tertiary",theme:this.clearButtonFocused?"light":"dark",size:d}),c&&s("div",{key:"77a0ba0e9dfa3b99a97252178e42f49261619503",class:"show-calendar-button-wrapper"},s("div",{key:"70408bceb4963e3ba54fe5630ba95905d15be0a6",class:{divider:true,[d]:true}}),s("ic-button",{key:"f38c632d59fe23bfda2f20a8a9646028ac40f99b",id:"calendar-button",ref:t=>this.calendarButtonEl=t,"aria-label":"Display calendar","aria-haspopup":"dialog",class:"calendar-button",disabled:this.disabled,innerHTML:D,onClick:this.handleCalendarOpen,variant:"icon-tertiary",size:d,onFocus:this.handleCalendarFocus,onBlur:this.handleCalendarBlur,theme:this.calendarFocused?"light":"dark"}))))),s("span",{key:"614cc74c88f8d83e04ec9bde0d984567c536d65c",id:this.selectedDateInfoId,class:"sr-only","aria-live":"polite"},s("span",{key:"f1dea32613b9f162808ffef69baa6231c86998d3",ref:t=>this.selectedDateInfoEl=t,role:"status"})),(p||!h(this.invalidDateText))&&s("ic-input-validation",{key:"802cdf9f7bc52c9164137059b46f5c1dfcbcdb80",status:v,message:p?this.validationText:this.invalidDateText,for:t})))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{day:["watchInputHandler"],month:["watchInputHandler"],year:["watchInputHandler"],disabled:["watchDisabledHandler"],disableFuture:["watchDisableFutureHandler"],disablePast:["watchDisablePastHandler"],max:["watchMaxHandler"],min:["watchMinHandler"],required:["watchRequiredHandler"]}}};M.style=z;export{M as ic_date_input};
2
+ //# sourceMappingURL=p-0ad472d0.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icDateInputCss","IcDateInputStyle0","inputIds","DateInput","constructor","hostRef","this","ARIA_INVALID","ARIA_LABEL","ARIA_LABELLED_BY","EVENT_OBJECT_STRING","FIT_TO_VALUE","initialValue","value","INPUT_EVENT_OBJECT_STRING","inputsInOrder","isAfterMax","isBeforeMin","isDateSetFromKeyboardEvent","isDisabledDate","isValidDay","isValidMonth","isValidDate","isZuluTime","KEYBOARD_EVENT_OBJECT_STRING","MAX_DAY","MAX_MONTH","previousSelectedDate","selectedDate","externalSetDate","clearInput","calendarFocused","clearButtonFocused","removeLabelledBy","day","month","year","dateFormat","emitDatePartChange","disabled","disableDays","disableDaysMessage","disableFuture","disableFutureMessage","disablePast","disablePastMessage","hideHelperText","hideLabel","inputId","invalidDateMessage","max","min","name","required","showCalendarButton","showClearButton","size","theme","validationStatus","validationText","setInputPasteValue","input","pastedValue","inputEl","classList","add","checkSingleCopiedValueIsValid","isValid","Number","dayInputEl","monthInputEl","yearInputEl","isKeyboardOrEvent","event","Object","prototype","toString","call","setDateValidity","isEmptyString","handleInput","inputEvent","target","inputType","preventAutoFormatting","length","setInputValue","notifyScreenReader","moveToNextInput","setPreventInput","setFitToValueStyling","setValidationMessage","handleKeyDown","isInputPrevented","eventKey","_a","key","toLowerCase","regex","test","ctrlKey","metaKey","preventDefault","setPasteInvalidText","handleLeftRightArrowKeyPress","handleUpDownArrowKeyPress","moveToPreviousInput","preventInput","handleFocus","select","handleBlur","autocompleteInput","notifyScreenReaderSelectedDate","dayNames","stringEnumToArray","IcDayNames","months","IcDateInputMonths","selectedDateInfoEl","textContent","getDay","getDate","getMonth","getFullYear","minValue","maxValue","Date","handleDateChange","force","dateMatches","forEach","invalidDateText","setValueAndEmitChange","updateInputValues","slicePastedDate","valueLength","datePart","slice","isPastedStringDateValid","handlePaste","clipboardData","getData","setPastedValueAndValidation","setDate","date","undefined","remove","isDateOrEpoch","newDate","convertToDoubleDigits","defaultDateArray","splitStringDate","formatMinMax","formattedDate","clear","newValue","convertToDate","isSelectedDateDisabled","setAttribute","removeAttribute","minDate","maxDate","setInputsInOrder","inputs","el","shadowRoot","querySelectorAll","push","setAriaLabelledBy","inputCompContainerEl","getAttribute","removeAriaLabelledBy","labelEl","querySelector","labelId","id","hasValidation","labelledBy","_b","screenReaderInfoId","getInputDescribedByText","helperText","defaultHelperText","selectedDateInfoId","assistiveHintId","isPrevented","preventDayInput","preventMonthInput","preventYearInput","getInputFromDatePart","dayInput","h","class","ref","placeholder","onPaste","inputmode","pattern","onKeyDown","monthInput","yearInput","maxLength","getInputsInOrder","dateParts","split","part","substring","getDescOfInputsOrder","description","getScreenReaderInfo","inputDescriptors","IcInformationStatus","Error","selectedString","selectionStart","selectionEnd","currentDate","isNotToday","toDateString","includes","currentInput","currentInputPos","findIndex","nextInput","focus","autocompleteYear","inputValue","yearNumbers","autocompletedInput","number","index","handleHostBlur","icBlur","emit","handleHostFocus","activeElement","match","icFocus","handleFormReset","getAriaLabel","notifyScreenReaderArrowKeys","liveRegion","announcement","ariaLabel","notifyScreenReaderInput","setAriaInvalid","validDay","validMonth","validDate","disabledDate","handleClear","handleCalendarOpen","ev","stopImmediatePropagation","calendarButtonEl","displayTooltip","calendarButtonClicked","emitIcChange","handleCalendarFocus","handleCalendarBlur","handleClearFocus","handleClearBlur","relatedTarget","d","icChange","dateObject","watchInputHandler","watchDisabledHandler","removeDisabledFalse","watchDisableFutureHandler","watchMaxHandler","watchDisablePastHandler","watchMinHandler","createDate","watchRequiredHandler","asteriskSpan","document","createElement","appendChild","disconnectedCallback","removeFormResetListener","componentWillLoad","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","addEventListener","componentWillUpdate","componentDidRender","setCalendarFocus","setDisableDays","days","triggerIcChange","nextParsedValue","extractDateFromZuluDateTime","pasteZuluDateTime","dateValue","isNumeric","displayPastedValidation","previousInvalidDateTest","isPasteValidationDisplayed","render","hasCustomValidation","assistiveHint","renderHiddenInput","Host","onBlur","onFocus","for","role","innerHTML","Clear","onClick","variant","divider","Calendar","status","message"],"sources":["src/components/ic-date-input/ic-date-input.css?tag=ic-date-input&encapsulation=shadow","src/components/ic-date-input/ic-date-input.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --input-bg-color: var(--ic-date-input-bg);\n --ic-input-label-text-color: var(--ic-date-input-label);\n --ic-input-label-helper-text-color: var(--ic-date-input-subtitle);\n --border-color: var(--ic-date-input-border);\n --border-color-disabled: var(--ic-date-input-border-disabled);\n --border-color-hover: var(--ic-date-input-border-default-hover);\n --border-color-pressed: var(--ic-date-input-border-default-pressed);\n --border-error-color: var(--ic-date-input-border-error);\n --border-error-color-hover: var(--ic-date-input-border-error-hover);\n --border-error-color-pressed: var(--ic-date-input-border-error-pressed);\n --border-success-color: var(--ic-date-input-border-success);\n --border-success-color-hover: var(--ic-date-input-border-success-hover);\n --border-success-color-pressed: var(--ic-date-input-border-success-pressed);\n --border-warning-color: var(--ic-date-input-border-warning);\n --border-warning-color-hover: var(--ic-date-input-border-warning-hover);\n --border-warning-color-pressed: var(--ic-date-input-border-warning-pressed);\n}\n\n:host(.ic-date-input-disabled) {\n --ic-input-label-text-color: var(--ic-date-input-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-date-input-subtitle-disabled);\n}\n\ninput {\n border: 0;\n height: 100%;\n padding: 0;\n outline: none;\n background: none;\n -moz-appearance: textfield;\n appearance: textfield;\n color: var(--ic-date-input-text-filled);\n caret-color: var(--ic-date-input-typing-cursor);\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n}\n\ninput:-webkit-autofill {\n box-shadow: 0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;\n -webkit-text-fill-color: var(--ic-date-input-text-filled) !important;\n}\n\ninput::placeholder {\n color: var(--ic-date-input-text-placeholder);\n}\n\nic-input-component-container {\n cursor: text;\n}\n\nic-input-component-container .focus-indicator {\n padding: var(--ic-space-xxxs) var(--ic-space-xs);\n align-items: center;\n}\n\n.date-inputs {\n color: var(--ic-date-input-text-placeholder);\n}\n\n.day-input {\n width: 1.438rem;\n}\n\n.month-input {\n width: 1.813rem;\n}\n\n.year-input,\n.year-input.fit-to-value {\n width: 2.313rem;\n}\n\n.fit-to-value {\n width: 1.25rem;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.input-container {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n}\n\n.action-buttons {\n display: flex;\n align-items: center;\n}\n\n.show-calendar-button-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.clear-button,\n.calendar-button {\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n margin: 0;\n}\n\n.clear-button.hidden {\n display: none;\n}\n\n.clear-button:focus,\n.calendar-button:focus,\n.clear-button:active,\n.calendar-button:active {\n background-color: var(--ic-color-focus-inner) !important;\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;\n border-radius: 0.25rem;\n}\n\n.calendar-button:focus,\n.calendar-button:active {\n --ic-button-tertiary-text-active: var(--ic-atoms-input-clear-button-focus);\n --ic-button-tertiary-text-hover-active: var(\n --ic-atoms-input-clear-button-focus\n );\n --ic-button-tertiary-text-pressed-active: var(\n --ic-atoms-input-clear-button-focus\n );\n}\n\n.clear-button:focus,\n.calendar-button:focus,\n.clear-button:active *,\n.calendar-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button svg {\n color: var(--ic-date-input-clear-icon);\n}\n\n.clear-button:focus svg {\n color: var(--ic-atoms-input-clear-button-focus);\n}\n\n.divider {\n margin: 0 var(--ic-space-xxs);\n width: var(--ic-space-1px);\n background-color: var(--ic-atoms-input-divider);\n border-radius: var(--ic-space-1px);\n}\n\n.divider.small {\n height: var(--ic-space-md);\n}\n\n.divider.medium {\n height: calc(var(--ic-space-sm) + var(--ic-space-xs));\n}\n\n.divider.large {\n height: var(--ic-space-lg);\n}\n\nic-input-validation {\n --ic-input-validation-status-text-color: var(--ic-date-input-status-text);\n --ic-input-validation-error: var(--ic-date-input-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-date-input-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-date-input-icon-success);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Host,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcSizes,\n IcDateFormat,\n IcDateInputMonths,\n IcDayNames,\n IcWeekDays,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n convertToDoubleDigits,\n createDate,\n dateMatches,\n extractDateFromZuluDateTime,\n isDateOrEpoch,\n splitStringDate,\n} from \"../../utils/date-helpers\";\nimport {\n addFormResetListener,\n getInputDescribedByText,\n isEmptyString,\n isNumeric,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n removeFormResetListener,\n renderHiddenInput,\n stringEnumToArray,\n} from \"../../utils/helpers\";\nimport Clear from \"../../assets/clear-icon.svg\";\nimport Calendar from \"../../assets/calendar.svg\";\n\nlet inputIds = 0;\n\n@Component({\n tag: \"ic-date-input\",\n styleUrl: \"ic-date-input.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class DateInput {\n private ARIA_INVALID = \"aria-invalid\";\n private ARIA_LABEL = \"aria-label\";\n private ARIA_LABELLED_BY = \"aria-labelledby\";\n private assistiveHintId: string;\n private calendarButtonEl: HTMLIcButtonElement;\n private dayInputEl: HTMLInputElement;\n private defaultHelperText: string;\n private EVENT_OBJECT_STRING = \"[object Event]\";\n private FIT_TO_VALUE = \"fit-to-value\";\n\n private initialValue = this.value;\n private inputCompContainerEl: HTMLIcInputComponentContainerElement;\n private INPUT_EVENT_OBJECT_STRING = \"[object InputEvent]\";\n private inputsInOrder: HTMLInputElement[] = [];\n\n private isAfterMax: boolean = false;\n private isBeforeMin: boolean = false;\n private isDateSetFromKeyboardEvent: boolean = false;\n private isDisabledDate: boolean = false;\n private isPasteValidationDisplayed: boolean;\n private isValidDay: boolean = true;\n private isValidMonth: boolean = true;\n private isValidDate: boolean = true;\n private isZuluTime: boolean = false;\n\n private KEYBOARD_EVENT_OBJECT_STRING = \"[object KeyboardEvent]\";\n private MAX_DAY = 31;\n private MAX_MONTH = 12;\n private monthInputEl: HTMLInputElement;\n\n private preventAutoFormatting: boolean;\n private preventDayInput: boolean;\n private preventMonthInput: boolean;\n private preventYearInput: boolean;\n\n private previousInvalidDateTest: string;\n private previousSelectedDate: Date = null;\n\n private selectedDate: Date = null;\n private selectedDateInfoEl: HTMLSpanElement;\n private screenReaderInfoId: string;\n private selectedDateInfoId: string;\n\n private yearInputEl: HTMLInputElement;\n\n private externalSetDate: boolean = false;\n private clearInput: boolean = false;\n\n @Element() el: HTMLIcDateInputElement;\n\n @State() invalidDateText: string;\n @State() maxDate: Date;\n @State() minDate: Date;\n @State() calendarFocused: boolean = false;\n @State() clearButtonFocused: boolean = false;\n @State() removeLabelledBy: boolean = false;\n\n @State() day: string = \"\";\n @State() month: string = \"\";\n @State() year: string = \"\";\n\n @Watch(\"day\")\n @Watch(\"month\")\n @Watch(\"year\")\n watchInputHandler(): void {\n if (\n this.emitDatePartChange &&\n !this.externalSetDate &&\n !this.clearInput &&\n !(this.day && this.month && this.year) &&\n this.selectedDate === null\n ) {\n this.emitIcChange(this.selectedDate);\n }\n }\n\n /**\n * The format in which the date will be displayed.\n */\n // eslint-disable-next-line sonarjs/no-duplicate-string\n @Prop() dateFormat?: IcDateFormat = \"DD/MM/YYYY\";\n /**\n * If `true`, every individual input field completed will emit an icChange event.\n */\n @Prop() emitDatePartChange?: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The days of the week to disable.\n */\n @Prop({ mutable: true }) disableDays?: IcWeekDays[] = [];\n\n /**\n * The text to display as the validation message when `disableDays` is set and a disabled date is entered.\n */\n @Prop() disableDaysMessage?: string =\n \"The date you have selected is on a day of the week that is not allowed. Please select another date.\";\n\n /**\n * If `true`, dates in the future are not allowed. A validation message will appear if a date in the future is entered.\n */\n @Prop() disableFuture?: boolean = false;\n\n @Watch(\"disableFuture\")\n watchDisableFutureHandler(): void {\n this.watchMaxHandler();\n }\n\n /**\n * The text to display as the validation message when `disableFuture` is true and a date in the future is entered.\n */\n @Prop() disableFutureMessage?: string =\n \"Dates in the future are not allowed. Please select a date in the past.\";\n\n /**\n * If `true`, dates in the past are not allowed. A validation message will appear if a date in the past is entered.\n */\n @Prop() disablePast?: boolean = false;\n\n @Watch(\"disablePast\")\n watchDisablePastHandler(): void {\n this.watchMinHandler();\n }\n\n /**\n * The text to display as the validation message when `disablePast` is true and a date in the past is entered.\n */\n @Prop() disablePastMessage?: string =\n \"Dates in the past are not allowed. Please select a date in the future.\";\n\n /**\n * The helper text that will be displayed for additional field guidance. This will default to the text \"Use format\" along with the `dateFormat` value.\n */\n @Prop({ mutable: true }) helperText?: string;\n\n /**\n * If `true`, the helper text will be visually hidden, but still read out by screenreaders.\n */\n @Prop() hideHelperText: boolean = false;\n\n /**\n * If `true`, the label will be visually hidden, but will still be read out by screen readers.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-date-input-${inputIds++}`;\n\n /**\n * The text to display as the validation message when an invalid date is entered.\n */\n @Prop() invalidDateMessage?: string = \"Please enter a valid date.\";\n\n /**\n * The label for the date input.\n */\n @Prop() label!: string;\n\n /**\n * The latest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n * The value of this prop is ignored if `disableFuture` is set to `true`.\n */\n @Prop() max?: string | Date = \"\";\n\n @Watch(\"max\")\n watchMaxHandler(): void {\n if (this.disableFuture) {\n this.maxDate = new Date();\n } else {\n this.maxDate = createDate(this.max, this.dateFormat);\n }\n }\n\n /**\n * The earliest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n * The value of this prop is ignored if `disablePast` is set to `true`.\n */\n @Prop() min?: string | Date = \"\";\n\n @Watch(\"min\")\n watchMinHandler(): void {\n if (this.disablePast) {\n this.minDate = new Date();\n } else {\n this.minDate = createDate(this.min, this.dateFormat);\n }\n }\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required?: boolean = false;\n\n @Watch(\"required\")\n watchRequiredHandler(): void {\n // Prevent asterisk being read out after the label by screen reader (by applying aria-hidden)\n // Needed because label is included in 'aria-labelledby' instead of using 'aria-label'\n const labelEl = this.el.shadowRoot.querySelector(\"label\");\n if (this.required) {\n const asteriskSpan = document.createElement(\"span\");\n asteriskSpan.setAttribute(\"id\", \"asterisk-span\");\n asteriskSpan.setAttribute(\"aria-hidden\", \"true\");\n asteriskSpan.textContent = \" *\";\n labelEl?.appendChild(asteriskSpan);\n } else {\n const asteriskSpan = this.el.shadowRoot.querySelector(\"#asterisk-span\");\n if (asteriskSpan) {\n asteriskSpan.remove();\n }\n }\n }\n\n /**\n * @internal If `true`, a button which displays the calendar view when clicked will be displayed.\n */\n @Prop() showCalendarButton?: boolean = false;\n\n /**\n * If `true`, a button which clears the date input when clicked will be displayed.\n */\n @Prop() showClearButton?: boolean = true;\n\n /**\n * The size of the date input to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * Sets the date picker to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value of the date input. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n */\n @Prop({ mutable: true }) value?: string | Date | null | undefined = \"\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation.\n */\n @Prop({ mutable: true }) validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message. This will override the built-in date validation.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * @internal Emitted when the calendar is opened.\n */\n @Event() calendarButtonClicked: EventEmitter<{ value: Date }>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() icBlur: EventEmitter<{ value: Date }>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<{\n value: Date;\n dateObject: { day: string; month: string; year: string };\n }>;\n\n /**\n * Emitted when the input gains focus.\n */\n @Event() icFocus: EventEmitter<{ value: Date }>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.defaultHelperText = `Use format ${this.dateFormat}`;\n\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n\n this.watchMinHandler();\n this.watchMaxHandler();\n\n if (this.value) {\n this.externalSetDate = true;\n this.setDate(this.value);\n }\n\n this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;\n this.assistiveHintId = `${this.inputId}-assistive-hint`;\n this.selectedDateInfoId = `${this.inputId}-selected-date-info`;\n\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.setInputsInOrder();\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Date Input\"\n );\n\n if (this.value) {\n this.updateInputValues(this.day, this.month, this.year);\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n\n this.setAriaInvalid(\n this.isValidDay,\n this.isValidMonth,\n this.isValidDate,\n this.isDisabledDate\n );\n\n if (this.value) {\n this.notifyScreenReaderSelectedDate();\n }\n\n this.inputsInOrder.forEach((input) => {\n input.addEventListener(\"input\", this.handleInput);\n input.addEventListener(\"focus\", this.handleFocus);\n input.addEventListener(\"blur\", this.handleBlur);\n });\n\n this.watchRequiredHandler();\n }\n\n componentWillUpdate(): void {\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n\n if (!this.isDateSetFromKeyboardEvent) this.setDate(this.value);\n\n this.setAriaInvalid(\n this.isValidDay,\n this.isValidMonth,\n this.isValidDate,\n this.isDisabledDate\n );\n this.handleDateChange(false);\n this.isDateSetFromKeyboardEvent = false;\n }\n\n componentDidRender(): void {\n if (this.removeLabelledBy) {\n this.removeAriaLabelledBy();\n return;\n }\n\n this.setAriaLabelledBy();\n }\n\n /**\n * Returns the value as a Date object\n * @returns Date\n */\n @Method()\n async getDate(): Promise<Date> {\n return this.selectedDate;\n }\n\n /**\n * @internal Sets focus on the calendar button.\n */\n @Method()\n async setCalendarFocus(): Promise<void> {\n if (this.calendarButtonEl) {\n this.calendarButtonEl.focus();\n }\n }\n\n /**\n * @internal Used to pass disabledDays from parent component.\n */\n @Method()\n async setDisableDays(days: IcWeekDays[]): Promise<void> {\n this.disableDays = days;\n }\n\n /**\n * @internal Used to enable other components to invoke an IcChange event from the input.\n */\n @Method()\n async triggerIcChange(d: Date): Promise<void> {\n this.externalSetDate = true;\n this.setDate(d);\n this.emitIcChange(d);\n this.externalSetDate = false;\n }\n\n private setInputPasteValue = (input: EventTarget, pastedValue: string) => {\n const inputEl = input as HTMLInputElement;\n\n inputEl.value = pastedValue;\n inputEl.classList.add(this.FIT_TO_VALUE);\n };\n\n private checkSingleCopiedValueIsValid = (\n input: EventTarget,\n pastedValue: string\n ) => {\n let isValid = false;\n const value = Number(pastedValue);\n\n switch (input) {\n case this.dayInputEl:\n isValid = value >= 1 && value <= this.MAX_DAY;\n break;\n case this.monthInputEl:\n isValid = value >= 1 && value <= this.MAX_MONTH;\n break;\n case this.yearInputEl:\n isValid = true;\n break;\n default:\n isValid = false;\n break;\n }\n\n return isValid;\n };\n\n /**\n * Using Object.prototype.string to determine type if event from user\n * @param event - event object used to differentiate keyboard, generic or input event\n * @returns boolean\n */\n private isKeyboardOrEvent = (event: Event) => {\n return (\n Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||\n Object.prototype.toString.call(event) ===\n this.KEYBOARD_EVENT_OBJECT_STRING\n );\n };\n\n private setDateValidity = () => {\n if (!isEmptyString(this.day)) {\n this.isValidDay = +this.day > this.MAX_DAY ? false : true;\n } else {\n this.isValidDay = true;\n }\n\n if (!isEmptyString(this.month)) {\n this.isValidMonth = +this.month > this.MAX_MONTH ? false : true;\n } else {\n this.isValidMonth = true;\n }\n };\n\n private handleInput = (event: Event) => {\n const inputEvent = event as InputEvent;\n const input = event.target as HTMLInputElement;\n\n if (input !== this.yearInputEl) {\n // Only auto-format if input event is not a character being deleted\n // and not as user is changing value using up / down keys\n if (\n inputEvent.inputType !== \"deleteContentBackward\" &&\n !this.preventAutoFormatting\n ) {\n if (\n input.value.length === 1 &&\n ((input === this.dayInputEl && +input.value >= 4) ||\n (input === this.monthInputEl && +input.value >= 2)) &&\n +input.value <= 9\n ) {\n this.setInputValue(input);\n this.notifyScreenReader(input, event);\n this.moveToNextInput(input);\n }\n\n if (input.value.length === 2) {\n if (+input.value === 0) {\n input.value = \"01\";\n }\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.notifyScreenReader(input, event);\n this.moveToNextInput(input);\n } else {\n this.setPreventInput(input, false);\n }\n } else if (this.preventAutoFormatting) {\n /**\n * Using arrow keys prevents auto formatting so need to deal with\n * switching from arrow keys to inputting numbers\n **/\n if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.moveToNextInput(input);\n } else {\n this.setInputValue(input);\n }\n }\n\n if (input.value.length !== 2) {\n this.setPreventInput(input, false);\n }\n } else {\n if (input.value.length === 4) {\n this.setInputValue(input);\n if (\n Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING\n ) {\n this.moveToNextInput(input);\n }\n this.setPreventInput(input, true);\n } else {\n this.setInputValue(input, true);\n this.setPreventInput(input, false);\n }\n }\n\n // Add / remove class to make input width match size of value i.e. 2 digits' width for day / month, 4 for year\n this.setFitToValueStyling(input);\n\n if (input.value.length === 0) {\n this.setInputValue(input, true);\n this.setValidationMessage();\n }\n\n this.notifyScreenReader(input, event);\n };\n\n private handleKeyDown = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const input = event.target as HTMLInputElement;\n\n const eventKey = event.key?.toLowerCase();\n // Regex required due to FF allowing all characters as values for number text field.\n const regex =\n /-?\\d*\\.?\\d+(e[-+]?\\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;\n if (\n !regex.test(eventKey) &&\n !(\n (event.ctrlKey || event.metaKey) &&\n (eventKey === \"v\" || eventKey === \"c\")\n )\n ) {\n event.preventDefault();\n }\n\n switch (eventKey) {\n case \"/\":\n case \"-\":\n case \".\":\n event.preventDefault();\n this.setPasteInvalidText();\n this.moveToNextInput(input);\n break;\n case \"arrowright\":\n case \"arrowleft\":\n event.preventDefault();\n this.handleLeftRightArrowKeyPress(input, eventKey);\n break;\n case \"arrowup\":\n case \"arrowdown\":\n this.preventAutoFormatting = true;\n this.handleUpDownArrowKeyPress(input, event);\n break;\n case \"backspace\":\n if (input.value.length === 0) {\n event.preventDefault();\n this.moveToPreviousInput(input);\n }\n break;\n default:\n break;\n }\n\n this.preventInput(event, isInputPrevented);\n this.isDateSetFromKeyboardEvent = true;\n };\n\n private handleFocus = (event: FocusEvent) => {\n // Highlight / select all characters in input for easy replacement\n const input = event.target as HTMLInputElement;\n\n input.select();\n };\n\n private handleBlur = (event: FocusEvent) => {\n const input = event.target as HTMLInputElement;\n\n this.setPasteInvalidText();\n this.autocompleteInput(input);\n };\n\n private handleLeftRightArrowKeyPress = (\n input: HTMLInputElement,\n key: string\n ) => {\n if (key === \"arrowright\") {\n this.moveToNextInput(input);\n } else {\n this.moveToPreviousInput(input);\n }\n\n this.setPasteInvalidText();\n };\n\n private notifyScreenReaderSelectedDate = () => {\n const dayNames = stringEnumToArray(IcDayNames);\n const months = stringEnumToArray(IcDateInputMonths);\n\n this.selectedDateInfoEl.textContent = `Selected date: ${\n dayNames[this.selectedDate.getDay()]\n }, ${this.selectedDate.getDate()} ${\n months[this.selectedDate.getMonth()]\n } ${this.selectedDate.getFullYear()}`;\n };\n\n private handleUpDownArrowKeyPress = (\n input: HTMLInputElement,\n event: KeyboardEvent\n ) => {\n const minValue = input === this.yearInputEl ? 0 : 1;\n\n let maxValue;\n\n switch (input) {\n case this.dayInputEl:\n maxValue = this.MAX_DAY;\n break;\n case this.monthInputEl:\n maxValue = this.MAX_MONTH;\n break;\n case this.yearInputEl:\n maxValue = 9999;\n }\n\n // Make value loop round when min / max reached\n if (input?.value) {\n if (event.key === \"ArrowUp\") {\n if (+input.value === maxValue) {\n event.preventDefault();\n input.value = `0${minValue}`;\n } else {\n input.value =\n +input.value + 1 < 10\n ? `0${+input.value + 1}`\n : (+input.value + 1).toString();\n }\n this.notifyScreenReader(input, event);\n }\n\n if (event.key === \"ArrowDown\") {\n if (+input.value === minValue) {\n event.preventDefault();\n input.value = maxValue.toString();\n } else {\n input.value =\n +input.value - 1 < 10\n ? `0${+input.value - 1}`\n : (+input.value - 1).toString();\n }\n this.notifyScreenReader(input, event);\n }\n } else {\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n if (input === this.yearInputEl) {\n input.value = new Date().getFullYear().toString();\n } else {\n input.value = maxValue.toString();\n }\n this.notifyScreenReader(input, event);\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n if (input === this.yearInputEl) {\n input.value = new Date().getFullYear().toString();\n } else {\n input.value = `0${minValue}`;\n }\n this.notifyScreenReader(input, event);\n }\n }\n\n this.setInputValue(input);\n this.setFitToValueStyling(input);\n };\n\n private handleDateChange = (force: boolean) => {\n // Prevent icChange being emitted when each individual input is changed\n // This method is used within componentWillUpdate instead of using @Watch('value');\n if (force || !dateMatches(this.selectedDate, this.previousSelectedDate)) {\n if (this.value) {\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n if (this.day && this.month && this.year && this.invalidDateText === \"\") {\n this.setValueAndEmitChange(this.selectedDate);\n this.notifyScreenReaderSelectedDate();\n } else if (\n !(this.selectedDate === null && this.previousSelectedDate === null)\n ) {\n this.setValueAndEmitChange(null);\n this.selectedDateInfoEl.textContent = \"\";\n }\n this.previousSelectedDate = this.selectedDate;\n\n if (!this.isDateSetFromKeyboardEvent) {\n this.updateInputValues(this.day, this.month, this.year);\n }\n }\n };\n\n private slicePastedDate = (valueLength: number, datePart: string): string => {\n return datePart.length > valueLength\n ? datePart.slice(0, valueLength)\n : datePart;\n };\n\n private isPastedStringDateValid = (value: string) => {\n if (\n /\\d+-\\d+-\\d+$/.test(value) ||\n /\\d+\\/\\d+\\/\\d+/.test(value) ||\n /\\d+\\.\\d+\\.\\d+/.test(value)\n ) {\n return true;\n }\n\n if (\n /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\\.\\d+)?)?Z/.test(\n value\n )\n ) {\n this.isZuluTime = true;\n return true;\n }\n\n return false;\n };\n\n // Set value of each input to value of pasted date part\n // Allows formats separated by '-' or '/'\n private handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n\n const pastedValue = event.clipboardData.getData(\"Text\");\n const isValidDate = this.isPastedStringDateValid(pastedValue);\n\n this.setPastedValueAndValidation(isValidDate, pastedValue, event);\n };\n\n private setDate = (date: string | Date) => {\n if (date === null || date === \"\" || date === undefined) {\n if (this.day) this.day = null;\n if (this.month) this.month = null;\n if (this.year) this.year = null;\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setPreventInput(input, false);\n });\n this.handleDateChange(true);\n } else {\n if (isDateOrEpoch(date)) {\n let newDate;\n if (typeof date === \"string\") {\n // Checking if epoch date time\n newDate = new Date(+date);\n } else {\n newDate = date;\n }\n\n this.day = convertToDoubleDigits(newDate.getDate());\n this.month = convertToDoubleDigits(newDate.getMonth() + 1);\n this.year = newDate.getFullYear().toString();\n } else if (typeof date === \"string\") {\n const defaultDateArray = splitStringDate(date, this.dateFormat);\n this.selectedDate = new Date(\n Number(defaultDateArray[0]),\n Number(defaultDateArray[1]) - 1,\n Number(defaultDateArray[2])\n );\n this.year = defaultDateArray[0];\n this.month = defaultDateArray[1];\n this.day = defaultDateArray[2];\n this.setValueAndEmitChange(this.selectedDate);\n }\n }\n\n this.setValidationMessage();\n };\n\n private formatMinMax = (date: Date) => {\n let formattedDate;\n\n const day = convertToDoubleDigits(date.getDate());\n const month = convertToDoubleDigits(date.getMonth() + 1);\n const year = date.getFullYear();\n\n switch (this.dateFormat) {\n case \"DD/MM/YYYY\":\n formattedDate = `${day}/${month}/${year}`;\n break;\n case \"MM/DD/YYYY\":\n formattedDate = `${month}/${day}/${year}`;\n break;\n case \"YYYY/MM/DD\":\n formattedDate = `${year}/${month}/${day}`;\n break;\n default:\n break;\n }\n return formattedDate;\n };\n private updateInputValues = (day: string, month: string, year: string) => {\n this.dayInputEl.value = day;\n this.monthInputEl.value = month;\n this.yearInputEl.value = year;\n };\n\n // Set value in state based on input\n private setInputValue = (input: HTMLInputElement, clear = false) => {\n const newValue = clear ? \"\" : input.value;\n\n switch (input) {\n case this.dayInputEl:\n this.day = newValue;\n break;\n case this.monthInputEl:\n this.month = newValue;\n break;\n case this.yearInputEl:\n if (this.year !== newValue) {\n this.year = newValue;\n }\n }\n\n this.setValidationMessage();\n };\n\n private setValidationMessage = () => {\n this.setDateValidity();\n\n if (\n !isEmptyString(this.day) &&\n !isEmptyString(this.month) &&\n !isEmptyString(this.year)\n ) {\n // Check whether date actually exists\n // (used https://www.hectane.com/blog/javascript-date-validation-with-leap-year)\n this.selectedDate = this.convertToDate(this.year, this.month, this.day);\n this.isValidDate =\n +this.selectedDate !== 0 && this.selectedDate.getDate() == +this.day;\n this.isDisabledDate = this.isSelectedDateDisabled();\n\n if (!this.isValidDate || this.isDisabledDate) {\n this.inputsInOrder.forEach((input) =>\n input.setAttribute(this.ARIA_INVALID, \"true\")\n );\n } else {\n this.inputsInOrder.forEach((input) =>\n input.removeAttribute(this.ARIA_INVALID)\n );\n }\n } else {\n this.selectedDate = null;\n }\n\n if (!(this.isValidDay && this.isValidMonth && this.isValidDate)) {\n this.invalidDateText = this.invalidDateMessage;\n } else if (this.isDisabledDate && this.selectedDate !== null) {\n if (this.isBeforeMin) {\n if (this.disablePast) {\n this.invalidDateText = this.disablePastMessage;\n } else {\n this.invalidDateText = `Please enter a date after ${this.formatMinMax(\n this.minDate\n )}.`;\n }\n } else if (this.isAfterMax) {\n if (this.disableFuture) {\n this.invalidDateText = this.disableFutureMessage;\n } else {\n this.invalidDateText = `Please enter a date before ${this.formatMinMax(\n this.maxDate\n )}.`;\n }\n } else if (this.disableDays.length !== 0) {\n this.invalidDateText = this.disableDaysMessage;\n } else {\n if (this.disablePast) {\n this.invalidDateText = this.disablePastMessage;\n }\n if (this.disableFuture) {\n this.invalidDateText = this.disableFutureMessage;\n }\n }\n } else {\n this.invalidDateText = \"\";\n }\n };\n\n // Set refs to the input elements in the order they are displayed (based on the dateFormat)\n private setInputsInOrder = () => {\n const inputs = this.el.shadowRoot.querySelectorAll(\"input\");\n inputs.forEach((input) => this.inputsInOrder.push(input));\n };\n\n // Includes text usually added using aria-describedby\n // (which doesn't work on input component container)\n private setAriaLabelledBy = () => {\n if (\n this.disabled &&\n !isEmptyString(\n this.inputCompContainerEl?.getAttribute(this.ARIA_LABELLED_BY)\n )\n ) {\n this.removeAriaLabelledBy();\n return;\n }\n\n if (this.disabled) {\n return;\n }\n\n const labelEl = this.el.shadowRoot.querySelector(\"label\");\n const labelId = `${this.inputId}-label`;\n\n if (labelEl !== null && labelEl !== undefined) {\n labelEl.id = labelId;\n }\n\n const hasValidation =\n !isEmptyString(this.validationStatus) ||\n !isEmptyString(this.invalidDateText);\n\n const labelledBy = `${labelEl?.id ?? \"\"} ${\n this.screenReaderInfoId\n } ${getInputDescribedByText(\n this.inputId,\n this.helperText !== \"\" && this.helperText !== this.defaultHelperText,\n hasValidation\n )} ${this.selectedDate ? this.selectedDateInfoId : \"\"} ${\n this.assistiveHintId\n }`;\n\n this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY, labelledBy);\n };\n\n // Sets boolean for each input, used to limit the number of characters within each field (2 for day / month, 4 for year)\n private setPreventInput = (input: HTMLInputElement, isPrevented: boolean) => {\n switch (input) {\n case this.dayInputEl:\n this.preventDayInput = isPrevented;\n break;\n case this.monthInputEl:\n this.preventMonthInput = isPrevented;\n break;\n case this.yearInputEl:\n this.preventYearInput = isPrevented;\n }\n };\n\n // Get input based on letter representing each date part (\"D\", \"M\" or \"Y\")\n // (retrieved from dateFormat)\n private getInputFromDatePart = (datePart: string) => {\n const dayInput = (\n <input\n class=\"day-input\"\n id=\"day-input\"\n ref={(el) => (this.dayInputEl = el)}\n aria-label=\"day\"\n placeholder=\"DD\"\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventDayInput)}\n ></input>\n );\n\n const monthInput = (\n <input\n id=\"month-input\"\n class=\"month-input\"\n ref={(el) => (this.monthInputEl = el)}\n aria-label=\"month\"\n placeholder=\"MM\"\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventMonthInput)}\n ></input>\n );\n\n const yearInput = (\n <input\n id=\"year-input\"\n class=\"year-input\"\n ref={(el) => (this.yearInputEl = el)}\n aria-label=\"year\"\n placeholder=\"YYYY\"\n maxLength={4}\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventYearInput)}\n ></input>\n );\n\n let input;\n\n switch (datePart) {\n case \"D\":\n input = dayInput;\n break;\n case \"M\":\n input = monthInput;\n break;\n case \"Y\":\n input = yearInput;\n }\n\n return input;\n };\n\n // Get input elements in order of chosen date format\n private getInputsInOrder = () => {\n const dateParts = this.dateFormat.split(\"/\");\n\n const inputsInOrder: HTMLInputElement[] = [];\n\n dateParts.forEach((part: string) => {\n inputsInOrder.push(this.getInputFromDatePart(part.substring(0, 1)));\n });\n\n return inputsInOrder;\n };\n\n // To add to the end of assistive hint to make it clearer that each date part has its own input\n // that can be changed individually\n private getDescOfInputsOrder = () => {\n let description;\n\n switch (this.dateFormat) {\n case \"DD/MM/YYYY\":\n description = \"day, month, and year\";\n break;\n case \"MM/DD/YYYY\":\n description = \"month, day, and year\";\n break;\n case \"YYYY/MM/DD\":\n description = \"year, month, and day\";\n }\n\n return description;\n };\n\n // Add 'required' or 'invalid data' to span used in aria-labelledby\n // Many ARIA attributes aren't read out by screen reader when on the input component container\n private getScreenReaderInfo = (validationStatus: string) => {\n let inputDescriptors = \"\";\n\n if (this.required) {\n inputDescriptors += \"required\";\n }\n\n if (validationStatus === IcInformationStatus.Error) {\n inputDescriptors += \" invalid data\";\n }\n\n return inputDescriptors === \"\" ? \"\" : inputDescriptors + \", \";\n };\n\n // Prevent non-number characters being entered\n // ('e' or '.' - which are usually allowed in <input type=\"number\">)\n // And limit the number of characters within each field (2 for day / month, 4 for year)\n // (because 'maxlength' doesn't work on <input type=\"number\">)\n private preventInput = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const key = event.key;\n const input = event.target as HTMLInputElement;\n let selectedString;\n\n if (input) {\n selectedString = input.value.substring(\n input.selectionStart,\n input.selectionEnd\n );\n }\n\n if (\n key === \"e\" ||\n key === \".\" ||\n key === \"-\" ||\n (event.key >= \"0\" &&\n event.key <= \"9\" &&\n isInputPrevented &&\n !selectedString)\n ) {\n event.preventDefault();\n }\n };\n\n // Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day\n // Consider using dateClamp and inDateRange\n private isSelectedDateDisabled = () => {\n const currentDate = new Date();\n this.isAfterMax = false;\n this.isBeforeMin = false;\n\n let disabled = false;\n const isNotToday =\n this.selectedDate.toDateString() !== currentDate.toDateString();\n\n if (this.minDate && this.selectedDate < this.minDate && isNotToday) {\n this.isBeforeMin = true;\n disabled = true;\n }\n\n if (this.maxDate && this.selectedDate > this.maxDate && isNotToday) {\n this.isAfterMax = true;\n disabled = true;\n }\n\n if (this.disableDays.includes(this.selectedDate.getDay())) {\n disabled = true;\n }\n\n if (\n ((this.disablePast && this.selectedDate < currentDate) ||\n (this.disableFuture && this.selectedDate > currentDate)) &&\n isNotToday\n ) {\n disabled = true;\n }\n\n return disabled;\n };\n\n private moveToNextInput = (currentInput: HTMLInputElement) => {\n const currentInputPos = this.inputsInOrder.findIndex(\n (input) => input === currentInput\n );\n const nextInput = this.inputsInOrder[currentInputPos + 1];\n\n this.preventAutoFormatting = false;\n\n if (nextInput) {\n nextInput.focus();\n }\n };\n\n private moveToPreviousInput = (currentInput: HTMLInputElement) => {\n const currentInputPos = this.inputsInOrder.findIndex(\n (input) => input === currentInput\n );\n\n this.preventAutoFormatting = false;\n\n if (this.inputsInOrder[currentInputPos - 1]) {\n this.inputsInOrder[currentInputPos - 1].focus();\n }\n };\n\n private autocompleteInput = (input: HTMLInputElement) => {\n if (input === this.yearInputEl) {\n this.autocompleteYear();\n } else {\n const inputValue = input.value;\n\n // Autocomplete input as 2 characters (leading zero) when only 1 character entered (for day and month)\n if (inputValue.length === 1) {\n if (+inputValue === 0) {\n input.value = \"01\";\n } else {\n input.value = `0${inputValue}`;\n }\n }\n }\n\n if (input.value) {\n this.setInputValue(input);\n }\n };\n\n // Autocomplete year as current millennium when fewer than 4 characters entered\n private autocompleteYear = () => {\n const inputValue = this.yearInputEl.value;\n const yearNumbers = [\"2\", \"0\", \"0\"];\n\n let autocompletedInput = \"\";\n\n if (inputValue) {\n yearNumbers.forEach((number, index) => {\n if (inputValue.length + index <= 3) {\n autocompletedInput += number;\n }\n });\n\n this.yearInputEl.value = `${autocompletedInput}${inputValue}`;\n }\n };\n\n private convertToDate = (\n year: string,\n month: string,\n day: string\n ): Date | null => {\n if (!isEmptyString(year) && !isEmptyString(month) && !isEmptyString(day)) {\n return new Date(+year, +month - 1, +day);\n } else {\n return null;\n }\n };\n\n private handleHostBlur = () => {\n this.removeLabelledBy = false;\n this.icBlur.emit({ value: this.selectedDate });\n };\n\n private handleHostFocus = () => {\n if (this.el.shadowRoot.activeElement?.id.match(/(day|month|year)-input$/)) {\n this.removeLabelledBy = false;\n } else {\n this.removeLabelledBy = true;\n }\n this.icFocus.emit({ value: this.selectedDate });\n };\n\n private handleFormReset = () => {\n // Get the initial value and populate day, month and year again.\n this.setDate(this.initialValue);\n this.setValidationMessage();\n this.handleDateChange(false);\n };\n\n private getAriaLabel = (input: HTMLInputElement): string => {\n return input.getAttribute(this.ARIA_LABEL);\n };\n\n private notifyScreenReaderArrowKeys = (input: HTMLInputElement) => {\n const liveRegion = this.el.shadowRoot.querySelector(\"#live-region\");\n let announcement = \"\";\n const ariaLabel = this.getAriaLabel(input);\n\n if (liveRegion && input.value) {\n if (\n input === this.monthInputEl &&\n !!IcDateInputMonths[+input.value - 1]\n ) {\n announcement = `${input.value} - ${\n IcDateInputMonths[+input.value - 1]\n }, ${ariaLabel}`;\n }\n\n if (input === this.dayInputEl || input === this.yearInputEl) {\n announcement = `${input.value}, ${ariaLabel}`;\n }\n\n liveRegion.textContent = announcement;\n }\n };\n\n private removeAriaLabelledBy() {\n this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);\n }\n\n private setPastedValueAndValidation(\n isValidDate: boolean,\n pastedValue: string,\n event: ClipboardEvent\n ) {\n switch (true) {\n case isValidDate: {\n const nextParsedValue = this.isZuluTime\n ? extractDateFromZuluDateTime(pastedValue)\n : pastedValue;\n const dateParts = nextParsedValue.split(/-|\\/|\\./);\n this.inputsInOrder.forEach((input, index) => {\n input.classList.add(this.FIT_TO_VALUE);\n\n if (this.isZuluTime) {\n this.pasteZuluDateTime(dateParts, index);\n } else {\n let dateValue;\n\n if (input === this.dayInputEl || input === this.monthInputEl) {\n dateValue = this.slicePastedDate(2, dateParts[index]);\n } else {\n dateValue = this.slicePastedDate(4, dateParts[index]);\n }\n\n input.value = dateValue;\n\n this.setInputValue(input);\n this.autocompleteInput(input);\n }\n });\n this.isZuluTime = false;\n break;\n }\n\n case (pastedValue.length === 1 ||\n pastedValue.length === 2 ||\n pastedValue.length === 4) &&\n isNumeric(pastedValue):\n if (this.checkSingleCopiedValueIsValid(event.target, pastedValue)) {\n // Check if copied value can be pasted into input\n this.setInputPasteValue(event.target, pastedValue);\n this.setInputValue(event.target as HTMLInputElement);\n } else {\n this.displayPastedValidation(event);\n }\n break;\n\n case pastedValue.length === 3 && isNumeric(pastedValue):\n if (event.target !== this.yearInputEl) {\n this.displayPastedValidation(event);\n } else {\n this.setInputPasteValue(event.target, pastedValue);\n this.setInputValue(event.target as HTMLInputElement);\n }\n break;\n\n case pastedValue.length >= 5 && isNumeric(pastedValue):\n this.displayPastedValidation(event);\n }\n }\n\n private pasteZuluDateTime(dateParts: string[], index: number) {\n // ['YYYY', 'MM', 'DD']\n if (index === 0) {\n const dateValue = this.slicePastedDate(4, dateParts[index]);\n this.yearInputEl.value = dateValue;\n this.setInputValue(this.yearInputEl);\n } else if (index === 1) {\n // The month value is the second item in the array\n const dateValue = this.slicePastedDate(2, dateParts[index]);\n this.monthInputEl.value = dateValue;\n this.setInputValue(this.monthInputEl);\n } else {\n const dateValue = this.slicePastedDate(2, dateParts[index]);\n this.dayInputEl.value = dateValue;\n this.setInputValue(this.dayInputEl);\n }\n }\n\n private displayPastedValidation(event: ClipboardEvent) {\n if (this.invalidDateText?.length > 0) {\n this.previousInvalidDateTest = this.invalidDateText;\n }\n\n this.invalidDateText = `Please paste a valid ${this.getAriaLabel(\n event.target as HTMLInputElement\n )}`;\n\n this.validationStatus = IcInformationStatus.Error;\n this.isPasteValidationDisplayed = true;\n }\n\n private setPasteInvalidText() {\n if (this.isPasteValidationDisplayed) {\n this.invalidDateText = this.previousInvalidDateTest ?? \"\";\n this.isPasteValidationDisplayed = false;\n\n // This is to prevent setDate from triggering within componentWillUpdate\n this.isDateSetFromKeyboardEvent = true;\n }\n }\n\n private notifyScreenReader(input: HTMLInputElement, event: Event) {\n const liveRegion = this.el.shadowRoot.querySelector(\"#live-region\");\n\n if (liveRegion) {\n if (this.isKeyboardOrEvent(event)) {\n this.notifyScreenReaderArrowKeys(input);\n } else if (\n Object.prototype.toString.call(event) === this.INPUT_EVENT_OBJECT_STRING\n ) {\n this.notifyScreenReaderInput(input, liveRegion as HTMLElement);\n }\n }\n }\n\n private notifyScreenReaderInput = (\n input: HTMLInputElement,\n liveRegion: HTMLElement\n ) => {\n let announcement = \"\";\n const ariaLabel = this.getAriaLabel(input);\n\n if (input === this.dayInputEl || input === this.monthInputEl) {\n if (input.value.length === 2) {\n if (\n input === this.monthInputEl &&\n !!IcDateInputMonths[+input.value - 1] &&\n this.isValidMonth\n ) {\n announcement = `${input.value} - ${\n IcDateInputMonths[+input.value - 1]\n }, ${ariaLabel}`;\n }\n\n if (input === this.dayInputEl && this.isValidDay) {\n announcement = `${input.value}, ${ariaLabel}`;\n }\n } else {\n announcement = \"\";\n }\n } else {\n if (input.value.length === 4) {\n announcement = `${input.value}, ${ariaLabel}`;\n } else {\n announcement = \"\";\n }\n }\n liveRegion.textContent = announcement;\n };\n\n private setFitToValueStyling = (input: HTMLInputElement) => {\n if (input.value) {\n input.classList.add(this.FIT_TO_VALUE);\n } else {\n input.classList.remove(this.FIT_TO_VALUE);\n }\n };\n\n private setAriaInvalid = (\n validDay: boolean,\n validMonth: boolean,\n validDate: boolean,\n disabledDate: boolean\n ) => {\n if (this.inputsInOrder.length) {\n this.inputsInOrder.forEach((input) => {\n input.removeAttribute(this.ARIA_INVALID);\n });\n\n if (!validDay) {\n this.dayInputEl.setAttribute(this.ARIA_INVALID, \"true\");\n }\n\n if (!validMonth) {\n this.monthInputEl.setAttribute(this.ARIA_INVALID, \"true\");\n }\n\n if (!validDate || disabledDate) {\n this.inputsInOrder.forEach((input) => {\n input.setAttribute(this.ARIA_INVALID, \"true\");\n });\n }\n }\n };\n\n private handleClear = () => {\n this.clearInput = true;\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setInputValue(input, true);\n this.setPreventInput(input, false);\n });\n this.clearInput = false;\n this.isDateSetFromKeyboardEvent = false;\n this.setValidationMessage();\n this.handleDateChange(true);\n\n this.inputsInOrder[0].focus();\n };\n\n private handleCalendarOpen = (ev: MouseEvent) => {\n ev.stopImmediatePropagation();\n this.calendarButtonEl?.shadowRoot\n .querySelector(\"ic-tooltip\")\n .displayTooltip(false);\n this.calendarButtonClicked.emit({ value: this.selectedDate });\n this.calendarButtonEl?.shadowRoot\n .querySelector(\"ic-tooltip\")\n .displayTooltip(false);\n this.isDateSetFromKeyboardEvent = false;\n };\n\n private setValueAndEmitChange = (value: Date) => {\n if (!dateMatches(new Date(this.value), value)) {\n this.emitIcChange(value);\n this.value = value;\n }\n };\n\n private handleCalendarFocus = () => {\n this.calendarFocused = true;\n };\n\n private handleCalendarBlur = () => {\n this.calendarFocused = false;\n };\n\n private handleClearFocus = () => {\n this.removeLabelledBy = true;\n this.clearButtonFocused = true;\n };\n\n private handleClearBlur = (ev: FocusEvent) => {\n this.clearButtonFocused = false;\n if ((ev.relatedTarget as HTMLElement)?.id.match(/(day|year)-input$/)) {\n this.removeLabelledBy = false;\n return;\n }\n\n this.removeLabelledBy = true;\n };\n\n private emitIcChange = (d: Date | null) => {\n this.selectedDate = d;\n if (\n !dateMatches(this.selectedDate, d) ||\n this.day !== null ||\n this.month !== null ||\n this.year !== null\n ) {\n this.icChange.emit({\n value: d,\n dateObject: {\n day: this.day === \"\" ? null : this.day,\n month: this.month === \"\" ? null : this.month,\n year: this.year === \"\" ? null : this.year,\n },\n });\n }\n };\n\n render() {\n const {\n inputId,\n label,\n disabled,\n helperText,\n hideHelperText,\n hideLabel,\n showClearButton,\n showCalendarButton,\n size,\n theme,\n } = this;\n\n const hasCustomValidation = !isEmptyString(this.validationStatus);\n\n const validationStatus = hasCustomValidation\n ? this.validationStatus\n : !isEmptyString(this.invalidDateText)\n ? IcInformationStatus.Error\n : \"\";\n\n const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;\n\n renderHiddenInput(\n true,\n this.el,\n this.name,\n this.convertToDate(this.year, this.month, this.day),\n this.disabled\n );\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [`ic-date-input-disabled`]: disabled,\n }}\n onBlur={this.handleHostBlur}\n onFocus={this.handleHostFocus}\n >\n <ic-input-container disabled={disabled}>\n {!(hideLabel && hideHelperText) && (\n <ic-input-label\n for={inputId}\n label={label}\n hideLabel={hideLabel}\n helperText={!hideHelperText ? helperText : \"\"}\n disabled={disabled}\n ></ic-input-label>\n )}\n <span id={this.screenReaderInfoId} class=\"sr-only\" aria-hidden=\"true\">\n {this.getScreenReaderInfo(validationStatus)}\n {hideLabel && `${label}\\n`}\n {hideHelperText && `${helperText}\\n`}\n {`${this.defaultHelperText}.`}\n </span>\n <span id={this.assistiveHintId} class=\"sr-only\" aria-hidden=\"true\">\n {assistiveHint}\n </span>\n <span id=\"live-region\" aria-live=\"assertive\" class=\"sr-only\"></span>\n <ic-input-component-container\n id={inputId}\n ref={(el: HTMLIcInputComponentContainerElement) =>\n (this.inputCompContainerEl = el)\n }\n disabled={disabled}\n validationStatus={validationStatus}\n size={size}\n role=\"group\"\n class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}\n >\n <div class=\"input-container\">\n <div class=\"date-inputs\">\n {this.getInputsInOrder()[0]}/{this.getInputsInOrder()[1]}/\n {this.getInputsInOrder()[2]}\n </div>\n <div class=\"action-buttons\">\n {showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear input\"\n class={{\n [\"clear-button\"]: true,\n [\"hidden\"]:\n isEmptyString(this.day) &&\n isEmptyString(this.month) &&\n isEmptyString(this.year),\n }}\n disabled={this.disabled}\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearFocus}\n onBlur={this.handleClearBlur}\n variant=\"icon-tertiary\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n size={size}\n ></ic-button>\n )}\n {showCalendarButton && (\n <div class=\"show-calendar-button-wrapper\">\n <div class={{ divider: true, [size]: true }}></div>\n <ic-button\n id=\"calendar-button\"\n ref={(el: HTMLIcButtonElement) =>\n (this.calendarButtonEl = el)\n }\n aria-label=\"Display calendar\"\n aria-haspopup=\"dialog\"\n class=\"calendar-button\"\n disabled={this.disabled}\n innerHTML={Calendar}\n onClick={this.handleCalendarOpen}\n variant=\"icon-tertiary\"\n size={size}\n onFocus={this.handleCalendarFocus}\n onBlur={this.handleCalendarBlur}\n theme={this.calendarFocused ? \"light\" : \"dark\"}\n ></ic-button>\n </div>\n )}\n </div>\n </div>\n </ic-input-component-container>\n <span id={this.selectedDateInfoId} class=\"sr-only\" aria-live=\"polite\">\n <span\n ref={(el) => (this.selectedDateInfoEl = el)}\n role=\"status\"\n ></span>\n </span>\n {(hasCustomValidation || !isEmptyString(this.invalidDateText)) && (\n <ic-input-validation\n status={validationStatus}\n message={\n hasCustomValidation ? this.validationText : this.invalidDateText\n }\n for={inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"ilCAAA,MAAMA,EAAiB,01MACvB,MAAAC,EAAeD,EC2Cf,IAAIE,EAAW,E,MASFC,EAAS,MAPtB,WAAAC,CAAAC,G,0KAQUC,KAAAC,aAAe,eACfD,KAAAE,WAAa,aACbF,KAAAG,iBAAmB,kBAKnBH,KAAAI,oBAAsB,iBACtBJ,KAAAK,aAAe,eAEfL,KAAAM,aAAeN,KAAKO,MAEpBP,KAAAQ,0BAA4B,sBAC5BR,KAAAS,cAAoC,GAEpCT,KAAAU,WAAsB,MACtBV,KAAAW,YAAuB,MACvBX,KAAAY,2BAAsC,MACtCZ,KAAAa,eAA0B,MAE1Bb,KAAAc,WAAsB,KACtBd,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,EAAA,OAAA/F,IAAA,2CAAKgG,MAAM,gCACTD,EAAA,OAAA/F,IAAA,2CAAKgG,MAAO,CAAE4H,QAAS,KAAMpQ,CAACA,GAAO,QACrCuI,EAAA,aAAA/F,IAAA,2CACE+E,GAAG,kBACHkB,IAAM7B,GACH9J,KAAKwP,iBAAmB1F,EAAG,aAEnB,mBAAkB,gBACf,SACd4B,MAAM,kBACNzJ,SAAUjC,KAAKiC,SACfiR,UAAWK,EACXH,QAASpT,KAAKqP,mBACdgE,QAAQ,gBACRnQ,KAAMA,EACN6P,QAAS/S,KAAK4P,oBACdkD,OAAQ9S,KAAK6P,mBACb1M,MAAOnD,KAAKyB,gBAAkB,QAAU,aAOpDgK,EAAA,QAAA/F,IAAA,2CAAM+E,GAAIzK,KAAKiL,mBAAoBS,MAAM,UAAS,YAAW,UAC3DD,EAAA,QAAA/F,IAAA,2CACEiG,IAAM7B,GAAQ9J,KAAKgH,mBAAqB8C,EACxCmJ,KAAK,aAGPP,IAAwBjO,EAAczE,KAAK6H,mBAC3C4D,EAAA,uBAAA/F,IAAA,2CACE8N,OAAQpQ,EACRqQ,QACEf,EAAsB1S,KAAKqD,eAAiBrD,KAAK6H,gBAEnDmL,IAAKtQ,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as i,g as a,c as s}from"./p-00135a74.js";import{i as h,b as l,a as n}from"./p-0f6b9686.js";import{z as c,h as r}from"./p-afde50b8.js";const o=':host{gap:var(--ic-space-xs);padding:var(--ic-space-xs)}:host,.action-area{display:flex;flex-direction:column}.action-area{gap:var(--ic-space-md)}:host ::slotted(svg),:host ::slotted(img){border-radius:var(--ic-space-xxs)}:host(.ic-empty-state-right),:host(.ic-empty-state-right) .action-area{align-items:flex-end;text-align:right}:host(.ic-empty-state-center),:host(.ic-empty-state-center) .action-area{align-items:center;text-align:center}:host(.image-medium) ::slotted(svg),:host(.image-medium) ::slotted(img){height:calc(3 * var(--ic-space-lg)) !important;width:calc(3 * var(--ic-space-lg)) !important}:host(.image-small) ::slotted(svg),:host(.image-small) ::slotted(img){height:var(--ic-space-xxl) !important;width:var(--ic-space-xxl) !important}:host(.image-large) ::slotted(svg),:host(.image-large) ::slotted(img){height:calc(4 * var(--ic-space-xl)) !important;width:calc(4 * var(--ic-space-xl)) !important}::slotted([slot="heading"]),.empty-state-heading{--ic-typography-color:var(--ic-empty-state-title)}::slotted([slot="subheading"]),.empty-state-subheading{--ic-typography-color:var(--ic-empty-state-subtitle)}::slotted([slot="body"]),.empty-state-body{--ic-typography-color:var(--ic-empty-state-body)}';const d=o;const p=class{constructor(t){e(this,t);this.hostMutationObserver=null;this.aligned="left";this.imageSize="medium";this.theme="inherit"}disconnectedCallback(){var e;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentDidLoad(){!h(this.el,"heading")&&l([{prop:this.heading,propName:"heading"}],"Empty State");this.hostMutationObserver=new MutationObserver((e=>n(e,["image","actions"],this)));this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{aligned:e,body:a,maxLines:s,heading:l,imageSize:n,subheading:c,theme:r}=this;return t(i,{key:"d8dbd02105f4b01a468436fd73ccd4ddec2a4cf1",class:{[`ic-empty-state-${e}`]:true,[`image-${n}`]:h(this.el,"image"),[`ic-theme-${r}`]:r!=="inherit"}},h(this.el,"image")&&t("slot",{key:"d7bed2bb22a41377f6c9032660bc62f79294510c",name:"image"}),t("div",{key:"64df9d8fb5ffbb9724a2e87a67eed03526564527"},t("slot",{key:"5fee4dfbeef7272bcd423c7fb2bfc49e5e557718",name:"heading"},t("ic-typography",{key:"523cac0cce5c01cca9540396b95f0ab13d0ef9cd",variant:"h4",class:"empty-state-heading"},l)),t("slot",{key:"904f2c3ceeeef991a099a4fc0521de002c6e8fc3",name:"subheading"},t("ic-typography",{key:"6eb71c04bfae24d0ece644cea3730251ecd38e77",variant:"subtitle-small",class:"empty-state-subheading"},c)),t("slot",{key:"6dc1f5e4e3071b5c0277c993502f1f043b247330",name:"body"},t("ic-typography",{key:"f60da219bd12eda8df1229eba9ae9904458e4692",maxLines:s,class:"empty-state-body"},a))),h(this.el,"actions")&&t("div",{key:"73247068a45635e5e64d513239ada3e97a4a4302",class:"action-area"},t("slot",{key:"19a448208f663a595f5a81a28b89834d0c62e78b",name:"actions"})))}get el(){return a(this)}};p.style=d;const g=":host(){display:block}.pagination-bar{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;gap:var(--ic-space-xl);padding:var(--ic-space-xs) var(--ic-space-md);box-sizing:border-box;--ic-typography-color:var(--ic-pagination-text)}.pagination-bar-left{justify-content:flex-start}.item-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-bar-space-between .item-controls{margin-right:auto}.items-per-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.items-per-page-input{--input-width:5rem;--ic-typography-color:var(--ic-pagination-select-content)}.pagination-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-controls-wrap{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-space-between .pagination-controls{margin-left:auto}.go-to-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.go-to-page-input{--input-width:var(--ic-space-xl)}.go-to-page-button{--min-width:var(--ic-space-xl)}.items-per-page-control-label{white-space:nowrap}@media screen and (max-width: 768px){.pagination-bar{flex-direction:column;align-items:flex-end;height:-moz-fit-content;height:fit-content;gap:var(--ic-space-xs)}.pagination-bar-left{align-items:flex-start}}@media screen and (max-width: 320px){.item-controls,.pagination-controls{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-left .item-controls,.pagination-bar-left .pagination-controls,.pagination-bar-space-between .item-controls,.pagination-bar-space-between .pagination-controls{align-items:flex-start}}";const m=g;const b=class{constructor(t){e(this,t);this.icPageChange=s(this,"icPageChange",7);this.icItemsPerPageChange=s(this,"icItemsPerPageChange",7);this.PAGE_INPUT_FIELD_ID="go-to-page-input";this.INVALID_PAGE_ERROR="Please enter a valid page";this.resizeObserver=null;this.activePage=1;this.inputError="Please enter a valid page";this.itemsPerPage=10;this.itemsPerPageString="10";this.lowerBound=1;this.paginationWrapped=false;this.alignment="right";this.currentPage=1;this.hideAllFromItemsPerPage=false;this.itemLabel="Item";this.monochrome=false;this.theme="inherit";this.type="simple";this.rangeLabelType="page";this.pageLabel="Page";this.showGoToPageControl=false;this.hideRangeLabel=false;this.showItemsPerPageControl=false;this.setToFirstPageOnPaginationChange=false;this.changeItemsPerPage=()=>{this.setItemsPerPage(Number(this.pageDropdownEl.value));this.userSetItemsPerPage=Number(this.pageDropdownEl.value)};this.changePage=e=>{this.activePage=e;this.lowerBound=e!==1?(e-1)*this.itemsPerPage+1:e;this.setUpperBound()};this.focusElFromLabel=e=>{var t;(t=this.paginationBarEl.querySelector(e))===null||t===void 0?void 0:t.setFocus()};this.goToPage=()=>{var e;const t=this.pageInputEl;const i=Number(t.value);if(i<=this.totalPages&&i>0){this.changePage(i);(e=this.paginationEl)===null||e===void 0?void 0:e.setCurrentPage(i);this.activePage=i;t.value="";this.icPageChange.emit({value:i});this.pageInputTooltipEl.displayTooltip(false,false);t.validationStatus=""}else{this.setInputError(t,this.INVALID_PAGE_ERROR)}};this.goToPageLabelClickHandler=()=>{this.focusElFromLabel("ic-text-field")};this.handleBlur=()=>{const e=this.pageInputEl;if(Number(e.value)<=this.totalPages&&Number(e.value)>0||e.value===""){e.validationStatus=""}this.pageInputTooltipEl.displayTooltip(false,false)};this.handleFocus=()=>{if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleInputChange=()=>{const e=parseInt(this.pageInputEl.value);if(e>this.totalPages||e<=0){this.setInputError(this.pageInputEl,this.INVALID_PAGE_ERROR);this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleKeydown=e=>{if(e.key==="Enter"){if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}else{this.goToPage()}}else{this.pageInputTooltipEl.displayTooltip(false,false);this.pageInputEl.validationStatus=""}};this.handleKeyUp=e=>{if(Number.isNaN(parseInt(this.pageInputEl.value))&&e.key!=="Backspace"&&e.key!=="Enter"&&e.key!=="Tab"&&e.key!=="Shift"){this.setInputError(this.pageInputEl,"Please enter a number",false);this.pageInputTooltipEl.displayTooltip(true,false)}};this.itemsPerPageLabelClickHandler=()=>{this.focusElFromLabel("ic-select")};this.paginationShouldWrap=()=>{if(this.type==="simple"){this.paginationWrapped=this.paginationEl.clientHeight>63}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const{clientWidth:e}=this.paginationBarEl;if(e-this.paginationWidth>50||e-this.paginationWidth<-50){this.paginationWidth=e;this.paginationShouldWrap()}}));this.resizeObserver.observe(this.paginationBarEl)};this.setInputError=(e,t,i=true)=>{this.inputError=t;e.validationStatus="error";if(i)e.setFocus()};this.setToFirstPage=()=>{var e;const t=1;this.changePage(t);(e=this.paginationEl)===null||e===void 0?void 0:e.setCurrentPage(t);this.activePage=t;this.icPageChange.emit({value:t})};this.setItemsPerPage=e=>{var t;if(this.itemsPerPage!==e){this.itemsPerPage=e;this.itemsPerPageString=e.toString();this.icItemsPerPageChange.emit({value:this.itemsPerPage});if(this.setToFirstPageOnPaginationChange){this.setToFirstPage()}}this.totalPages=this.totalItems>this.itemsPerPage?Math.ceil(this.totalItems/this.itemsPerPage):1;this.setUpperBound();if(this.activePage>this.totalPages){(t=this.paginationEl)===null||t===void 0?void 0:t.setCurrentPage(this.totalPages);this.activePage=this.totalPages}this.icPageChange.emit({value:this.activePage,fromItemsPerPage:true})};this.setPaginationBarContent=()=>{const e=this.itemsPerPageOptions?JSON.parse(JSON.stringify(this.itemsPerPageOptions)):null;const t=e||(this.totalItems<=100?[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}]:[{label:"25",value:"25"},{label:"100",value:"100"},{label:"1000",value:"1000"}]);!this.hideAllFromItemsPerPage&&t.push({label:"All",value:String(this.totalItems)});this.displayedItemsPerPageOptions=t.filter((({value:e})=>this.totalItems>=Number(e)));let i=0;if(this.userSetItemsPerPage){this.displayedItemsPerPageOptions.some((({value:e})=>{i=Number(e);return this.userSetItemsPerPage<=i}));this.setItemsPerPage(i)}else{const e=this.displayedItemsPerPageOptions.some((({value:e})=>{i=Number(e);return this.itemsPerPage<=i}));this.setItemsPerPage(e||!e&&this.itemsPerPage>i?i:this.itemsPerPage)}};this.setUpperBound=()=>{this.upperBound=Math.min(this.lowerBound+this.itemsPerPage-1,this.totalItems)};this.handleButtonAppearance=()=>{if(this.monochrome){if(this.theme==="dark"||this.theme==="inherit"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches){return"light"}else{return"dark"}}else{return"default"}}}watchPageNumberHandler(){this.setPaginationBarContent();if(typeof this.currentPage==="number"&&this.currentPage){if(this.currentPage<1||this.totalPages&&this.currentPage>this.totalPages){console.error(`The current page (${this.currentPage}) must be a number greater than zero but less than or equal to the total number of pages (${this.totalPages})`)}else{this.activePage=this.currentPage}}}watchSelectedItemsPerPageHandler(){var e;if(this.selectedItemsPerPage!==null&&this.selectedItemsPerPage!==undefined){if((e=this.displayedItemsPerPageOptions)===null||e===void 0?void 0:e.filter((e=>e.value===`${this.selectedItemsPerPage}`)).length){this.setItemsPerPage(this.selectedItemsPerPage)}else{console.error(`The selected items per page option "${this.selectedItemsPerPage}" does not exist`)}}}watchItemLabelHandler(){this.capitalizedItemLabel=c(this.itemLabel);this.lowerCaseItemLabel=this.itemLabel.toLowerCase()}watchItemsPerPageOptionsHandler(e,t){if(JSON.stringify(e)===JSON.stringify(t))return;this.setPaginationBarContent()}watchPageLabelHandler(){this.capitalizedPageLabel=c(this.pageLabel);this.lowerCasePageLabel=this.pageLabel.toLowerCase()}watchTotalItemsHandler(){this.setPaginationBarContent()}watchSetToFirstPageOnPaginationChange(){this.setPaginationBarContent()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){this.watchPageNumberHandler();this.watchPageLabelHandler();this.watchItemLabelHandler();this.setPaginationBarContent();this.watchSelectedItemsPerPageHandler()}componentDidLoad(){var e,t;this.paginationWidth=this.paginationBarEl.clientWidth;r(this.runResizeObserver);const i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(`.${this.PAGE_INPUT_FIELD_ID}`);if(i){const e=(t=i===null||i===void 0?void 0:i.shadowRoot)===null||t===void 0?void 0:t.querySelector("input");if(e){e.style.textAlign="center";e.style.padding="0"}}this.paginationShouldWrap()}pageChangeHandler(e){const t=e.detail.value;this.changePage(t)}render(){const{alignment:e,displayedItemsPerPageOptions:a,PAGE_INPUT_FIELD_ID:s,type:h,rangeLabelType:l,hideRangeLabel:n,showItemsPerPageControl:c,showGoToPageControl:r,pageLabel:o,capitalizedPageLabel:d,lowerCasePageLabel:p,capitalizedItemLabel:g,lowerCaseItemLabel:m,totalPages:b,activePage:f,itemsPerPageString:u,theme:v,monochrome:y}=this;return t(i,{key:"7ef2c2060d9ac4f6c23b188767cda59db38f2b99",class:{[`ic-theme-${v}`]:v!=="inherit"}},t("div",{key:"16a835a43dec46d877d1cedd128f2fce8f09b306",class:{["pagination-bar"]:true,[`pagination-bar-${e}`]:true},ref:e=>this.paginationBarEl=e},(!n||c)&&t("div",{key:"766057b637859197ee116e3b18ffbe4700fb934e",class:"item-controls"},c&&t("div",{key:"9a1eccf626fbe305360bbe62e3c860878f5fd274",class:"items-per-page-holder"},t("ic-typography",{key:"32e16c437bcf438e75cffdee1012265297a1ee96",class:{["items-per-page-control-label"]:true},variant:"label",onClick:this.itemsPerPageLabelClickHandler},g,"s per ",p),t("ic-select",{key:"c7d47154fbe297282c395217c33555023050565b",theme:v,size:"small",label:"items-per-page-input",class:"items-per-page-input",hideLabel:true,options:a,value:u,onIcChange:this.changeItemsPerPage,ref:e=>this.pageDropdownEl=e})),!n&&(l==="data"?t("ic-typography",{class:{["item-pagination-label"]:true},variant:"label","aria-live":"polite"},this.upperBound===0&&`0 ${m}s`,this.upperBound>0&&`${this.lowerBound} - ${this.upperBound} of ${this.totalItems} ${m}${this.totalItems>1?"s":""}`):t("ic-typography",{class:{["page-pagination-label"]:true},variant:"label","aria-live":"polite"},d," ",f," of ",b))),t("div",{key:"3185dc183a80d08c18ce1e60db6c296e52a22970",class:{["pagination-controls"]:true,["pagination-controls-wrap"]:this.paginationWrapped}},t("div",{key:"e3899117392a622f11d0bc474de3bc13870ba8ac",class:"pagination-holder"},t("ic-pagination",{key:"b5c8fa1ecaf911f05557ec38de8b5a46582c0113",type:h,pages:b,label:o,ref:e=>this.paginationEl=e,currentPage:f,theme:v,monochrome:y})),r&&t("div",{key:"4ac7aa8efcccb680d6609ca59e33bd12ce73221c",class:"go-to-page-holder"},t("ic-typography",{key:"9fd371e534f5d8a04e55bf84b5fabd0e9dc2b80e",variant:"label",onClick:this.goToPageLabelClickHandler},"Go to ",p),t("ic-tooltip",{key:"953ce9b43b5f198ecc07df3818f34c119cae4309",label:this.inputError,target:`#${s}`,disableHover:true,disableClick:true,ref:e=>this.pageInputTooltipEl=e},t("ic-text-field",{key:"a51a3b4441f190b3f9ad078ae274b8d1ea7a9779",theme:v,type:"number",size:"small",label:s,class:s,id:s,hideLabel:true,onKeyDown:this.handleKeydown,onKeyUp:this.handleKeyUp,onInput:this.handleInputChange,max:b,min:"1",validationInlineInternal:true,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:e=>this.pageInputEl=e})),t("ic-button",{key:"5c07b04cda0807438eb514d07d33663af6fdf182",appearance:this.handleButtonAppearance(),variant:"secondary",onClick:this.goToPage,size:"small",class:"go-to-page-button"},"Go")))))}get el(){return a(this)}static get watchers(){return{currentPage:["watchPageNumberHandler"],selectedItemsPerPage:["watchSelectedItemsPerPageHandler"],itemLabel:["watchItemLabelHandler"],itemsPerPageOptions:["watchItemsPerPageOptionsHandler"],pageLabel:["watchPageLabelHandler"],totalItems:["watchTotalItemsHandler"],setToFirstPageOnPaginationChange:["watchSetToFirstPageOnPaginationChange"]}}};b.style=m;export{p as ic_empty_state,b as ic_pagination_bar};
2
- //# sourceMappingURL=p-fde3bbb2.entry.js.map
1
+ import{r as e,h as t,H as i,g as a,c as s}from"./p-00135a74.js";import{i as h,b as l,a as n}from"./p-0f6b9686.js";import{A as c,h as r}from"./p-72310da8.js";const o=':host{gap:var(--ic-space-xs);padding:var(--ic-space-xs)}:host,.action-area{display:flex;flex-direction:column}.action-area{gap:var(--ic-space-md)}:host ::slotted(svg),:host ::slotted(img){border-radius:var(--ic-space-xxs)}:host(.ic-empty-state-right),:host(.ic-empty-state-right) .action-area{align-items:flex-end;text-align:right}:host(.ic-empty-state-center),:host(.ic-empty-state-center) .action-area{align-items:center;text-align:center}:host(.image-medium) ::slotted(svg),:host(.image-medium) ::slotted(img){height:calc(3 * var(--ic-space-lg)) !important;width:calc(3 * var(--ic-space-lg)) !important}:host(.image-small) ::slotted(svg),:host(.image-small) ::slotted(img){height:var(--ic-space-xxl) !important;width:var(--ic-space-xxl) !important}:host(.image-large) ::slotted(svg),:host(.image-large) ::slotted(img){height:calc(4 * var(--ic-space-xl)) !important;width:calc(4 * var(--ic-space-xl)) !important}::slotted([slot="heading"]),.empty-state-heading{--ic-typography-color:var(--ic-empty-state-title)}::slotted([slot="subheading"]),.empty-state-subheading{--ic-typography-color:var(--ic-empty-state-subtitle)}::slotted([slot="body"]),.empty-state-body{--ic-typography-color:var(--ic-empty-state-body)}';const d=o;const p=class{constructor(t){e(this,t);this.hostMutationObserver=null;this.aligned="left";this.imageSize="medium";this.theme="inherit"}disconnectedCallback(){var e;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentDidLoad(){!h(this.el,"heading")&&l([{prop:this.heading,propName:"heading"}],"Empty State");this.hostMutationObserver=new MutationObserver((e=>n(e,["image","actions"],this)));this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{aligned:e,body:a,maxLines:s,heading:l,imageSize:n,subheading:c,theme:r}=this;return t(i,{key:"d8dbd02105f4b01a468436fd73ccd4ddec2a4cf1",class:{[`ic-empty-state-${e}`]:true,[`image-${n}`]:h(this.el,"image"),[`ic-theme-${r}`]:r!=="inherit"}},h(this.el,"image")&&t("slot",{key:"d7bed2bb22a41377f6c9032660bc62f79294510c",name:"image"}),t("div",{key:"64df9d8fb5ffbb9724a2e87a67eed03526564527"},t("slot",{key:"5fee4dfbeef7272bcd423c7fb2bfc49e5e557718",name:"heading"},t("ic-typography",{key:"523cac0cce5c01cca9540396b95f0ab13d0ef9cd",variant:"h4",class:"empty-state-heading"},l)),t("slot",{key:"904f2c3ceeeef991a099a4fc0521de002c6e8fc3",name:"subheading"},t("ic-typography",{key:"6eb71c04bfae24d0ece644cea3730251ecd38e77",variant:"subtitle-small",class:"empty-state-subheading"},c)),t("slot",{key:"6dc1f5e4e3071b5c0277c993502f1f043b247330",name:"body"},t("ic-typography",{key:"f60da219bd12eda8df1229eba9ae9904458e4692",maxLines:s,class:"empty-state-body"},a))),h(this.el,"actions")&&t("div",{key:"73247068a45635e5e64d513239ada3e97a4a4302",class:"action-area"},t("slot",{key:"19a448208f663a595f5a81a28b89834d0c62e78b",name:"actions"})))}get el(){return a(this)}};p.style=d;const g=":host(){display:block}.pagination-bar{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;gap:var(--ic-space-xl);padding:var(--ic-space-xs) var(--ic-space-md);box-sizing:border-box;--ic-typography-color:var(--ic-pagination-text)}.pagination-bar-left{justify-content:flex-start}.item-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-bar-space-between .item-controls{margin-right:auto}.items-per-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.items-per-page-input{--input-width:5rem;--ic-typography-color:var(--ic-pagination-select-content)}.pagination-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-controls-wrap{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-space-between .pagination-controls{margin-left:auto}.go-to-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.go-to-page-input{--input-width:var(--ic-space-xl)}.go-to-page-button{--min-width:var(--ic-space-xl)}.items-per-page-control-label{white-space:nowrap}@media screen and (max-width: 768px){.pagination-bar{flex-direction:column;align-items:flex-end;height:-moz-fit-content;height:fit-content;gap:var(--ic-space-xs)}.pagination-bar-left{align-items:flex-start}}@media screen and (max-width: 320px){.item-controls,.pagination-controls{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-left .item-controls,.pagination-bar-left .pagination-controls,.pagination-bar-space-between .item-controls,.pagination-bar-space-between .pagination-controls{align-items:flex-start}}";const m=g;const b=class{constructor(t){e(this,t);this.icPageChange=s(this,"icPageChange",7);this.icItemsPerPageChange=s(this,"icItemsPerPageChange",7);this.PAGE_INPUT_FIELD_ID="go-to-page-input";this.INVALID_PAGE_ERROR="Please enter a valid page";this.resizeObserver=null;this.activePage=1;this.inputError="Please enter a valid page";this.itemsPerPage=10;this.itemsPerPageString="10";this.lowerBound=1;this.paginationWrapped=false;this.alignment="right";this.currentPage=1;this.hideAllFromItemsPerPage=false;this.itemLabel="Item";this.monochrome=false;this.theme="inherit";this.type="simple";this.rangeLabelType="page";this.pageLabel="Page";this.showGoToPageControl=false;this.hideRangeLabel=false;this.showItemsPerPageControl=false;this.setToFirstPageOnPaginationChange=false;this.changeItemsPerPage=()=>{this.setItemsPerPage(Number(this.pageDropdownEl.value));this.userSetItemsPerPage=Number(this.pageDropdownEl.value)};this.changePage=e=>{this.activePage=e;this.lowerBound=e!==1?(e-1)*this.itemsPerPage+1:e;this.setUpperBound()};this.focusElFromLabel=e=>{var t;(t=this.paginationBarEl.querySelector(e))===null||t===void 0?void 0:t.setFocus()};this.goToPage=()=>{var e;const t=this.pageInputEl;const i=Number(t.value);if(i<=this.totalPages&&i>0){this.changePage(i);(e=this.paginationEl)===null||e===void 0?void 0:e.setCurrentPage(i);this.activePage=i;t.value="";this.icPageChange.emit({value:i});this.pageInputTooltipEl.displayTooltip(false,false);t.validationStatus=""}else{this.setInputError(t,this.INVALID_PAGE_ERROR)}};this.goToPageLabelClickHandler=()=>{this.focusElFromLabel("ic-text-field")};this.handleBlur=()=>{const e=this.pageInputEl;if(Number(e.value)<=this.totalPages&&Number(e.value)>0||e.value===""){e.validationStatus=""}this.pageInputTooltipEl.displayTooltip(false,false)};this.handleFocus=()=>{if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleInputChange=()=>{const e=parseInt(this.pageInputEl.value);if(e>this.totalPages||e<=0){this.setInputError(this.pageInputEl,this.INVALID_PAGE_ERROR);this.pageInputTooltipEl.displayTooltip(true,true)}};this.handleKeydown=e=>{if(e.key==="Enter"){if(this.pageInputEl.validationStatus==="error"){this.pageInputTooltipEl.displayTooltip(true,true)}else{this.goToPage()}}else{this.pageInputTooltipEl.displayTooltip(false,false);this.pageInputEl.validationStatus=""}};this.handleKeyUp=e=>{if(Number.isNaN(parseInt(this.pageInputEl.value))&&e.key!=="Backspace"&&e.key!=="Enter"&&e.key!=="Tab"&&e.key!=="Shift"){this.setInputError(this.pageInputEl,"Please enter a number",false);this.pageInputTooltipEl.displayTooltip(true,false)}};this.itemsPerPageLabelClickHandler=()=>{this.focusElFromLabel("ic-select")};this.paginationShouldWrap=()=>{if(this.type==="simple"){this.paginationWrapped=this.paginationEl.clientHeight>63}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const{clientWidth:e}=this.paginationBarEl;if(e-this.paginationWidth>50||e-this.paginationWidth<-50){this.paginationWidth=e;this.paginationShouldWrap()}}));this.resizeObserver.observe(this.paginationBarEl)};this.setInputError=(e,t,i=true)=>{this.inputError=t;e.validationStatus="error";if(i)e.setFocus()};this.setToFirstPage=()=>{var e;const t=1;this.changePage(t);(e=this.paginationEl)===null||e===void 0?void 0:e.setCurrentPage(t);this.activePage=t;this.icPageChange.emit({value:t})};this.setItemsPerPage=e=>{var t;if(this.itemsPerPage!==e){this.itemsPerPage=e;this.itemsPerPageString=e.toString();this.icItemsPerPageChange.emit({value:this.itemsPerPage});if(this.setToFirstPageOnPaginationChange){this.setToFirstPage()}}this.totalPages=this.totalItems>this.itemsPerPage?Math.ceil(this.totalItems/this.itemsPerPage):1;this.setUpperBound();if(this.activePage>this.totalPages){(t=this.paginationEl)===null||t===void 0?void 0:t.setCurrentPage(this.totalPages);this.activePage=this.totalPages}this.icPageChange.emit({value:this.activePage,fromItemsPerPage:true})};this.setPaginationBarContent=()=>{const e=this.itemsPerPageOptions?JSON.parse(JSON.stringify(this.itemsPerPageOptions)):null;const t=e||(this.totalItems<=100?[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}]:[{label:"25",value:"25"},{label:"100",value:"100"},{label:"1000",value:"1000"}]);!this.hideAllFromItemsPerPage&&t.push({label:"All",value:String(this.totalItems)});this.displayedItemsPerPageOptions=t.filter((({value:e})=>this.totalItems>=Number(e)));let i=0;if(this.userSetItemsPerPage){this.displayedItemsPerPageOptions.some((({value:e})=>{i=Number(e);return this.userSetItemsPerPage<=i}));this.setItemsPerPage(i)}else{const e=this.displayedItemsPerPageOptions.some((({value:e})=>{i=Number(e);return this.itemsPerPage<=i}));this.setItemsPerPage(e||!e&&this.itemsPerPage>i?i:this.itemsPerPage)}};this.setUpperBound=()=>{this.upperBound=Math.min(this.lowerBound+this.itemsPerPage-1,this.totalItems)};this.handleButtonAppearance=()=>{if(this.monochrome){if(this.theme==="dark"||this.theme==="inherit"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches){return"light"}else{return"dark"}}else{return"default"}}}watchPageNumberHandler(){this.setPaginationBarContent();if(typeof this.currentPage==="number"&&this.currentPage){if(this.currentPage<1||this.totalPages&&this.currentPage>this.totalPages){console.error(`The current page (${this.currentPage}) must be a number greater than zero but less than or equal to the total number of pages (${this.totalPages})`)}else{this.activePage=this.currentPage}}}watchSelectedItemsPerPageHandler(){var e;if(this.selectedItemsPerPage!==null&&this.selectedItemsPerPage!==undefined){if((e=this.displayedItemsPerPageOptions)===null||e===void 0?void 0:e.filter((e=>e.value===`${this.selectedItemsPerPage}`)).length){this.setItemsPerPage(this.selectedItemsPerPage)}else{console.error(`The selected items per page option "${this.selectedItemsPerPage}" does not exist`)}}}watchItemLabelHandler(){this.capitalizedItemLabel=c(this.itemLabel);this.lowerCaseItemLabel=this.itemLabel.toLowerCase()}watchItemsPerPageOptionsHandler(e,t){if(JSON.stringify(e)===JSON.stringify(t))return;this.setPaginationBarContent()}watchPageLabelHandler(){this.capitalizedPageLabel=c(this.pageLabel);this.lowerCasePageLabel=this.pageLabel.toLowerCase()}watchTotalItemsHandler(){this.setPaginationBarContent()}watchSetToFirstPageOnPaginationChange(){this.setPaginationBarContent()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){this.watchPageNumberHandler();this.watchPageLabelHandler();this.watchItemLabelHandler();this.setPaginationBarContent();this.watchSelectedItemsPerPageHandler()}componentDidLoad(){var e,t;this.paginationWidth=this.paginationBarEl.clientWidth;r(this.runResizeObserver);const i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(`.${this.PAGE_INPUT_FIELD_ID}`);if(i){const e=(t=i===null||i===void 0?void 0:i.shadowRoot)===null||t===void 0?void 0:t.querySelector("input");if(e){e.style.textAlign="center";e.style.padding="0"}}this.paginationShouldWrap()}pageChangeHandler(e){const t=e.detail.value;this.changePage(t)}render(){const{alignment:e,displayedItemsPerPageOptions:a,PAGE_INPUT_FIELD_ID:s,type:h,rangeLabelType:l,hideRangeLabel:n,showItemsPerPageControl:c,showGoToPageControl:r,pageLabel:o,capitalizedPageLabel:d,lowerCasePageLabel:p,capitalizedItemLabel:g,lowerCaseItemLabel:m,totalPages:b,activePage:f,itemsPerPageString:u,theme:v,monochrome:y}=this;return t(i,{key:"7ef2c2060d9ac4f6c23b188767cda59db38f2b99",class:{[`ic-theme-${v}`]:v!=="inherit"}},t("div",{key:"16a835a43dec46d877d1cedd128f2fce8f09b306",class:{["pagination-bar"]:true,[`pagination-bar-${e}`]:true},ref:e=>this.paginationBarEl=e},(!n||c)&&t("div",{key:"766057b637859197ee116e3b18ffbe4700fb934e",class:"item-controls"},c&&t("div",{key:"9a1eccf626fbe305360bbe62e3c860878f5fd274",class:"items-per-page-holder"},t("ic-typography",{key:"32e16c437bcf438e75cffdee1012265297a1ee96",class:{["items-per-page-control-label"]:true},variant:"label",onClick:this.itemsPerPageLabelClickHandler},g,"s per ",p),t("ic-select",{key:"c7d47154fbe297282c395217c33555023050565b",theme:v,size:"small",label:"items-per-page-input",class:"items-per-page-input",hideLabel:true,options:a,value:u,onIcChange:this.changeItemsPerPage,ref:e=>this.pageDropdownEl=e})),!n&&(l==="data"?t("ic-typography",{class:{["item-pagination-label"]:true},variant:"label","aria-live":"polite"},this.upperBound===0&&`0 ${m}s`,this.upperBound>0&&`${this.lowerBound} - ${this.upperBound} of ${this.totalItems} ${m}${this.totalItems>1?"s":""}`):t("ic-typography",{class:{["page-pagination-label"]:true},variant:"label","aria-live":"polite"},d," ",f," of ",b))),t("div",{key:"3185dc183a80d08c18ce1e60db6c296e52a22970",class:{["pagination-controls"]:true,["pagination-controls-wrap"]:this.paginationWrapped}},t("div",{key:"e3899117392a622f11d0bc474de3bc13870ba8ac",class:"pagination-holder"},t("ic-pagination",{key:"b5c8fa1ecaf911f05557ec38de8b5a46582c0113",type:h,pages:b,label:o,ref:e=>this.paginationEl=e,currentPage:f,theme:v,monochrome:y})),r&&t("div",{key:"4ac7aa8efcccb680d6609ca59e33bd12ce73221c",class:"go-to-page-holder"},t("ic-typography",{key:"9fd371e534f5d8a04e55bf84b5fabd0e9dc2b80e",variant:"label",onClick:this.goToPageLabelClickHandler},"Go to ",p),t("ic-tooltip",{key:"953ce9b43b5f198ecc07df3818f34c119cae4309",label:this.inputError,target:`#${s}`,disableHover:true,disableClick:true,ref:e=>this.pageInputTooltipEl=e},t("ic-text-field",{key:"a51a3b4441f190b3f9ad078ae274b8d1ea7a9779",theme:v,type:"number",size:"small",label:s,class:s,id:s,hideLabel:true,onKeyDown:this.handleKeydown,onKeyUp:this.handleKeyUp,onInput:this.handleInputChange,max:b,min:"1",validationInlineInternal:true,onBlur:this.handleBlur,onFocus:this.handleFocus,ref:e=>this.pageInputEl=e})),t("ic-button",{key:"5c07b04cda0807438eb514d07d33663af6fdf182",appearance:this.handleButtonAppearance(),variant:"secondary",onClick:this.goToPage,size:"small",class:"go-to-page-button"},"Go")))))}get el(){return a(this)}static get watchers(){return{currentPage:["watchPageNumberHandler"],selectedItemsPerPage:["watchSelectedItemsPerPageHandler"],itemLabel:["watchItemLabelHandler"],itemsPerPageOptions:["watchItemsPerPageOptionsHandler"],pageLabel:["watchPageLabelHandler"],totalItems:["watchTotalItemsHandler"],setToFirstPageOnPaginationChange:["watchSetToFirstPageOnPaginationChange"]}}};b.style=m;export{p as ic_empty_state,b as ic_pagination_bar};
2
+ //# sourceMappingURL=p-0c97a53d.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as s,g as a,f as o}from"./p-00135a74.js";import{r as n,b as r,N as l,O as c,E as h,A as d,P as u,k as p,w as b,j as f,l as m,n as v,p as g,Q as x,x as y,R as w,C as k,m as z,i as L,F as C}from"./p-0f6b9686.js";const H=`<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>\n</svg>\n`;const $=`<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>\n</svg>`;const T='/*! 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{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-architectural-200);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}';const M=T;const j=class{constructor(s){t(this,s);this.icPageChange=e(this,"icPageChange",7);this.endEllipsis=false;this.endItems=[];this.midItems=[];this.startEllipsis=false;this.startItems=[];this.adjacentPageCount=1;this.boundaryPageCount=1;this.defaultPage=1;this.disabled=false;this.hideCurrentPage=false;this.hideFirstAndLastPageButton=false;this.label="Page";this.monochrome=false;this.theme="inherit";this.type="simple";this.currentPage=this.defaultPage;this.handleClickFirst=()=>{this.currentPage=1;this.icPageChange.emit({value:this.currentPage})};this.handleClickPrevious=()=>{this.currentPage--;this.icPageChange.emit({value:this.currentPage})};this.handleClickNext=()=>{this.currentPage++;this.icPageChange.emit({value:this.currentPage})};this.handleClickLast=()=>{this.currentPage=this.pages;this.icPageChange.emit({value:this.currentPage})};this.firstButton=()=>i("ic-button",{id:"first-page-button","aria-label":"Go to first page",theme:this.theme,onClick:this.handleClickFirst,class:"page-button first-last",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:$});this.previousButton=()=>i("ic-button",{id:"previous-page-button","aria-label":"Go to previous page",theme:this.theme,onClick:this.handleClickPrevious,class:"page-button next-previous flip",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:H});this.nextButton=()=>i("ic-button",{id:"next-page-button","aria-label":"Go to next page",theme:this.theme,onClick:this.handleClickNext,class:"page-button next-previous",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:H});this.lastButton=()=>i("ic-button",{id:"last-page-button","aria-label":"Go to last page",theme:this.theme,onClick:this.handleClickLast,class:"page-button first-last flip",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:$});this.renderStartEllipsis=()=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"start-ellipsis",disabled:this.disabled});this.renderEndEllipsis=()=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"end-ellipsis",disabled:this.disabled});this.renderStartItems=()=>this.startItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderEndItems=()=>this.endItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderMiddleItems=()=>this.midItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})))}watchAdjacentPageCountHandler(){if(this.adjacentPageCount>2){this.adjacentPageCount=2}}watchBoundaryPageCountHandler(){if(this.boundaryPageCount>2){this.boundaryPageCount=2}}watchDisabledHandler(){n(this.disabled,this.el)}watchNumberPagesHandler(){this.watchPageChangeHandler()}watchTypeHandler(){this.watchPageChangeHandler()}watchPageChangeHandler(){if(this.type==="simple"){return}this.startEllipsis=false;this.endEllipsis=false;this.startItems=[];this.endItems=[];this.midItems=[];const t=[];let e=0;const i=[];let s=this.pages;const a=[];let o;let n;let r=false;let l=false;if(this.pages<=this.boundaryPageCount*2+this.adjacentPageCount*2+3){this.startEllipsis=false;this.endEllipsis=false;for(let e=1;e<=this.pages;e++){t.push(e)}this.startItems=t;return}e=this.boundaryPageCount===0?1:this.boundaryPageCount;s=this.boundaryPageCount===0?this.pages:this.pages-this.boundaryPageCount+1;if(this.currentPage<=this.adjacentPageCount+this.boundaryPageCount+2){r=false;l=true;let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}o=e+1;n=o+t}else{r=true;if(this.currentPage>this.pages-(this.adjacentPageCount+this.boundaryPageCount+2)){let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}n=this.boundaryPageCount===0?this.pages-1:this.pages-this.boundaryPageCount;o=n-t}else{l=true;o=this.currentPage-this.adjacentPageCount;n=this.currentPage+this.adjacentPageCount}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&r===false){for(let i=1;i<=e;i++){t.push(i)}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&l===false){for(let t=s;t<=this.pages;t++){i.push(t)}}for(let t=o;t<=n;t++){a.push(t)}this.startEllipsis=r;this.endEllipsis=l;this.startItems=t;this.endItems=i;this.midItems=a}componentWillLoad(){this.watchPageChangeHandler();this.watchBoundaryPageCountHandler();this.watchAdjacentPageCountHandler();n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.pages,propName:"pages"}],"Pagination")}paginationItemClickHandler(t){const e=t.detail.page;this.currentPage=e;this.icPageChange.emit({value:this.currentPage})}async setCurrentPage(t){if(typeof t==="number"&&t>0&&t<=this.pages){this.currentPage=t}else{console.error("Current page must be a number greater than zero but less than or equal to the total number of pages")}}render(){const{type:t,currentPage:e,hideCurrentPage:a,disabled:o,hideFirstAndLastPageButton:n,label:r,theme:l,monochrome:c}=this;return i(s,{key:"d2d60e613bb2c0830b8cb4e234bad974c7a5e617",class:{[`ic-theme-${l}`]:l!=="inherit",["ic-pagination-monochrome"]:!!c}},t==="simple"&&i("nav",{key:"bc523b8c06315458efbf1a8971fa6cf59c43ed11",class:{["disabled"]:!!o},role:"navigation","aria-label":"Pagination Navigation"},n?null:this.firstButton(),this.previousButton(),i("ic-pagination-item",{key:"6e9edfdc7bc5ab49ae37d06837dbc8b9906bd622",theme:this.theme,monochrome:this.monochrome,type:"simple-current",page:e,label:r,class:{["hide-current-page"]:!!a},disabled:o}),this.nextButton(),n?null:this.lastButton()),t==="complex"&&i("nav",{key:"fca0b1e64a1b2eb2ae66fc0049bb514aec75a3a0",class:{["disabled"]:!!o},role:"navigation","aria-label":"Pagination Navigation"},n?null:this.firstButton(),this.previousButton(),this.renderStartItems(),this.startEllipsis&&this.renderStartEllipsis(),this.renderMiddleItems(),this.endEllipsis&&this.renderEndEllipsis(),this.renderEndItems(),this.nextButton(),n?null:this.lastButton()),t==="complex"&&i("span",{key:"06da4ca938338c231dd7004db877bc6b8b5a278f",class:"sr-only","aria-live":"polite"},"Page ",this.currentPage))}get el(){return a(this)}static get watchers(){return{adjacentPageCount:["watchAdjacentPageCountHandler"],boundaryPageCount:["watchBoundaryPageCountHandler"],disabled:["watchDisabledHandler"],pages:["watchNumberPagesHandler"],type:["watchTypeHandler"],currentPage:["watchPageChangeHandler"]}}};j.style=M;const B='/*! 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}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;--ic-typography-color:var(--ic-pagination-ellipsis)}.monochrome .ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{--ic-typography-color:var(--ic-pagination-page-number)}.monochrome .page{--ic-typography-color:var(--ic-pagination-page-number-monochrome)}.simple-current{min-width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-pagination-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed)}.monochrome .item-container.page:hover:not(.selected):not(:focus){background-color:var(--ic-pagination-hover-monochrome)}.monochrome .item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed-monochrome)}.selected{pointer-events:none;outline:none}.selected::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-pagination-selected-banner)}.monochrome .selected::after{background-color:var(--ic-pagination-selected-banner-monochrome)}.page-selected{--ic-typography-color:var(--ic-pagination-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-pressed)}ic-typography.light,ic-typography.page-selected.light{--ic-typography-color:var(--ic-architectural-white)}.selected.light::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-light)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-pressed)}ic-typography.dark{--ic-typography-color:var(--ic-color-text-primary)}.selected.dark::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-dark)}.disabled{--ic-typography-color:var(--ic-architectural-200);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{--ic-typography-color:GrayText}}';const P=B;const I=class{constructor(i){t(this,i);this.paginationItemClick=e(this,"paginationItemClick",7);this.disabled=false;this.label="Page";this.monochrome=false;this.selected=false;this.theme="inherit";this.handleClick=()=>{this.paginationItemClick.emit({page:this.page||null})}}watchDisabledHandler(){n(this.disabled,this.el)}watchLabelHandler(){this.capitalizedLabel=l(this.label)}componentWillLoad(){this.watchLabelHandler();n(this.disabled,this.el)}render(){const{page:t,selected:e,type:s,disabled:a,label:o,capitalizedLabel:n,monochrome:r}=this;return i("a",{key:"5e8aa2f75823a830e87d8f9badde5028284ea387",class:{["monochrome"]:!!r}},s==="ellipsis"?i("div",{class:{["item-container"]:true,["ellipsis"]:true,["disabled"]:!!a}},i("ic-typography",{variant:"label"},"...")):s==="page"?i("button",{disabled:a,onClick:this.handleClick,tabindex:e?"-1":"0",role:"button","aria-current":e&&"page","aria-label":e?`${o}: ${t}`:`Go to ${o} ${t}`,class:{["selected"]:!a&&e,["disabled"]:!!a,["item-container"]:true,["page"]:s==="page"}},i("ic-typography",{variant:"label",class:{["page-selected"]:e,["disabled"]:!!a}},t)):i("ic-typography",{"aria-live":"polite",class:{[`simple-current`]:true,["disabled"]:!!a},variant:"label"},n," ",t))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],label:["watchLabelHandler"]}}};I.style=P;const D=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />\n</svg>\n`;const O=`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.6666 4.27334L11.7266 3.33334L7.99998 7.06001L4.27331 3.33334L3.33331 4.27334L7.05998 8.00001L3.33331 11.7267L4.27331 12.6667L7.99998 8.94001L11.7266 12.6667L12.6666 11.7267L8.93998 8.00001L12.6666 4.27334Z" fill="currentColor" />\n</svg>\n`;const N='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--menu-max-height:100px;--border-color:var(--ic-select-field-border);--border-color-hover:var(--ic-select-field-border-hover);--border-color-pressed:var(--ic-select-field-border-pressed);--border-color-disabled:var(--ic-select-field-border-disabled);--border-color-error:var(--ic-select-field-border-error);--border-color-error-hover:var(--ic-select-field-border-error-hover);--border-color-error-pressed:var(--ic-select-field-border-error-pressed);--border-color-success:var(--ic-select-field-border-success);--border-color-success-hover:var(--ic-select-field-border-success-hover);--border-color-success-pressed:var(--ic-select-field-border-success-pressed);--border-color-warning:var(--ic-select-field-border-warning);--border-color-warning-hover:var(--ic-select-field-border-warning-hover);--border-color-warning-pressed:var(--ic-select-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-select-field-labe);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle\n );--ic-input-validation-status-text-color:var(--ic-select-state-text);--ic-input-validation-error:var(--ic-select-state-icon-error);--ic-input-validation-warning-icon-color:var(--ic-select-state-icon-warning);--ic-input-validation-success-icon-color:var(--ic-select-state-icon-success);--menu-item-text-color:var(--ic-select-list-option-text);--menu-bg-color:var(--ic-select-list-option-background);--menu-border-color:var(--ic-select-dropdown-list-border)}:host(.ic-select-disabled){--ic-input-label-text-color:var(--ic-select-field-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle-disabled\n )}:host(.ic-select-full-width){width:100%}ic-input-component-container.menu-open{--border-color:var(--ic-select-field-border-pressed)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-select-field-background);color:var(--ic-select-content-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:var(--ic-select-mobile-dropdown-icon);caret-color:var(--ic-select-input-field-text-cursor)}select option,.select-option-selected{color:var(--ic-select-list-option-text)}select:disabled{color:var(--ic-select-content-text-disabled);background-image:var(--ic-select-mobile-dropdown-icon-disabled)}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none;background-color:var(--ic-select-field-background);color:var(--ic-select-content-text)}.select-input:focus{outline:none}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xxs);color:var(--ic-select-expand-icon-color)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.ic-select-disabled) .expand-icon,:host(.ic-select-disabled) .expand-icon>svg>path{color:var(--ic-select-disabled-expand-icon-color)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs)}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-select-expand-icon-color)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.ic-select-disabled) .value-text,:host(.ic-select-disabled) .select-input,.placeholder{color:var(--ic-select-content-placeholder-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;align-items:center}.divider{width:var(--ic-space-1px);background-color:var(--ic-select-content-divider);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.ic-select-small) .divider{height:var(--ic-space-md)}:host(.ic-select-large) .divider{height:var(--ic-space-xl)}.clear-button{color:var(--ic-select-clear-button);position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus,.clear-button:active{background-color:var(--ic-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);border-radius:0.25rem}.clear-button:focus,.clear-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.clear-button.searchable{position:static}.searchable-select-results-status,.multi-select-selected-count{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}::slotted([slot="icon"]){fill:var(--ic-select-content-placeholder-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-select-content-text)}.readonly ::slotted([slot="icon"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const q=N;let F=0;const S=[...y,"tabindex","title"];const E=class{constructor(i){t(this,i);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icClear=e(this,"icClear",7);this.icClose=e(this,"icClose",7);this.icFocus=e(this,"icFocus",7);this.icInput=e(this,"icInput",7);this.icOpen=e(this,"icOpen",7);this.icOptionSelect=e(this,"icOptionSelect",7);this.icOptionDeselect=e(this,"icOptionDeselect",7);this.icRetryLoad=e(this,"icRetryLoad",7);this.hasSetDefaultValue=false;this.inheritedAttributes={};this.initialOptionsEmpty=false;this.inputId=`ic-select-input-${F++}`;this.menuId=`${this.inputId}-menu`;this.searchableMenuItemSelected=false;this.ungroupedOptions=[];this.hostMutationObserver=null;this.clearButtonFocused=false;this.noOptions=null;this.open=false;this.pressedCharacters="";this.searchableSelectInputValue=null;this.disabled=false;this.disableAutoFiltering=false;this.emptyOptionListText="No results found";this.fullWidth=false;this.helperText="";this.hideLabel=false;this.includeDescriptionsInSearch=false;this.includeGroupTitlesInSearch=false;this.loadingErrorLabel="Loading Error";this.loadingLabel="Loading...";this.multiple=false;this.name=this.inputId;this.placeholder="Select an option";this.readonly=false;this.required=false;this.searchable=false;this.searchMatchPosition="anywhere";this.selectOnEnter=false;this.showClearButton=false;this.size="medium";this.theme="inherit";this.validationStatus="";this.validationText="";this.loading=false;this.options=[];this.filteredOptions=this.options;this.uniqueOptions=this.options;this.debounce=0;this.currDebounce=this.debounce;this.initialValue=this.value;this.inputValueToFilter=this.value;this.hostMutationCallback=t=>{let e=false;t.forEach((({attributeName:t,type:i,addedNodes:s,removedNodes:a})=>{if(t){const i=this.el.getAttribute(t);if(i&&S.includes(t)){this.inheritedAttributes[t]=i;e=true}}else if(i==="childList"){e=c(s,a,"icon")}}));if(e){o(this)}};this.handleRetry=t=>{var e;if(t.detail.keyPressed)(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();this.blurredBecauseButtonPressed=true;this.retryButtonClick=true;this.hasSetDefaultValue=true;this.icRetryLoad.emit({value:this.searchable?this.searchableSelectInputValue:this.hiddenInputValue})};this.emitIcChange=t=>{if(this.multiple&&!Array.isArray(t)&&t!==null){this.handleMultipleSelectChange(String(t))}else{this.value=t}const e=this.multiple?this.value:t;this.icChange.emit({value:e||null})};this.emitIcInput=t=>{clearTimeout(this.debounceIcInput);this.debounceIcInput=window.setTimeout((()=>this.icInput.emit({value:t})),this.currDebounce)};this.deduplicateOptions=t=>{const e=[];const i=[];let s;t.forEach((t=>{if(t.children){s=[];t.children.forEach((t=>{if(e.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{e.push(t.value);s.push(t)}}));const a=Object.assign(Object.assign({},t),{children:s});i.push(a)}else{if(e.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{e.push(t.value);i.push(t)}}}));return i};this.setOptionsValuesFromLabels=()=>{if(this.options.length>0){this.options.map((t=>{if(!t.value){t.value=t.label}}))}};this.setUngroupedOptions=t=>{this.ungroupedOptions=t.detail.options};this.setTextColor=()=>{if(this.nativeSelectElement){if(this.nativeSelectElement.selectedIndex===0){this.nativeSelectElement.className="placeholder"}else{this.nativeSelectElement.className="select-option-selected"}}};this.setMenuChange=t=>{if(this.open!==t){this.open=t}};this.getLabelFromValue=t=>h(t,this.uniqueOptions);this.getMultipleOptionsString=t=>{const e=t===null||t===void 0?void 0:t.map((t=>this.getLabelFromValue(t))).filter((t=>!!t));return e===null||e===void 0?void 0:e.join(", ")};this.getFilteredChildMenuOptions=t=>{let e=t.children;if(t.children){if(this.searchable){e=d(t.children,!!this.includeDescriptionsInSearch,this.searchableSelectInputValue||"",this.searchMatchPosition)}else{e=d(t.children,false,this.pressedCharacters,"start")}}const i=Object.assign({},t);i.children=e;return i};this.getValueSortedByOptions=t=>{const e=t;const i=this.ungroupedOptions.map((t=>t.value));e.sort(((t,e)=>i.indexOf(t)-i.indexOf(e)));return e};this.handleNativeSelectChange=()=>{if(this.nativeSelectElement){this.icOptionSelect.emit({value:this.nativeSelectElement.value});this.emitIcChange(this.nativeSelectElement.value)}this.setTextColor()};this.handleCustomSelectChange=t=>{var e,i;const s=t.detail.value;if(t.detail.label===this.emptyOptionListText){(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();return}if(this.searchable){this.value=s;this.searchableMenuItemSelected=true;if(this.value===this.currValue){this.searchableSelectInputValue=this.getLabelFromValue(this.value)||null}this.inputValueToFilter=null;this.hiddenInputValue=this.getValueFromLabel(this.searchableSelectInputValue)||null}if(this.multiple&&((i=this.value)===null||i===void 0?void 0:i.includes(s))){this.icOptionDeselect.emit({value:s})}else{this.icOptionSelect.emit({value:s})}this.ariaActiveDescendant=t.detail.optionId;this.emitIcChange(s)};this.handleMultipleSelectChange=t=>{if(this.value){let e=this.value.slice();if(this.value.includes(t)){const i=e.indexOf(t);e.splice(i,1)}else{e.push(t);e=this.getValueSortedByOptions(e)}this.value=e.length===0?null:e}else{const e=[];e.push(t);this.value=e}};this.handleSelectAllChange=t=>{const e=t.detail.select;const i=this.ungroupedOptions.filter((t=>!t.disabled));const s=i.map((t=>t.value));let a;if(e){let t;if(this.value){t=s.filter((t=>this.value&&!this.value.includes(t)))}else{t=s}t.forEach((t=>this.icOptionSelect.emit({value:t})));a=s}else{this.value.forEach((t=>this.icOptionDeselect.emit({value:t})));a=null}this.emitIcChange(a)};this.handleMenuChange=t=>{this.open=t.detail.open;this.pressedCharacters="";this.searchable&&this.handleFocusIndicatorDisplay()};this.handleMenuKeyPress=t=>{t.cancelBubble=true;if(!this.multiple){this.handleCharacterKeyDown(t.detail.key)}};this.handleFocusIndicatorDisplay=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".focus-indicator");if(e){if(this.open){e.classList.add("focus-indicator-enabled")}else{e.classList.remove("focus-indicator-enabled")}}};this.handleMouseDown=t=>{if(!this.open){t.preventDefault()}};this.isExternalFiltering=()=>this.searchable&&!!this.disableAutoFiltering;this.handleClick=t=>{var e,i;if(!this.open&&this.menu){if(this.isExternalFiltering()){this.menu.options=this.filteredOptions}else if(!this.hasTimedOut&&!this.loading&&!((e=this.noOptions)===null||e===void 0?void 0:e.length)&&(!this.searchable||this.searchableMenuItemSelected)){this.noOptions=null;this.menu.options=this.uniqueOptions}}if(t.detail!==0){(i=this.menu)===null||i===void 0?void 0:i.handleClickOpen()}};this.handleExpandIconMouseDown=t=>{var e;if(!this.disabled){t.preventDefault();(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();this.handleClick(t)}};this.handleClear=t=>{var e,i;t.stopPropagation();this.hasTimedOut=false;clearTimeout(this.timeoutTimer);this.clearInput();this.emitIcChange(null);this.icClear.emit();if(this.searchable){this.hiddenInputValue=null;(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus()}else{(i=this.customSelectElement)===null||i===void 0?void 0:i.focus()}};this.handleCharacterKeyDown=t=>{if(this.open&&t===" "&&this.pressedCharacters.length===0&&!this.hasTimedOut&&!this.loading){this.setMenuChange(false)}if(t.length===1&&!this.searchable){window.clearTimeout(this.characterKeyPressTimer);this.characterKeyPressTimer=window.setTimeout((()=>this.pressedCharacters=""),1e3);if(!(t===" "&&!this.pressedCharacters)){this.pressedCharacters+=t;this.handleFilter();if(!this.noOptions){this.emitIcChange(this.filteredOptions[0].value)}}}else{this.pressedCharacters=""}};this.handleNativeSelectKeyDown=t=>{if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}this.handleCharacterKeyDown(t.key)};this.handleKeyDown=t=>{var e;if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}const i=t.key==="ArrowDown"||t.key==="ArrowUp";if(this.menu&&!this.open){if(this.isExternalFiltering()&&(t.key==="Enter"||i)){this.menu.options=this.filteredOptions}else{if(!this.hasTimedOut){this.noOptions=null;this.menu.options=this.uniqueOptions}}}if(this.open&&t.key==="Enter"){this.setMenuChange(false)}else{if(!(i&&this.noOptions!==null)){if(!(t.key===" "&&this.pressedCharacters.length>0)){(e=this.menu)===null||e===void 0?void 0:e.handleKeyboardOpen(t)}if(!this.multiple){this.handleCharacterKeyDown(t.key)}}}};this.handleClearButtonFocus=()=>{this.clearButtonFocused=true};this.handleClearButtonBlur=t=>{var e;const i=(e=this.menu)===null||e===void 0?void 0:e.querySelector("#retry-button");if(!(this.searchableSelectElement&&t.relatedTarget===this.searchableSelectElement)&&!(i&&t.relatedTarget===i)){this.setMenuChange(false);this.handleFocusIndicatorDisplay()}this.clearButtonFocused=false};this.handleFilter=()=>{var t;const e=this.deduplicateOptions(this.searchable?[...this.uniqueOptions]:this.ungroupedOptions);let i=false;let s=[];e.map((t=>{if(t.children)i=true}));let a;if(this.searchable){a=d(e,!!this.includeDescriptionsInSearch,this.inputValueToFilter||"",this.searchMatchPosition);this.searchableMenuItemSelected=false}else{a=d(e,false,this.pressedCharacters,"start")}if(!i&&((t=a[0])===null||t===void 0?void 0:t.label)!==this.emptyOptionListText){s=a}else if(i){e.map((t=>{if(this.includeGroupTitlesInSearch){if(a.indexOf(t)!==-1){s.push(t)}else{s.push(this.getFilteredChildMenuOptions(t))}}else{s.push(this.getFilteredChildMenuOptions(t))}}))}let o=false;if(i){o=true;s.map((t=>{if(t.children&&t.children.length>0){o=false}}))}if(s.length>0&&!o){this.noOptions=null;this.filteredOptions=s}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.filteredOptions=this.noOptions}};this.triggerLoading=()=>{this.hasTimedOut=false;this.noOptions=[{label:this.loadingLabel,value:"",loading:true}];if(this.filteredOptions!==this.noOptions&&this.searchable){this.filteredOptions=this.noOptions}else if(this.uniqueOptions!==this.noOptions&&!this.searchable){this.uniqueOptions=this.noOptions}if(this.timeout){this.timeoutTimer=window.setTimeout((()=>{this.loading=false;this.hasTimedOut=true;this.noOptions=[{label:this.loadingErrorLabel,value:"",timedOut:true}];this.filteredOptions=this.noOptions;if(!this.searchable)this.uniqueOptions=this.noOptions}),this.timeout)}};this.getValueFromLabel=t=>{var e;return t&&((e=this.uniqueOptions.find((e=>e.label===t)))===null||e===void 0?void 0:e.value)};this.handleSearchableSelectInput=t=>{this.searchableSelectInputValue=t.target.value;this.emitIcInput(this.searchableSelectInputValue);if(this.value!=null){this.emitIcChange(null)}this.hiddenInputValue=null;this.inputValueToFilter=this.searchableSelectInputValue;this.setMenuChange(true);if(!this.disableAutoFiltering){this.handleFilter();this.debounceAriaLiveUpdate()}};this.updateSearchableSelectResultAriaLive=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".searchable-select-results-status");if(e){if(this.noOptions!==null){e.innerText=this.emptyOptionListText}else{e.innerText=""}}};this.updateMultiSelectedCountAriaLive=()=>{var t,e;const i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".multi-select-selected-count");const s=`${(e=this.currValue)===null||e===void 0?void 0:e.length} of ${u(this.options)} selected`;if(i&&i.innerText!==s){i.innerText=s}};this.getDefaultValue=t=>this.getLabelFromValue(t)||null;this.setDefaultValue=()=>{if(!this.hasSetDefaultValue&&this.currValue){this.searchableSelectInputValue=this.searchable?this.getDefaultValue(this.currValue):null;this.initialValue=this.currValue;this.hasSetDefaultValue=true}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=({relatedTarget:t})=>{var e;const i=t;if(i!==null&&(i.tagName==="UL"&&i.className.includes("menu")||i.tagName==="LI"&&i.className.includes("option"))){return}const s=(e=this.menu)===null||e===void 0?void 0:e.querySelector("#retry-button");const a=this.searchable&&!!this.menu&&i!==this.menu&&!Array.from(this.menu.querySelectorAll("[role='option']")).includes(i)&&!(this.clearButton&&i===this.clearButton)&&!(s&&i===s);if(a){if(!this.retryButtonClick){this.setMenuChange(false);if(!this.value){this.clearInput()}}this.handleFocusIndicatorDisplay()}this.retryButtonClick=false;this.icBlur.emit()};this.onTimeoutBlur=t=>{if(t.detail.ev.relatedTarget!==this.searchableSelectElement&&!this.blurredBecauseButtonPressed){this.setMenuChange(false);this.handleFocusIndicatorDisplay();this.icBlur.emit()}this.blurredBecauseButtonPressed=false};this.handleFormReset=()=>{this.value=this.initialValue;if(this.searchable){this.searchableSelectInputValue=this.getDefaultValue(this.value);this.hiddenInputValue=this.value}};this.clearInput=()=>{var t;this.noOptions=null;if(this.searchable){(t=this.searchableSelectElement)===null||t===void 0?void 0:t.setAttribute("value","");this.searchableSelectInputValue=null;this.filteredOptions=this.uniqueOptions}}}watchDisabledHandler(){n(this.disabled,this.el)}loadingHandler(t){t&&this.triggerLoading()}watchOptionsHandler(){if(!this.hasTimedOut&&this.options!==this.noOptions){this.loading=false;clearTimeout(this.timeoutTimer);if(this.isExternalFiltering()){if(this.options.length>0){this.setOptionsValuesFromLabels();this.noOptions=null;this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}this.updateSearchableSelectResultAriaLive();this.setDefaultValue()}else{this.setOptionsValuesFromLabels();this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions;if(this.initialOptionsEmpty){this.setDefaultValue();this.initialOptionsEmpty=false}}}else{if(!this.searchable){this.options=this.noOptions||[]}}}debounceChangedHandler(t){this.updateOnChangeDebounce(t)}valueChangedHandler(){if(this.value!==this.currValue){if(this.value&&this.multiple){this.currValue=this.getMultipleOptionsString(this.value)?this.getValueSortedByOptions(this.value):null;this.updateMultiSelectedCountAriaLive()}else{this.currValue=this.getLabelFromValue(this.value)?this.value:null}}if(this.searchable&&this.value){this.searchableSelectInputValue=this.getLabelFromValue(String(this.currValue))||null}}openChangedHandler(){this.open?this.icOpen.emit():this.icClose.emit()}disconnectedCallback(){var t;p(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){const t=this.multiple?this.getMultipleOptionsString(this.value):this.getLabelFromValue(this.value);this.currValue=t?this.value:null;this.inheritedAttributes=b(this.el,S);n(this.disabled,this.el);this.setOptionsValuesFromLabels();f(this.el,this.handleFormReset);if(!this.options.length){this.initialOptionsEmpty=true;this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}else{this.setDefaultValue();this.uniqueOptions=this.deduplicateOptions(this.options)}}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Select");if(this.loading){this.triggerLoading()}if(this.searchable){this.hiddenInputValue=this.currValue}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}componentDidRender(){if(this.nativeSelectElement&&!this.disabled){this.setTextColor()}}async setFocus(){if(this.nativeSelectElement){this.nativeSelectElement.focus()}else if(this.customSelectElement){this.customSelectElement.focus()}else if(this.searchableSelectElement){this.searchableSelectElement.focus()}}updateOnChangeDebounce(t){if(this.currDebounce!==t){this.currDebounce=t}}debounceAriaLiveUpdate(){clearTimeout(this.debounceAria);window.setTimeout((()=>{this.updateSearchableSelectResultAriaLive()}),800)}render(){const{size:t,disabled:e,fullWidth:a,helperText:o,hideLabel:n,label:r,menuId:l,multiple:c,name:h,options:d,placeholder:p,readonly:b,required:f,searchable:y,showClearButton:k,validationStatus:z,validationText:L,currValue:C,theme:H}=this;m(true,this.el,h||this.inputId,this.searchable?this.hiddenInputValue:C,e);const $=`${z===w.Error}`;const T=v(this.inputId,o!=="",g(this.validationStatus,!!this.disabled)).trim();let M=!!this.el.querySelector(`[slot="icon"]`);if(M&&(e||b&&!this.value)){M=false}const j=`${C===null||C===void 0?void 0:C.length} of ${u(this.options)} selected`;const B=c?this.getMultipleOptionsString(C):this.getLabelFromValue(C);const P=!e&&(y?this.searchableSelectInputValue:C&&k);return i(s,{key:"b648c4ce0e6857a7d3cb8ee576227a76502238c2",class:{"ic-select-disabled":!!e,"ic-select-searchable":!!y,[`ic-select-${t}`]:t!=="medium","ic-select-full-width":!!a,[`ic-theme-${H}`]:H!=="inherit"},onBlur:this.onBlur},i("ic-input-container",{key:"2297242b13d87560ea0b3cdcd3dcef6d0fc82d8a",readonly:b},!n&&i("ic-input-label",{key:"65dc301bdd942344c0926f902add9da46dea58b9",for:this.inputId,label:r,helperText:o,required:f,disabled:e,readonly:b}),i("ic-input-component-container",{key:"b05b9bea3da1eec103e0a192f71123b5c4ecab4e",ref:t=>this.anchorEl=t,class:{"menu-open":this.open},size:t,fullWidth:a,disabled:e,readonly:b,validationStatus:z},M&&i("span",{key:"a5c509b3c5ae8d0b4e7aadcbbe1dd24a1a35e6d2",slot:"left-icon",class:{["readonly"]:!!b,["has-value"]:!!this.value}},i("slot",{key:"0fb4fdcb39c9d5d8bd7b53011132d30060ea4f69",name:"icon"})),b?i("ic-typography",null,i("p",null,B)):x()&&!c?i("select",Object.assign({ref:t=>this.nativeSelectElement=t,disabled:e,onChange:this.handleNativeSelectChange,required:f,id:this.inputId,"aria-label":r,"aria-describedby":T,"aria-invalid":$,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.handleNativeSelectKeyDown,form:this.form},this.inheritedAttributes),i("option",{value:"",selected:true,disabled:!k},p),d.map((t=>{if(t.children){return i("optgroup",{label:t.label},t.children.map((t=>i("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label))))}else{return i("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label)}}))):y?i("div",{class:"searchable-select-container"},i("input",{class:{"select-input":true,"with-clear-button":!!this.searchableSelectInputValue},role:"combobox",autocomplete:"off","aria-label":r,"aria-describedby":T,"aria-activedescendant":this.ariaActiveDescendant,"aria-autocomplete":"list","aria-expanded":`${this.open}`,"aria-invalid":$,"aria-required":`${f}`,"aria-controls":l,ref:t=>this.searchableSelectElement=t,id:this.inputId,value:this.searchableSelectInputValue||undefined,placeholder:p,disabled:e,onInput:this.handleSearchableSelectInput,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,form:this.form}),P&&i("div",{class:"clear-button-container"},i("ic-button",{id:"clear-button",ref:t=>this.clearButton=t,"aria-label":this.searchableSelectInputValue&&C===null?"Clear input":"Clear selection",class:"clear-button",innerHTML:O,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}),i("div",{class:"divider"})),i("span",{onMouseDown:this.handleExpandIconMouseDown,class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:D,"aria-hidden":"true"}),i("div",{"aria-live":"polite",role:"status",class:"searchable-select-results-status"})):i("div",{class:"select-container"},i("button",{class:"select-input",ref:t=>this.customSelectElement=t,id:this.inputId,"aria-label":`${r}, ${(c&&C?`${j}, ${B}`:B)||p}${f?", required":""}`,"aria-describedby":T,"aria-invalid":$,"aria-haspopup":"listbox","aria-expanded":this.open?"true":"false","aria-owns":l,"aria-controls":l,disabled:e,onBlur:this.onBlur,onFocus:this.onFocus,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown},i("ic-typography",{variant:"body",class:{"value-text":true,"with-clear-button":!!P,placeholder:c?!this.value||this.value.length<1:!this.getLabelFromValue(C)}},B||p),i("div",{class:"select-input-end"},P&&i("div",{class:"divider"}),i("span",{class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:D,"aria-hidden":"true"}))),P&&i("ic-button",{id:"clear-button","aria-label":"Clear selection",class:"clear-button",innerHTML:O,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}))),(!x()||c)&&i("ic-menu",{key:"b44ead58c89e05ff0bfcdeda827b4b436dd05f1c",class:{"no-results":this.loading||this.hasTimedOut||this.noOptions!==null&&this.noOptions[0]&&this.noOptions[0].label===this.emptyOptionListText},ref:t=>this.menu=t,inputEl:y?this.searchableSelectElement:this.customSelectElement,inputLabel:r,anchorEl:this.anchorEl,size:t,menuId:l,open:this.open,options:y?this.filteredOptions:this.uniqueOptions,value:c?C:C,fullWidth:a,selectOnEnter:this.selectOnEnter,onMenuStateChange:this.handleMenuChange,onMenuOptionSelect:this.handleCustomSelectChange,onMenuOptionSelectAll:this.handleSelectAllChange,onMenuKeyPress:this.handleMenuKeyPress,onUngroupedOptionsSet:this.setUngroupedOptions,onRetryButtonClicked:this.handleRetry,parentEl:this.el,onTimeoutBlur:this.onTimeoutBlur,activationType:this.searchable||c||this.selectOnEnter?"manual":"automatic",closeOnSelect:!c}),this.multiple&&i("div",{key:"178feb2274a4942b173858f35b98f2e64031d419","aria-live":"polite",role:"status",class:"multi-select-selected-count"}),g(this.validationStatus,!!this.disabled)&&i("ic-input-validation",{key:"65c7647103b74749c240af0cfdee7c5e2afdeca0",class:{"menu-open":this.open},ariaLiveMode:"polite",status:z,message:L||"",for:this.inputId})))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],loading:["loadingHandler"],options:["watchOptionsHandler"],debounce:["debounceChangedHandler"],value:["valueChangedHandler"],open:["openChangedHandler"]}}};E.style=q;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;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const A=W;let V=0;const G=[...y,"title"];const K=class{constructor(i){t(this,i);this.getValidationText=e(this,"getValidationText",7);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icFocus=e(this,"icFocus",7);this.icInput=e(this,"icInput",7);this.icKeydown=e(this,"icKeydown",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.ariaAutocomplete=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${V++}`;this.inputmode="text";this.maxCharacters=0;this.minCharacters=0;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value;this.checkChildHydration=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-typography");if(this.hideLabel||e&&e.classList.contains("hydrated")){this.setFocus();clearInterval(this.interval)}};this.getNumberOfCharacters=t=>t!==null&&t!==undefined?t.length:0;this.getMaxValueExceeded=t=>{this.numChars=this.getNumberOfCharacters(t);if(this.type==="number"){this.minValueUnattained=!!t&&Number(t)<Number(this.min);this.maxValueExceeded=Number(t)>Number(this.max)}};this.getMaxCharactersReached=t=>{this.numChars=this.getNumberOfCharacters(t);this.maxCharactersReached=this.maxCharacters>0?this.numChars>=this.maxCharacters:false;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=t=>{this.value=t.target.value;this.icInput.emit({value:this.value})};this.onBlur=t=>{const e=t.target;e.removeEventListener("wheel",this.onWheel);const i=t.target.value;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0?this.numChars<this.minCharacters:false;this.icBlur.emit({value:i})};this.onFocus=t=>{const e=t.target;e.addEventListener("wheel",this.onWheel);this.icFocus.emit({value:t.target.value})};this.onWheel=t=>{const e=t.target;if(e.type==="number"){e.blur();setTimeout((()=>{e.focus()}),0)}};this.hasStatus=t=>t!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=t=>{let e=false;t.forEach((({attributeName:t,type:i,addedNodes:s,removedNodes:a})=>{if(t&&G.includes(t)){const i=this.el.getAttribute(t);if(i){this.inheritedAttributes[t]=i}e=true}else if(i==="childList"){e=c(s,a,"icon")}}));if(e){o(this)}}}watchDisabledHandler(){n(this.disabled,this.el)}debounceChanged(){this.icChange=k(this.icChange,this.debounce)}watchValueHandler(t){let e;if(this.maxCharacters>0){e=t.substring(0,this.maxCharacters);this.value=e}else{e=t}if(this.inputEl&&this.inputEl.value!==e){this.inputEl.value=e}this.getMaxValueExceeded(e);this.getMaxCharactersReached(e);this.icChange.emit({value:e})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var t;p(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=b(this.el,G);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}f(this.el,this.handleFormReset);n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(t){this.icKeydown.emit({event:t});this.maxCharactersWarning=this.maxCharactersReached}async setFocus(){var t;(t=this.inputEl)===null||t===void 0?void 0:t.focus()}render(){const{inputId:t,name:e,label:a,required:o,size:n,placeholder:r,helperText:l,hideCharCount:c,rows:h,resize:d,disabled:u,value:p,min:b,max:f,numChars:g,readonly:x,maxCharacters:y,maxCharactersWarning:k,maxCharactersReached:H,minCharacters:$,minCharactersUnattained:T,minValueUnattained:M,maxValueExceeded:j,validationStatus:B,validationText:P,validationInline:I,validationInlineInternal:D,spellcheck:O,inputmode:N,fullWidth:q,truncateValue:F,hiddenInput:S,theme:E}=this;const W=this.el;const A=x||u;const V=j||M||T||k?k?w.Warning:w.Error:B;const G=k?`Maximum input is ${y} characters`:j?`Maximum value of ${f} exceeded`:M?`Minimum value of ${b} not met`:T?`Minimum input is ${$} characters`:P;const K=x?0:y;const U=k||j||M||V===w.Error?"assertive":"polite";const _=this.hasStatus(V)&&!(V==w.Success&&I)&&!D;const R=h>1;const Z=K-g;const Q=`${Z} character${Z===1?"":"s"} remaining.`;const X=y>0?`${t}-char-count-desc`:"";const J=`${X} ${v(t,l!=="",_)}`.trim();const Y=A&&!x;const tt=!!this.el.querySelector(`[slot="icon"]`)&&!Y;const et=`${V===w.Error}`;S?m(true,this.el,e,p,A):z(this.el);return i(s,{key:"9175054afc7f5ab0f44c2c02d73a209676690f26",class:{"ic-text-field-full-width":!!q,[`ic-theme-${E}`]:E!=="inherit","ic-text-field-disabled":!!A}},i("ic-input-container",{key:"2cf32636f95f8ec80f25424483fcdf2afe262534",readonly:x,disabled:A},!this.hideLabel&&i("ic-input-label",{key:"3ee4d01a7e1705d1bdd1e88dc734a16f990c35c9",for:t,label:a,helperText:l,required:o,disabled:Y,readonly:x}),i("ic-input-component-container",{key:"d6300116fc334d565681cedb6c2e4b637dd8fe5f",size:n,validationStatus:V,multiLine:R,disabled:A,readonly:x,validationInline:I,fullWidth:q},tt&&i("span",{key:"2dae55d8265539a3c1b1975ebb63015fb2b66ceb",class:{readonly:!!x,"has-value":this.getNumberOfCharacters(p)>0},slot:"left-icon"},i("slot",{key:"c363bc9c876a3be7db91dd1afd8eac8013f176a2",name:"icon"})),!R?i("input",Object.assign({id:t,name:e,ref:t=>this.inputEl=t,type:this.type,min:b,max:f,value:p,class:{"no-left-pad":!tt&&!!x,readonly:!!x,"truncate-value":!!F},placeholder:r?r:"",required:o,disabled:A,readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":a,"aria-describedby":J,"aria-invalid":et,"aria-activedescendant":this.ariaActiveDescendant,"aria-expanded":this.ariaExpanded,"aria-owns":this.ariaOwns,autocomplete:this.autocomplete,autocapitalize:this.autocapitalize,spellcheck:O,inputmode:N,role:this.role,maxlength:H?y:undefined,minlength:T?$:undefined},this.inheritedAttributes)):i("textarea",Object.assign({id:t,class:{"no-resize":d===false||!!x,"no-left-pad":!tt&&!!x,readonly:!!x},name:e,ref:t=>this.inputEl=t,value:p,rows:h,required:o,disabled:A,placeholder:r?r:"",readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":a,"aria-describedby":J,"aria-invalid":et,autocapitalize:this.autocapitalize,spellcheck:O,inputmode:N,maxlength:H?y:undefined,minlength:T?$:undefined},this.inheritedAttributes)),L(W,"clear-button")&&i("slot",{key:"f08406702167a6155246e26df7fe64ef06b82976",name:"clear-button"}),L(W,"search-submit-button")&&i("slot",{key:"58c8ed7ed396953f0d4dff0aba462b10e58bd78b",name:"search-submit-button"})),L(W,"menu")&&i("slot",{key:"15496f93b502c8b0d55b0a2da6622e8ab425ef49",name:"menu"}),(!C(B)||!C(P)||K>0||j||k||T||M)&&!D&&i("ic-input-validation",{key:"675805dbde2426192861938a009728af5d0ea56f",status:this.hasStatus(V)===false||V===w.Success&&I||D?"":V,message:_?G:"",ariaLiveMode:U,for:t,fullWidth:q},!x&&K>0&&i("div",{key:"92b805a2b9b4d87347f767c750c7d9ce8be6c909",slot:"validation-message-adornment"},!c&&i("ic-typography",{key:"2a24743dc253ab95c360c2ae78e559c0437202dc",variant:"caption",class:"char-count-text"},i("span",{key:"a71f41c5313d828123d275a41ae694ec2c0b2f5e",class:"char-count"},g,"/",K)),i("span",{key:"9c6d7a87b3d4a0f2baf9b1f732f0940d5e0fbe7b",class:"remaining-char-count-desc","aria-live":"polite"},Q),i("span",{key:"3aba077c149ce80fa5732245829e6e02c4bf52c8",hidden:true,id:X},"Field can contain a maximum of ",K," characters.")))))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};K.style=A;export{j as ic_pagination,I as ic_pagination_item,E as ic_select,K as ic_text_field};
2
+ //# sourceMappingURL=p-250bf568.entry.js.map