@haiilo/catalyst 0.3.2 → 0.5.1

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 (365) hide show
  1. package/dist/catalyst/app-globals-23d8c4a8.js +948 -0
  2. package/dist/catalyst/app-globals-23d8c4a8.js.map +1 -0
  3. package/dist/catalyst/app-globals-3dd6a26b.js +948 -0
  4. package/dist/catalyst/app-globals-3dd6a26b.js.map +1 -0
  5. package/dist/catalyst/app-globals-42ce39cc.js +948 -0
  6. package/dist/catalyst/app-globals-42ce39cc.js.map +1 -0
  7. package/dist/catalyst/app-globals-5cf43b57.js +949 -0
  8. package/dist/catalyst/app-globals-5cf43b57.js.map +1 -0
  9. package/dist/catalyst/app-globals-8598c768.js +948 -0
  10. package/dist/catalyst/app-globals-8598c768.js.map +1 -0
  11. package/dist/catalyst/app-globals-a41af143.js +948 -0
  12. package/dist/catalyst/app-globals-a41af143.js.map +1 -0
  13. package/dist/catalyst/app-globals-c6a8b994.js +949 -0
  14. package/dist/catalyst/app-globals-c6a8b994.js.map +1 -0
  15. package/dist/catalyst/cat-alert.entry.js +33 -0
  16. package/dist/catalyst/cat-alert.entry.js.map +1 -0
  17. package/dist/catalyst/cat-badge.entry.js +44 -0
  18. package/dist/catalyst/cat-badge.entry.js.map +1 -0
  19. package/dist/catalyst/cat-button.entry.js +298 -0
  20. package/dist/catalyst/cat-button.entry.js.map +1 -0
  21. package/dist/catalyst/cat-card.entry.js +17 -0
  22. package/dist/catalyst/cat-card.entry.js.map +1 -0
  23. package/dist/catalyst/cat-checkbox.entry.js +75 -0
  24. package/dist/catalyst/cat-checkbox.entry.js.map +1 -0
  25. package/dist/catalyst/cat-i18n-registry-2a6187c9.js +75 -0
  26. package/dist/catalyst/cat-i18n-registry-2a6187c9.js.map +1 -0
  27. package/dist/catalyst/cat-i18n-registry-330db605.js +74 -0
  28. package/dist/catalyst/cat-i18n-registry-330db605.js.map +1 -0
  29. package/dist/catalyst/cat-i18n-registry-83d20604.js +74 -0
  30. package/dist/catalyst/cat-i18n-registry-83d20604.js.map +1 -0
  31. package/dist/catalyst/cat-i18n-registry-dd55821d.js +73 -0
  32. package/dist/catalyst/cat-i18n-registry-dd55821d.js.map +1 -0
  33. package/dist/catalyst/cat-i18n-registry-f6560651.js +75 -0
  34. package/dist/catalyst/cat-i18n-registry-f6560651.js.map +1 -0
  35. package/dist/{esm/cat-icon-registry-59da2e37.js → catalyst/cat-icon-registry-2dcfc9fb.js} +16 -2
  36. package/dist/catalyst/cat-icon-registry-2dcfc9fb.js.map +1 -0
  37. package/dist/catalyst/cat-icon.entry.js +31 -0
  38. package/dist/catalyst/cat-icon.entry.js.map +1 -0
  39. package/dist/catalyst/cat-input.entry.js +111 -0
  40. package/dist/catalyst/cat-input.entry.js.map +1 -0
  41. package/dist/catalyst/cat-menu.entry.js +850 -0
  42. package/dist/catalyst/cat-menu.entry.js.map +1 -0
  43. package/dist/catalyst/cat-radio.entry.js +66 -0
  44. package/dist/catalyst/cat-radio.entry.js.map +1 -0
  45. package/dist/catalyst/cat-scrollable.entry.js +4522 -0
  46. package/dist/catalyst/cat-scrollable.entry.js.map +1 -0
  47. package/dist/catalyst/cat-skeleton.entry.js +55 -0
  48. package/dist/catalyst/cat-skeleton.entry.js.map +1 -0
  49. package/dist/catalyst/cat-spinner.entry.js +23 -0
  50. package/dist/catalyst/cat-spinner.entry.js.map +1 -0
  51. package/dist/catalyst/cat-textarea.entry.js +87 -0
  52. package/dist/catalyst/cat-textarea.entry.js.map +1 -0
  53. package/dist/catalyst/cat-toggle.entry.js +66 -0
  54. package/dist/catalyst/cat-toggle.entry.js.map +1 -0
  55. package/dist/catalyst/cat-tooltip.entry.js +129 -0
  56. package/dist/catalyst/cat-tooltip.entry.js.map +1 -0
  57. package/dist/catalyst/catalyst.css +2033 -1
  58. package/dist/catalyst/catalyst.esm.js +133 -1
  59. package/dist/catalyst/catalyst.esm.js.map +1 -1
  60. package/dist/catalyst/css-shim-e6dd2538.js +6 -0
  61. package/dist/catalyst/css-shim-e6dd2538.js.map +1 -0
  62. package/dist/catalyst/dom-7fc649b0.js +75 -0
  63. package/dist/catalyst/dom-7fc649b0.js.map +1 -0
  64. package/dist/catalyst/first-tabbable-2d9f9e9a.js +2123 -0
  65. package/dist/catalyst/first-tabbable-2d9f9e9a.js.map +1 -0
  66. package/dist/catalyst/index-471d4e05.js +3059 -0
  67. package/dist/catalyst/index-471d4e05.js.map +1 -0
  68. package/dist/catalyst/index-bbb694f5.js +3059 -0
  69. package/dist/catalyst/index-bbb694f5.js.map +1 -0
  70. package/dist/catalyst/index.esm.js +4 -1
  71. package/dist/catalyst/index.esm.js.map +1 -1
  72. package/dist/catalyst/loglevel-7f0f71af.js +346 -0
  73. package/dist/catalyst/loglevel-7f0f71af.js.map +1 -0
  74. package/dist/catalyst/shadow-css-4d56fa31.js +390 -0
  75. package/dist/catalyst/shadow-css-4d56fa31.js.map +1 -0
  76. package/dist/cjs/app-globals-aaefc070.js +950 -0
  77. package/dist/cjs/app-globals-aaefc070.js.map +1 -0
  78. package/dist/cjs/cat-alert.cjs.entry.js +37 -0
  79. package/dist/cjs/cat-alert.cjs.entry.js.map +1 -0
  80. package/dist/cjs/cat-badge.cjs.entry.js +48 -0
  81. package/dist/cjs/cat-badge.cjs.entry.js.map +1 -0
  82. package/dist/cjs/cat-button.cjs.entry.js +302 -0
  83. package/dist/cjs/cat-button.cjs.entry.js.map +1 -0
  84. package/dist/cjs/cat-card.cjs.entry.js +21 -0
  85. package/dist/cjs/cat-card.cjs.entry.js.map +1 -0
  86. package/dist/cjs/cat-checkbox.cjs.entry.js +79 -0
  87. package/dist/cjs/cat-checkbox.cjs.entry.js.map +1 -0
  88. package/dist/cjs/cat-i18n-registry-a1379d1e.js +76 -0
  89. package/dist/cjs/cat-i18n-registry-a1379d1e.js.map +1 -0
  90. package/dist/cjs/{cat-icon-registry-850c538c.js → cat-icon-registry-74247389.js} +16 -2
  91. package/dist/cjs/cat-icon-registry-74247389.js.map +1 -0
  92. package/dist/cjs/cat-icon.cjs.entry.js +35 -0
  93. package/dist/cjs/cat-icon.cjs.entry.js.map +1 -0
  94. package/dist/cjs/cat-input.cjs.entry.js +115 -0
  95. package/dist/cjs/cat-input.cjs.entry.js.map +1 -0
  96. package/dist/cjs/cat-menu.cjs.entry.js +854 -0
  97. package/dist/cjs/cat-menu.cjs.entry.js.map +1 -0
  98. package/dist/cjs/cat-radio.cjs.entry.js +70 -0
  99. package/dist/cjs/cat-radio.cjs.entry.js.map +1 -0
  100. package/dist/cjs/cat-scrollable.cjs.entry.js +4526 -0
  101. package/dist/cjs/cat-scrollable.cjs.entry.js.map +1 -0
  102. package/dist/cjs/cat-skeleton.cjs.entry.js +59 -0
  103. package/dist/cjs/cat-skeleton.cjs.entry.js.map +1 -0
  104. package/dist/cjs/cat-spinner.cjs.entry.js +27 -0
  105. package/dist/cjs/cat-spinner.cjs.entry.js.map +1 -0
  106. package/dist/cjs/cat-textarea.cjs.entry.js +91 -0
  107. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -0
  108. package/dist/cjs/cat-toggle.cjs.entry.js +70 -0
  109. package/dist/cjs/cat-toggle.cjs.entry.js.map +1 -0
  110. package/dist/cjs/cat-tooltip.cjs.entry.js +133 -0
  111. package/dist/cjs/cat-tooltip.cjs.entry.js.map +1 -0
  112. package/dist/cjs/catalyst.cjs.js +118 -6
  113. package/dist/cjs/catalyst.cjs.js.map +1 -1
  114. package/dist/cjs/css-shim-6ca600c2.js +8 -0
  115. package/dist/cjs/css-shim-6ca600c2.js.map +1 -0
  116. package/dist/cjs/dom-8d415461.js +77 -0
  117. package/dist/cjs/dom-8d415461.js.map +1 -0
  118. package/dist/cjs/first-tabbable-2068dcc6.js +2133 -0
  119. package/dist/cjs/first-tabbable-2068dcc6.js.map +1 -0
  120. package/dist/cjs/index-abcb3941.js +3094 -0
  121. package/dist/cjs/index-abcb3941.js.map +1 -0
  122. package/dist/cjs/index.cjs.js +4 -1
  123. package/dist/cjs/index.cjs.js.map +1 -1
  124. package/dist/cjs/loader.cjs.js +20 -4
  125. package/dist/cjs/loader.cjs.js.map +1 -1
  126. package/dist/cjs/loglevel-24040e9d.js +348 -0
  127. package/dist/cjs/loglevel-24040e9d.js.map +1 -0
  128. package/dist/cjs/shadow-css-78860e39.js +392 -0
  129. package/dist/cjs/shadow-css-78860e39.js.map +1 -0
  130. package/dist/collection/collection-manifest.json +8 -1
  131. package/dist/collection/components/cat-alert/cat-alert.css +11 -6
  132. package/dist/collection/components/cat-alert/cat-alert.js +19 -8
  133. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  134. package/dist/collection/components/cat-badge/cat-badge.css +17 -17
  135. package/dist/collection/components/cat-badge/cat-badge.js +9 -8
  136. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  137. package/dist/collection/components/cat-button/cat-button.css +18 -8
  138. package/dist/collection/components/cat-button/cat-button.js +32 -8
  139. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  140. package/dist/collection/components/cat-card/cat-card.css +25 -0
  141. package/dist/collection/components/cat-card/cat-card.js +20 -0
  142. package/dist/collection/components/cat-card/cat-card.js.map +1 -0
  143. package/dist/collection/components/cat-checkbox/cat-checkbox.css +105 -0
  144. package/dist/collection/components/cat-checkbox/cat-checkbox.js +314 -0
  145. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -0
  146. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +70 -0
  147. package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -0
  148. package/dist/collection/components/cat-icon/cat-icon-registry.js +14 -1
  149. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  150. package/dist/collection/components/cat-icon/cat-icon.css +5 -5
  151. package/dist/collection/components/cat-icon/cat-icon.js +3 -2
  152. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  153. package/dist/collection/components/cat-input/cat-input.css +131 -0
  154. package/dist/collection/components/cat-input/cat-input.js +606 -0
  155. package/dist/collection/components/cat-input/cat-input.js.map +1 -0
  156. package/dist/collection/components/cat-menu/cat-menu.css +2 -1
  157. package/dist/collection/components/cat-menu/cat-menu.js +3 -5
  158. package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
  159. package/dist/collection/components/cat-radio/cat-radio.css +84 -0
  160. package/dist/collection/components/cat-radio/cat-radio.js +283 -0
  161. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -0
  162. package/dist/collection/components/cat-scrollable/cat-scrollable.js +4 -2
  163. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  164. package/dist/collection/components/cat-skeleton/cat-skeleton.css +30 -30
  165. package/dist/collection/components/cat-skeleton/cat-skeleton.js +4 -4
  166. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  167. package/dist/collection/components/cat-spinner/cat-spinner.css +7 -7
  168. package/dist/collection/components/cat-spinner/cat-spinner.js +1 -1
  169. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  170. package/dist/collection/components/cat-textarea/cat-textarea.css +74 -0
  171. package/dist/collection/components/cat-textarea/cat-textarea.js +393 -0
  172. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -0
  173. package/dist/collection/components/cat-toggle/cat-toggle.css +93 -0
  174. package/dist/collection/components/cat-toggle/cat-toggle.js +283 -0
  175. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -0
  176. package/dist/collection/components/cat-tooltip/cat-tooltip.css +41 -0
  177. package/dist/collection/components/cat-tooltip/cat-tooltip.js +254 -0
  178. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -0
  179. package/dist/collection/index.js +1 -0
  180. package/dist/collection/index.js.map +1 -1
  181. package/dist/collection/init.js +9 -1
  182. package/dist/collection/init.js.map +1 -1
  183. package/dist/collection/utils/first-tabbable.js +6 -0
  184. package/dist/collection/utils/first-tabbable.js.map +1 -0
  185. package/dist/collection/utils/is-touch-screen.js +3 -0
  186. package/dist/collection/utils/is-touch-screen.js.map +1 -0
  187. package/dist/components/cat-alert.js +15 -6
  188. package/dist/components/cat-alert.js.map +1 -1
  189. package/dist/components/cat-badge.js +7 -7
  190. package/dist/components/cat-badge.js.map +1 -1
  191. package/dist/components/cat-button.js +1 -647
  192. package/dist/components/cat-button.js.map +1 -1
  193. package/dist/components/cat-button2.js +346 -0
  194. package/dist/components/cat-button2.js.map +1 -0
  195. package/dist/components/cat-card.d.ts +11 -0
  196. package/dist/components/cat-card.js +35 -0
  197. package/dist/components/cat-card.js.map +1 -0
  198. package/dist/components/cat-checkbox.d.ts +11 -0
  199. package/dist/components/cat-checkbox.js +103 -0
  200. package/dist/components/cat-checkbox.js.map +1 -0
  201. package/dist/components/cat-i18n-registry.js +74 -0
  202. package/dist/components/cat-i18n-registry.js.map +1 -0
  203. package/dist/components/cat-icon-registry.js +15 -1
  204. package/dist/components/cat-icon-registry.js.map +1 -1
  205. package/dist/components/cat-icon2.js +3 -2
  206. package/dist/components/cat-icon2.js.map +1 -1
  207. package/dist/components/cat-input.d.ts +11 -0
  208. package/dist/components/cat-input.js +172 -0
  209. package/dist/components/cat-input.js.map +1 -0
  210. package/dist/components/cat-menu.js +12 -1520
  211. package/dist/components/cat-menu.js.map +1 -1
  212. package/dist/components/cat-radio.d.ts +11 -0
  213. package/dist/components/cat-radio.js +93 -0
  214. package/dist/components/cat-radio.js.map +1 -0
  215. package/dist/components/cat-scrollable.js +3210 -25
  216. package/dist/components/cat-scrollable.js.map +1 -1
  217. package/dist/components/cat-skeleton.js +5 -5
  218. package/dist/components/cat-skeleton.js.map +1 -1
  219. package/dist/components/cat-spinner2.js +2 -2
  220. package/dist/components/cat-spinner2.js.map +1 -1
  221. package/dist/components/cat-textarea.d.ts +11 -0
  222. package/dist/components/cat-textarea.js +119 -0
  223. package/dist/components/cat-textarea.js.map +1 -0
  224. package/dist/components/cat-toggle.d.ts +11 -0
  225. package/dist/components/cat-toggle.js +93 -0
  226. package/dist/components/cat-toggle.js.map +1 -0
  227. package/dist/components/cat-tooltip.d.ts +11 -0
  228. package/dist/components/cat-tooltip.js +154 -0
  229. package/dist/components/cat-tooltip.js.map +1 -0
  230. package/dist/components/first-tabbable.js +2123 -0
  231. package/dist/components/first-tabbable.js.map +1 -0
  232. package/dist/components/index.js +778 -0
  233. package/dist/components/index.js.map +1 -1
  234. package/dist/components/loglevel.js +346 -0
  235. package/dist/components/loglevel.js.map +1 -0
  236. package/dist/esm/app-globals-3dd6a26b.js +948 -0
  237. package/dist/esm/app-globals-3dd6a26b.js.map +1 -0
  238. package/dist/esm/cat-alert.entry.js +33 -0
  239. package/dist/esm/cat-alert.entry.js.map +1 -0
  240. package/dist/esm/cat-badge.entry.js +44 -0
  241. package/dist/esm/cat-badge.entry.js.map +1 -0
  242. package/dist/esm/cat-button.entry.js +298 -0
  243. package/dist/esm/cat-button.entry.js.map +1 -0
  244. package/dist/esm/cat-card.entry.js +17 -0
  245. package/dist/esm/cat-card.entry.js.map +1 -0
  246. package/dist/esm/cat-checkbox.entry.js +75 -0
  247. package/dist/esm/cat-checkbox.entry.js.map +1 -0
  248. package/dist/esm/cat-i18n-registry-83d20604.js +74 -0
  249. package/dist/esm/cat-i18n-registry-83d20604.js.map +1 -0
  250. package/dist/esm/cat-icon-registry-2dcfc9fb.js +59 -0
  251. package/dist/esm/cat-icon-registry-2dcfc9fb.js.map +1 -0
  252. package/dist/esm/cat-icon.entry.js +31 -0
  253. package/dist/esm/cat-icon.entry.js.map +1 -0
  254. package/dist/esm/cat-input.entry.js +111 -0
  255. package/dist/esm/cat-input.entry.js.map +1 -0
  256. package/dist/esm/cat-menu.entry.js +850 -0
  257. package/dist/esm/cat-menu.entry.js.map +1 -0
  258. package/dist/esm/cat-radio.entry.js +66 -0
  259. package/dist/esm/cat-radio.entry.js.map +1 -0
  260. package/dist/esm/cat-scrollable.entry.js +4522 -0
  261. package/dist/esm/cat-scrollable.entry.js.map +1 -0
  262. package/dist/esm/cat-skeleton.entry.js +55 -0
  263. package/dist/esm/cat-skeleton.entry.js.map +1 -0
  264. package/dist/esm/cat-spinner.entry.js +23 -0
  265. package/dist/esm/cat-spinner.entry.js.map +1 -0
  266. package/dist/esm/cat-textarea.entry.js +87 -0
  267. package/dist/esm/cat-textarea.entry.js.map +1 -0
  268. package/dist/esm/cat-toggle.entry.js +66 -0
  269. package/dist/esm/cat-toggle.entry.js.map +1 -0
  270. package/dist/esm/cat-tooltip.entry.js +129 -0
  271. package/dist/esm/cat-tooltip.entry.js.map +1 -0
  272. package/dist/esm/catalyst.js +118 -6
  273. package/dist/esm/catalyst.js.map +1 -1
  274. package/dist/esm/css-shim-e6dd2538.js +6 -0
  275. package/dist/esm/css-shim-e6dd2538.js.map +1 -0
  276. package/dist/esm/dom-7fc649b0.js +75 -0
  277. package/dist/esm/dom-7fc649b0.js.map +1 -0
  278. package/dist/esm/first-tabbable-2d9f9e9a.js +2123 -0
  279. package/dist/esm/first-tabbable-2d9f9e9a.js.map +1 -0
  280. package/dist/esm/index-471d4e05.js +3059 -0
  281. package/dist/esm/index-471d4e05.js.map +1 -0
  282. package/dist/esm/index.js +3 -1
  283. package/dist/esm/index.js.map +1 -1
  284. package/dist/esm/loader.js +20 -4
  285. package/dist/esm/loader.js.map +1 -1
  286. package/dist/esm/loglevel-7f0f71af.js +346 -0
  287. package/dist/esm/loglevel-7f0f71af.js.map +1 -0
  288. package/dist/esm/shadow-css-4d56fa31.js +390 -0
  289. package/dist/esm/shadow-css-4d56fa31.js.map +1 -0
  290. package/dist/types/components/cat-alert/cat-alert.d.ts +4 -2
  291. package/dist/types/components/cat-alert/cat-alert.e2e.d.ts +1 -0
  292. package/dist/types/components/cat-alert/cat-alert.spec.d.ts +1 -0
  293. package/dist/types/components/cat-badge/cat-badge.d.ts +3 -2
  294. package/dist/types/components/cat-badge/cat-badge.e2e.d.ts +1 -0
  295. package/dist/types/components/cat-badge/cat-badge.spec.d.ts +1 -0
  296. package/dist/types/components/cat-button/cat-button.d.ts +8 -3
  297. package/dist/types/components/cat-button/cat-button.e2e.d.ts +1 -0
  298. package/dist/types/components/cat-button/cat-button.spec.d.ts +1 -0
  299. package/dist/types/components/cat-card/cat-card.d.ts +7 -0
  300. package/dist/types/components/cat-card/cat-card.e2e.d.ts +1 -0
  301. package/dist/types/components/cat-card/cat-card.spec.d.ts +1 -0
  302. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +69 -0
  303. package/dist/types/components/cat-checkbox/cat-checkbox.e2e.d.ts +1 -0
  304. package/dist/types/components/cat-checkbox/cat-checkbox.spec.d.ts +1 -0
  305. package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +18 -0
  306. package/dist/types/components/cat-icon/cat-icon-registry.d.ts +4 -4
  307. package/dist/types/components/cat-icon/cat-icon.d.ts +1 -1
  308. package/dist/types/components/cat-icon/cat-icon.e2e.d.ts +1 -0
  309. package/dist/types/components/cat-icon/cat-icon.spec.d.ts +1 -0
  310. package/dist/types/components/cat-input/cat-input.d.ts +130 -0
  311. package/dist/types/components/cat-input/cat-input.e2e.d.ts +1 -0
  312. package/dist/types/components/cat-input/cat-input.spec.d.ts +1 -0
  313. package/dist/types/components/cat-menu/cat-menu.d.ts +0 -1
  314. package/dist/types/components/cat-menu/cat-menu.e2e.d.ts +1 -0
  315. package/dist/types/components/cat-menu/cat-menu.spec.d.ts +1 -0
  316. package/dist/types/components/cat-radio/cat-radio.d.ts +63 -0
  317. package/dist/types/components/cat-radio/cat-radio.e2e.d.ts +1 -0
  318. package/dist/types/components/cat-radio/cat-radio.spec.d.ts +1 -0
  319. package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +3 -1
  320. package/dist/types/components/cat-scrollable/cat-scrollable.e2e.d.ts +1 -0
  321. package/dist/types/components/cat-scrollable/cat-scrollable.spec.d.ts +1 -0
  322. package/dist/types/components/cat-skeleton/cat-skeleton.e2e.d.ts +1 -0
  323. package/dist/types/components/cat-skeleton/cat-skeleton.spec.d.ts +1 -0
  324. package/dist/types/components/cat-spinner/cat-spinner.e2e.d.ts +1 -0
  325. package/dist/types/components/cat-spinner/cat-spinner.spec.d.ts +1 -0
  326. package/dist/types/components/cat-textarea/cat-textarea.d.ts +85 -0
  327. package/dist/types/components/cat-textarea/cat-textarea.e2e.d.ts +1 -0
  328. package/dist/types/components/cat-textarea/cat-textarea.spec.d.ts +1 -0
  329. package/dist/types/components/cat-toggle/cat-toggle.d.ts +64 -0
  330. package/dist/types/components/cat-toggle/cat-toggle.e2e.d.ts +1 -0
  331. package/dist/types/components/cat-toggle/cat-toggle.spec.d.ts +1 -0
  332. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +46 -0
  333. package/dist/types/components/cat-tooltip/cat-tooltip.e2e.d.ts +1 -0
  334. package/dist/types/components/cat-tooltip/cat-tooltip.spec.d.ts +1 -0
  335. package/dist/types/components.d.ts +680 -4
  336. package/dist/types/index.d.ts +1 -0
  337. package/dist/types/utils/first-tabbable.d.ts +4 -0
  338. package/dist/types/utils/is-touch-screen.d.ts +2 -0
  339. package/dist/types/utils/media-matcher.spec.d.ts +1 -0
  340. package/package.json +9 -7
  341. package/dist/catalyst/p-31b500c7.entry.js +0 -10
  342. package/dist/catalyst/p-31b500c7.entry.js.map +0 -1
  343. package/dist/catalyst/p-ed826597.js +0 -2
  344. package/dist/catalyst/p-ed826597.js.map +0 -1
  345. package/dist/catalyst/p-ef0a8ae9.js +0 -2
  346. package/dist/catalyst/p-ef0a8ae9.js.map +0 -1
  347. package/dist/catalyst/p-f151cb13.js +0 -2
  348. package/dist/catalyst/p-f151cb13.js.map +0 -1
  349. package/dist/cjs/app-globals-7f2b1f8e.js +0 -173
  350. package/dist/cjs/app-globals-7f2b1f8e.js.map +0 -1
  351. package/dist/cjs/cat-alert_8.cjs.entry.js +0 -4450
  352. package/dist/cjs/cat-alert_8.cjs.entry.js.map +0 -1
  353. package/dist/cjs/cat-icon-registry-850c538c.js.map +0 -1
  354. package/dist/cjs/index-c0881ae0.js +0 -1348
  355. package/dist/cjs/index-c0881ae0.js.map +0 -1
  356. package/dist/collection/utils/utils.js +0 -4
  357. package/dist/collection/utils/utils.js.map +0 -1
  358. package/dist/esm/app-globals-8af9b2cf.js +0 -171
  359. package/dist/esm/app-globals-8af9b2cf.js.map +0 -1
  360. package/dist/esm/cat-alert_8.entry.js +0 -4439
  361. package/dist/esm/cat-alert_8.entry.js.map +0 -1
  362. package/dist/esm/cat-icon-registry-59da2e37.js.map +0 -1
  363. package/dist/esm/index-0ff35bca.js +0 -1320
  364. package/dist/esm/index-0ff35bca.js.map +0 -1
  365. package/dist/types/utils/utils.d.ts +0 -1
@@ -0,0 +1,606 @@
1
+ import { Component, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
2
+ import log from 'loglevel';
3
+ import { CatI18nRegistry } from '../cat-i18n/cat-i18n-registry';
4
+ let nextUniqueId = 0;
5
+ /**
6
+ * Inputs are used to allow users to provide text input when the expected input
7
+ * is short. As well as plain text, Input supports various types of text,
8
+ * including passwords and numbers.
9
+ *
10
+ * @part label - The label content.
11
+ * @part prefix - The text prefix.
12
+ * @part suffix - The text suffix.
13
+ */
14
+ export class CatInput {
15
+ constructor() {
16
+ this.i18n = CatI18nRegistry.getInstance();
17
+ this.id = `cat-input-${nextUniqueId++}`;
18
+ this.inputValue = '';
19
+ /**
20
+ * Whether the input should show a clear button.
21
+ */
22
+ this.clearable = false;
23
+ /**
24
+ * Whether the input is disabled.
25
+ */
26
+ this.disabled = false;
27
+ /**
28
+ * Display the icon on the right.
29
+ */
30
+ this.iconRight = false;
31
+ /**
32
+ * The label for the input.
33
+ */
34
+ this.label = '';
35
+ /**
36
+ * Visually hide the label, but still show it to assistive technologies like screen readers.
37
+ */
38
+ this.labelHidden = false;
39
+ /**
40
+ * The name of the form control. Submitted with the form as part of a name/value pair.
41
+ */
42
+ this.name = '';
43
+ /**
44
+ * The value is not editable.
45
+ */
46
+ this.readonly = false;
47
+ /**
48
+ * A value is required or must be check for the form to be submittable.
49
+ */
50
+ this.required = false;
51
+ /**
52
+ * Use round input edges.
53
+ */
54
+ this.round = false;
55
+ /**
56
+ * Type of form control.
57
+ */
58
+ this.type = 'text';
59
+ }
60
+ onValueChange(value) {
61
+ this.inputValue = '' + (value !== null && value !== void 0 ? value : '');
62
+ }
63
+ componentWillLoad() {
64
+ this.onValueChange(this.value);
65
+ }
66
+ componentWillRender() {
67
+ if (!this.label) {
68
+ log.error('[A11y] Missing ARIA label on input', this);
69
+ }
70
+ }
71
+ /**
72
+ * Sets focus on the input. Use this method instead of `input.focus()`.
73
+ *
74
+ * @param options An optional object providing options to control aspects of
75
+ * the focusing process.
76
+ */
77
+ async setFocus(options) {
78
+ this.input.focus(options);
79
+ }
80
+ /**
81
+ * Clear the input.
82
+ */
83
+ async clear() {
84
+ this.inputValue = '';
85
+ }
86
+ render() {
87
+ return (h(Host, null,
88
+ this.label && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } },
89
+ h("span", { part: "label" },
90
+ this.label,
91
+ !this.required && (h("span", { class: "input-optional", "aria-hidden": "true" },
92
+ "(",
93
+ this.i18n.getMessage('input.optional'),
94
+ ")"))))),
95
+ h("div", { class: {
96
+ 'input-wrapper': true,
97
+ 'input-round': this.round,
98
+ 'input-disabled': this.disabled
99
+ }, onClick: () => this.input.focus() },
100
+ this.textPrefix && (h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)),
101
+ this.icon && !this.iconRight && h("cat-icon", { icon: this.icon, class: "icon-prefix" }),
102
+ h("div", { class: "input-inner-wrapper" },
103
+ h("input", { ref: el => (this.input = el), id: this.id, class: {
104
+ 'has-clearable': this.clearable && !this.disabled
105
+ }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.max, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.inputValue, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }),
106
+ this.clearable && !this.disabled && this.inputValue && (h("cat-button", { class: "clearable", icon: "cross-circle-outlined", "icon-only": "true", size: "s", variant: "text", round: true, "a11y-label": "sdf", onClick: this.clear.bind(this) }, this.i18n.getMessage('input.clear')))),
107
+ this.icon && this.iconRight && h("cat-icon", { icon: this.icon, class: "icon-suffix" }),
108
+ this.textSuffix && (h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))),
109
+ this.hint && h("p", { class: "input-hint" }, this.hint)));
110
+ }
111
+ onInput(event) {
112
+ this.inputValue = this.input.value;
113
+ this.catChange.emit(event);
114
+ }
115
+ onFocus(event) {
116
+ this.catFocus.emit(event);
117
+ }
118
+ onBlur(event) {
119
+ this.catBlur.emit(event);
120
+ }
121
+ static get is() { return "cat-input"; }
122
+ static get encapsulation() { return "shadow"; }
123
+ static get originalStyleUrls() { return {
124
+ "$": ["cat-input.scss"]
125
+ }; }
126
+ static get styleUrls() { return {
127
+ "$": ["cat-input.css"]
128
+ }; }
129
+ static get properties() { return {
130
+ "autoComplete": {
131
+ "type": "string",
132
+ "mutable": false,
133
+ "complexType": {
134
+ "original": "string",
135
+ "resolved": "string | undefined",
136
+ "references": {}
137
+ },
138
+ "required": false,
139
+ "optional": true,
140
+ "docs": {
141
+ "tags": [],
142
+ "text": "Hint for form autofill feature."
143
+ },
144
+ "attribute": "auto-complete",
145
+ "reflect": false
146
+ },
147
+ "clearable": {
148
+ "type": "boolean",
149
+ "mutable": false,
150
+ "complexType": {
151
+ "original": "boolean",
152
+ "resolved": "boolean",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": "Whether the input should show a clear button."
160
+ },
161
+ "attribute": "clearable",
162
+ "reflect": false,
163
+ "defaultValue": "false"
164
+ },
165
+ "disabled": {
166
+ "type": "boolean",
167
+ "mutable": false,
168
+ "complexType": {
169
+ "original": "boolean",
170
+ "resolved": "boolean",
171
+ "references": {}
172
+ },
173
+ "required": false,
174
+ "optional": false,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": "Whether the input is disabled."
178
+ },
179
+ "attribute": "disabled",
180
+ "reflect": false,
181
+ "defaultValue": "false"
182
+ },
183
+ "hint": {
184
+ "type": "string",
185
+ "mutable": false,
186
+ "complexType": {
187
+ "original": "string",
188
+ "resolved": "string | undefined",
189
+ "references": {}
190
+ },
191
+ "required": false,
192
+ "optional": true,
193
+ "docs": {
194
+ "tags": [],
195
+ "text": "Optional hint text to be displayed with the input."
196
+ },
197
+ "attribute": "hint",
198
+ "reflect": false
199
+ },
200
+ "icon": {
201
+ "type": "string",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "string",
205
+ "resolved": "string | undefined",
206
+ "references": {}
207
+ },
208
+ "required": false,
209
+ "optional": true,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": "The name of an icon to be displayed in the input."
213
+ },
214
+ "attribute": "icon",
215
+ "reflect": false
216
+ },
217
+ "iconRight": {
218
+ "type": "boolean",
219
+ "mutable": false,
220
+ "complexType": {
221
+ "original": "boolean",
222
+ "resolved": "boolean",
223
+ "references": {}
224
+ },
225
+ "required": false,
226
+ "optional": false,
227
+ "docs": {
228
+ "tags": [],
229
+ "text": "Display the icon on the right."
230
+ },
231
+ "attribute": "icon-right",
232
+ "reflect": false,
233
+ "defaultValue": "false"
234
+ },
235
+ "label": {
236
+ "type": "string",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "string",
240
+ "resolved": "string",
241
+ "references": {}
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": "The label for the input."
248
+ },
249
+ "attribute": "label",
250
+ "reflect": false,
251
+ "defaultValue": "''"
252
+ },
253
+ "labelHidden": {
254
+ "type": "boolean",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "boolean",
258
+ "resolved": "boolean",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": false,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
266
+ },
267
+ "attribute": "label-hidden",
268
+ "reflect": false,
269
+ "defaultValue": "false"
270
+ },
271
+ "max": {
272
+ "type": "number",
273
+ "mutable": false,
274
+ "complexType": {
275
+ "original": "number",
276
+ "resolved": "number | undefined",
277
+ "references": {}
278
+ },
279
+ "required": false,
280
+ "optional": true,
281
+ "docs": {
282
+ "tags": [],
283
+ "text": "A maximum value for numeric values."
284
+ },
285
+ "attribute": "max",
286
+ "reflect": false
287
+ },
288
+ "maxLength": {
289
+ "type": "number",
290
+ "mutable": false,
291
+ "complexType": {
292
+ "original": "number",
293
+ "resolved": "number | undefined",
294
+ "references": {}
295
+ },
296
+ "required": false,
297
+ "optional": true,
298
+ "docs": {
299
+ "tags": [],
300
+ "text": "A maximum length (number of characters) for textual values."
301
+ },
302
+ "attribute": "max-length",
303
+ "reflect": false
304
+ },
305
+ "min": {
306
+ "type": "number",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "number",
310
+ "resolved": "number | undefined",
311
+ "references": {}
312
+ },
313
+ "required": false,
314
+ "optional": true,
315
+ "docs": {
316
+ "tags": [],
317
+ "text": "A minimum value for numeric values."
318
+ },
319
+ "attribute": "min",
320
+ "reflect": false
321
+ },
322
+ "minLength": {
323
+ "type": "number",
324
+ "mutable": false,
325
+ "complexType": {
326
+ "original": "number",
327
+ "resolved": "number | undefined",
328
+ "references": {}
329
+ },
330
+ "required": false,
331
+ "optional": true,
332
+ "docs": {
333
+ "tags": [],
334
+ "text": "A minimum length (number of characters) for textual values."
335
+ },
336
+ "attribute": "min-length",
337
+ "reflect": false
338
+ },
339
+ "name": {
340
+ "type": "string",
341
+ "mutable": false,
342
+ "complexType": {
343
+ "original": "string",
344
+ "resolved": "string",
345
+ "references": {}
346
+ },
347
+ "required": false,
348
+ "optional": false,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": "The name of the form control. Submitted with the form as part of a name/value pair."
352
+ },
353
+ "attribute": "name",
354
+ "reflect": false,
355
+ "defaultValue": "''"
356
+ },
357
+ "placeholder": {
358
+ "type": "string",
359
+ "mutable": false,
360
+ "complexType": {
361
+ "original": "string",
362
+ "resolved": "string | undefined",
363
+ "references": {}
364
+ },
365
+ "required": false,
366
+ "optional": true,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": "The placeholder text to display within the input."
370
+ },
371
+ "attribute": "placeholder",
372
+ "reflect": false
373
+ },
374
+ "textPrefix": {
375
+ "type": "string",
376
+ "mutable": false,
377
+ "complexType": {
378
+ "original": "string",
379
+ "resolved": "string | undefined",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": true,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "A textual prefix to be displayed in the input."
387
+ },
388
+ "attribute": "text-prefix",
389
+ "reflect": false
390
+ },
391
+ "textSuffix": {
392
+ "type": "string",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "string",
396
+ "resolved": "string | undefined",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": true,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "A textual suffix to be displayed in the input."
404
+ },
405
+ "attribute": "text-suffix",
406
+ "reflect": false
407
+ },
408
+ "readonly": {
409
+ "type": "boolean",
410
+ "mutable": false,
411
+ "complexType": {
412
+ "original": "boolean",
413
+ "resolved": "boolean",
414
+ "references": {}
415
+ },
416
+ "required": false,
417
+ "optional": false,
418
+ "docs": {
419
+ "tags": [],
420
+ "text": "The value is not editable."
421
+ },
422
+ "attribute": "readonly",
423
+ "reflect": false,
424
+ "defaultValue": "false"
425
+ },
426
+ "required": {
427
+ "type": "boolean",
428
+ "mutable": false,
429
+ "complexType": {
430
+ "original": "boolean",
431
+ "resolved": "boolean",
432
+ "references": {}
433
+ },
434
+ "required": false,
435
+ "optional": false,
436
+ "docs": {
437
+ "tags": [],
438
+ "text": "A value is required or must be check for the form to be submittable."
439
+ },
440
+ "attribute": "required",
441
+ "reflect": false,
442
+ "defaultValue": "false"
443
+ },
444
+ "round": {
445
+ "type": "boolean",
446
+ "mutable": false,
447
+ "complexType": {
448
+ "original": "boolean",
449
+ "resolved": "boolean",
450
+ "references": {}
451
+ },
452
+ "required": false,
453
+ "optional": false,
454
+ "docs": {
455
+ "tags": [],
456
+ "text": "Use round input edges."
457
+ },
458
+ "attribute": "round",
459
+ "reflect": false,
460
+ "defaultValue": "false"
461
+ },
462
+ "type": {
463
+ "type": "string",
464
+ "mutable": false,
465
+ "complexType": {
466
+ "original": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number'",
467
+ "resolved": "\"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
468
+ "references": {}
469
+ },
470
+ "required": false,
471
+ "optional": false,
472
+ "docs": {
473
+ "tags": [],
474
+ "text": "Type of form control."
475
+ },
476
+ "attribute": "type",
477
+ "reflect": false,
478
+ "defaultValue": "'text'"
479
+ },
480
+ "value": {
481
+ "type": "any",
482
+ "mutable": false,
483
+ "complexType": {
484
+ "original": "string | number",
485
+ "resolved": "number | string | undefined",
486
+ "references": {}
487
+ },
488
+ "required": false,
489
+ "optional": true,
490
+ "docs": {
491
+ "tags": [],
492
+ "text": "The initial value of the control."
493
+ },
494
+ "attribute": "value",
495
+ "reflect": false
496
+ }
497
+ }; }
498
+ static get states() { return {
499
+ "inputValue": {}
500
+ }; }
501
+ static get events() { return [{
502
+ "method": "catChange",
503
+ "name": "catChange",
504
+ "bubbles": true,
505
+ "cancelable": true,
506
+ "composed": true,
507
+ "docs": {
508
+ "tags": [],
509
+ "text": "Emitted when the value is changed."
510
+ },
511
+ "complexType": {
512
+ "original": "any",
513
+ "resolved": "any",
514
+ "references": {}
515
+ }
516
+ }, {
517
+ "method": "catFocus",
518
+ "name": "catFocus",
519
+ "bubbles": true,
520
+ "cancelable": true,
521
+ "composed": true,
522
+ "docs": {
523
+ "tags": [],
524
+ "text": "Emitted when the input received focus."
525
+ },
526
+ "complexType": {
527
+ "original": "FocusEvent",
528
+ "resolved": "FocusEvent",
529
+ "references": {
530
+ "FocusEvent": {
531
+ "location": "global"
532
+ }
533
+ }
534
+ }
535
+ }, {
536
+ "method": "catBlur",
537
+ "name": "catBlur",
538
+ "bubbles": true,
539
+ "cancelable": true,
540
+ "composed": true,
541
+ "docs": {
542
+ "tags": [],
543
+ "text": "Emitted when the input loses focus."
544
+ },
545
+ "complexType": {
546
+ "original": "FocusEvent",
547
+ "resolved": "FocusEvent",
548
+ "references": {
549
+ "FocusEvent": {
550
+ "location": "global"
551
+ }
552
+ }
553
+ }
554
+ }]; }
555
+ static get methods() { return {
556
+ "setFocus": {
557
+ "complexType": {
558
+ "signature": "(options?: FocusOptions | undefined) => Promise<void>",
559
+ "parameters": [{
560
+ "tags": [{
561
+ "name": "param",
562
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
563
+ }],
564
+ "text": "An optional object providing options to control aspects of\nthe focusing process."
565
+ }],
566
+ "references": {
567
+ "Promise": {
568
+ "location": "global"
569
+ },
570
+ "FocusOptions": {
571
+ "location": "global"
572
+ }
573
+ },
574
+ "return": "Promise<void>"
575
+ },
576
+ "docs": {
577
+ "text": "Sets focus on the input. Use this method instead of `input.focus()`.",
578
+ "tags": [{
579
+ "name": "param",
580
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
581
+ }]
582
+ }
583
+ },
584
+ "clear": {
585
+ "complexType": {
586
+ "signature": "() => Promise<void>",
587
+ "parameters": [],
588
+ "references": {
589
+ "Promise": {
590
+ "location": "global"
591
+ }
592
+ },
593
+ "return": "Promise<void>"
594
+ },
595
+ "docs": {
596
+ "text": "Clear the input.",
597
+ "tags": []
598
+ }
599
+ }
600
+ }; }
601
+ static get watchers() { return [{
602
+ "propName": "value",
603
+ "methodName": "onValueChange"
604
+ }]; }
605
+ }
606
+ //# sourceMappingURL=cat-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cat-input.js","sourceRoot":"","sources":["../../../src/components/cat-input/cat-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,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IAAI,CAAC,UAAU,CACX,CACR,CACG;MACL,IAAI,CAAC,IAAI,IAAI,SAAG,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,IAAI,CAAK,CAC9C,CACR,CAAC;EACJ,CAAC;EAEO,OAAO,CAAC,KAAY;IAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;EAC7B,CAAC;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;EAC5B,CAAC;EAEO,MAAM,CAAC,KAAiB;IAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;EAC3B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatI18nRegistry } from '../cat-i18n/cat-i18n-registry';\n\nlet nextUniqueId = 0;\n\n/**\n * Inputs are used to allow users to provide text input when the expected input\n * is short. As well as plain text, Input supports various types of text,\n * including passwords and numbers.\n *\n * @part label - The label content.\n * @part prefix - The text prefix.\n * @part suffix - The text suffix.\n */\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n shadow: true\n})\nexport class CatInput {\n private readonly i18n = CatI18nRegistry.getInstance();\n private readonly id = `cat-input-${nextUniqueId++}`;\n private input!: HTMLInputElement;\n\n @State() private inputValue = '';\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text to be displayed with the input.\n */\n @Prop() hint?: string;\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for numeric values.\n */\n @Prop() max?: number;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum value for numeric values.\n */\n @Prop() min?: number;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name = '';\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number' = 'text';\n\n /**\n * The initial value of the control.\n */\n @Prop() value?: string | number;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n @Watch('value')\n onValueChange(value?: string | number) {\n this.inputValue = '' + (value ?? '');\n }\n\n componentWillLoad() {\n this.onValueChange(this.value);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.error('[A11y] Missing ARIA label on input', this);\n }\n }\n\n /**\n * Sets focus on the input. Use this method instead of `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async setFocus(options?: FocusOptions): Promise<void> {\n this.input.focus(options);\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.inputValue = '';\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label htmlFor={this.id} class={{ hidden: this.labelHidden }}>\n <span part=\"label\">\n {this.label}\n {!this.required && (\n <span class=\"input-optional\" aria-hidden=\"true\">\n ({this.i18n.getMessage('input.optional')})\n </span>\n )}\n </span>\n </label>\n )}\n <div\n class={{\n 'input-wrapper': true,\n 'input-round': this.round,\n 'input-disabled': this.disabled\n }}\n onClick={() => this.input.focus()}\n >\n {this.textPrefix && (\n <span class=\"text-prefix\" part=\"prefix\">\n {this.textPrefix}\n </span>\n )}\n {this.icon && !this.iconRight && <cat-icon icon={this.icon} class=\"icon-prefix\"></cat-icon>}\n <div class=\"input-inner-wrapper\">\n <input\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.id}\n class={{\n 'has-clearable': this.clearable && !this.disabled\n }}\n autocomplete={this.autoComplete}\n disabled={this.disabled}\n max={this.max}\n maxlength={this.maxLength}\n min={this.max}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n type={this.type}\n value={this.inputValue}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n ></input>\n {this.clearable && !this.disabled && this.inputValue && (\n <cat-button\n class=\"clearable\"\n icon=\"cross-circle-outlined\"\n icon-only=\"true\"\n size=\"s\"\n variant=\"text\"\n round\n a11y-label=\"sdf\"\n onClick={this.clear.bind(this)}\n >\n {this.i18n.getMessage('input.clear')}\n </cat-button>\n )}\n </div>\n {this.icon && this.iconRight && <cat-icon icon={this.icon} class=\"icon-suffix\"></cat-icon>}\n {this.textSuffix && (\n <span class=\"text-suffix\" part=\"suffix\">\n {this.textSuffix}\n </span>\n )}\n </div>\n {this.hint && <p class=\"input-hint\">{this.hint}</p>}\n </Host>\n );\n }\n\n private onInput(event: Event) {\n this.inputValue = this.input.value;\n this.catChange.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n"]}
@@ -9,7 +9,7 @@
9
9
  /* stylelint-disable value-keyword-case */
10
10
  /* stylelint-enable value-keyword-case */
11
11
  :host {
12
- display: inline-block;
12
+ display: contents;
13
13
  }
14
14
 
15
15
  :host([hidden]) {
@@ -30,4 +30,5 @@
30
30
  max-height: calc(100vh - 48px);
31
31
  box-shadow: 0 1px 4px 0 rgba(16, 29, 48, 0.2);
32
32
  border-radius: 0.25rem;
33
+ z-index: 100;
33
34
  }
@@ -2,6 +2,7 @@ import { autoUpdate, computePosition, flip, offset } from '@floating-ui/dom';
2
2
  import { Component, Event, h, Host, Listen, Prop } from '@stencil/core';
3
3
  import * as focusTrap from 'focus-trap';
4
4
  import { tabbable } from 'tabbable';
5
+ import firstTabbable from '../../utils/first-tabbable';
5
6
  let nextUniqueId = 0;
6
7
  export class CatMenu {
7
8
  constructor() {
@@ -21,7 +22,7 @@ export class CatMenu {
21
22
  }
22
23
  componentDidLoad() {
23
24
  var _a, _b, _c, _d, _e;
24
- this.trigger = this.firstTabbable(this.triggerSlot);
25
+ this.trigger = firstTabbable(this.triggerSlot);
25
26
  (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-haspopup', 'true');
26
27
  (_b = this.trigger) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-expanded', 'false');
27
28
  (_c = this.trigger) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-controls', this.contentId);
@@ -33,7 +34,7 @@ export class CatMenu {
33
34
  this.keyListener = event => {
34
35
  if (this.content && ['ArrowDown', 'ArrowUp'].includes(event.key)) {
35
36
  const targetElements = tabbable(this.content, { includeContainer: false, getShadowRoot: true });
36
- const activeElement = this.firstTabbable(document.activeElement);
37
+ const activeElement = firstTabbable(document.activeElement);
37
38
  const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;
38
39
  const activeOff = event.key === 'ArrowDown' ? 1 : -1;
39
40
  const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
@@ -99,9 +100,6 @@ export class CatMenu {
99
100
  });
100
101
  }
101
102
  }
102
- firstTabbable(container) {
103
- return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
104
- }
105
103
  static get is() { return "cat-menu"; }
106
104
  static get encapsulation() { return "shadow"; }
107
105
  static get originalStyleUrls() { return {