@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,37 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-abcb3941.js');
6
+
7
+ const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;color:rgb(var(--text));background-color:rgba(var(--bg), 0.1);box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);border-radius:0.25rem;padding:0.75rem 1rem;width:100%}::slotted(:last-child){margin-bottom:0 !important}.alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
8
+
9
+ const CatAlert = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * The color palette of the alert.
14
+ */
15
+ this.color = 'primary';
16
+ }
17
+ render() {
18
+ return (index.h(index.Host, { tabindex: "0", role: this.role }, index.h("div", { part: "alert", class: {
19
+ alert: true,
20
+ [`alert-${this.color}`]: Boolean(this.color)
21
+ } }, index.h("slot", null))));
22
+ }
23
+ get role() {
24
+ switch (this.color) {
25
+ case 'danger':
26
+ case 'warning':
27
+ return 'alert';
28
+ default:
29
+ return 'status';
30
+ }
31
+ }
32
+ };
33
+ CatAlert.style = catAlertCss;
34
+
35
+ exports.cat_alert = CatAlert;
36
+
37
+ //# sourceMappingURL=cat-alert.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cat-alert.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,g1BAAg1B;;MCav1B,QAAQ;EALrB;;;;;IASU,UAAK,GAA+D,SAAS,CAAC;GA2BvF;EAzBC,MAAM;IACJ,QACEA,QAACC,UAAI,IAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAChCD,iBACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;OAC7C,IAEDA,qBAAa,CACT,CACD,EACP;GACH;EAED,IAAY,IAAI;IACd,QAAQ,IAAI,CAAC,KAAK;MAChB,KAAK,QAAQ,CAAC;MACd,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC;MACjB;QACE,OAAO,QAAQ,CAAC;KACnB;GACF;;;;;;","names":["h","Host"],"sources":["./src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","./src/components/cat-alert/cat-alert.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.alert {\n font: inherit;\n color: cat-token-wrap(var(--text));\n background-color: cat-token-wrap(var(--bg), $alpha: 0.1);\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n border-radius: cat-border-radius('m');\n padding: 0.75rem 1rem;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n .alert-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n *\n * @part alert - The alert element.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n /**\n * The color palette of the alert.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n render() {\n return (\n <Host tabindex=\"0\" role={this.role}>\n <div\n part=\"alert\"\n class={{\n alert: true,\n [`alert-${this.color}`]: Boolean(this.color)\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n\n private get role() {\n switch (this.color) {\n case 'danger':\n case 'warning':\n return 'alert';\n default:\n return 'status';\n }\n }\n}\n"],"version":3}
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-abcb3941.js');
6
+
7
+ const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.badge{font:inherit;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;width:100%;box-sizing:border-box;line-height:1;white-space:nowrap}.badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.badge-round{border-radius:10rem}.badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.badge-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.badge-pulse.badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.badge-pulse.badge-outlined{animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
8
+
9
+ const CatBadge = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * The rendering style of the badge.
14
+ */
15
+ this.variant = 'filled';
16
+ /**
17
+ * The color palette of the badge.
18
+ */
19
+ this.color = 'primary';
20
+ /**
21
+ * The size of the badge.
22
+ */
23
+ this.size = 'm';
24
+ /**
25
+ * Use round badge edges.
26
+ */
27
+ this.round = false;
28
+ /**
29
+ * Draw attention to the badge with a subtle animation.
30
+ */
31
+ this.pulse = false;
32
+ }
33
+ render() {
34
+ return (index.h("span", { part: "badge", class: {
35
+ badge: true,
36
+ 'badge-round': this.round,
37
+ 'badge-pulse': this.pulse,
38
+ [`badge-${this.variant}`]: Boolean(this.variant),
39
+ [`badge-${this.color}`]: Boolean(this.color),
40
+ [`badge-${this.size}`]: Boolean(this.size)
41
+ } }, index.h("slot", null)));
42
+ }
43
+ };
44
+ CatBadge.style = catBadgeCss;
45
+
46
+ exports.cat_badge = CatBadge;
47
+
48
+ //# sourceMappingURL=cat-badge.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cat-badge.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,+qEAA+qE;;MCatrE,QAAQ;EALrB;;;;;IASU,YAAO,GAA0B,QAAQ,CAAC;;;;IAK1C,UAAK,GAA+D,SAAS,CAAC;;;;IAK9E,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,QACEA,kBACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,aAAa,EAAE,IAAI,CAAC,KAAK;QACzB,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAChD,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC3C,IAEDA,qBAAa,CACR,EACP;GACH;;;;;;","names":["h"],"sources":["./src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","./src/components/cat-badge/cat-badge.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.badge {\n font: inherit;\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('s');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n line-height: 1;\n white-space: nowrap;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n.badge-round {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n.badge-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n\n.badge-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: $-outline;\n color: cat-token-wrap(var(--text));\n}\n\n@mixin theme($theme) {\n .badge-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .badge-#{$size} {\n height: cat-size($size) * 0.5;\n min-width: cat-size($size) * 0.5;\n font-size: cat-body-font-size($fontSize);\n padding: 0 cat-size($size) * 0.125;\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 'xs');\n@include size('l', 's');\n@include size('xl', 'm');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n.badge-pulse {\n &.badge-filled {\n animation: 1.5s ease 0s infinite normal none running pulse;\n }\n\n &.badge-outlined {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n }\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n *\n * @part badge - The badge element.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n /**\n * The rendering style of the badge.\n */\n @Prop() variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop() round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop() pulse = false;\n\n render() {\n return (\n <span\n part=\"badge\"\n class={{\n badge: true,\n 'badge-round': this.round,\n 'badge-pulse': this.pulse,\n [`badge-${this.variant}`]: Boolean(this.variant),\n [`badge-${this.color}`]: Boolean(this.color),\n [`badge-${this.size}`]: Boolean(this.size)\n }}\n >\n <slot></slot>\n </span>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,302 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-abcb3941.js');
6
+ const loglevel = require('./loglevel-24040e9d.js');
7
+
8
+ const _breakpoints = ['xs', 's', 'm', 'l', 'xl'];
9
+ const Breakpoints = {
10
+ xs: '(max-width: 539.98px)',
11
+ s: '(max-width: 767.98px)',
12
+ m: '(max-width: 991.98px)',
13
+ l: '(max-width: 1199.98px)',
14
+ xl: '(max-width: 1399.98px)'
15
+ };
16
+ function isBreakpoint(value) {
17
+ return typeof value === 'string' && _breakpoints.includes(value);
18
+ }
19
+
20
+ // https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts
21
+ // Whether the current platform supports the V8 Break Iterator. The V8 check
22
+ // is necessary to detect all Blink based browsers.
23
+ let hasV8BreakIterator;
24
+ // We need a try/catch around the reference to `Intl`, because accessing it in some cases can
25
+ // cause IE to throw. These cases are tied to particular versions of Windows and can happen if
26
+ // the consumer is providing a polyfilled `Map`. See:
27
+ // https://github.com/Microsoft/ChakraCore/issues/3189
28
+ // https://github.com/angular/components/issues/15687
29
+ try {
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;
32
+ }
33
+ catch (_a) {
34
+ hasV8BreakIterator = false;
35
+ }
36
+ class Platform {
37
+ constructor() {
38
+ /** Whether the current browser is Microsoft Edge. */
39
+ this.EDGE = /(edge)/i.test(navigator.userAgent);
40
+ /** Whether the current rendering engine is Microsoft Trident. */
41
+ this.TRIDENT = /(msie|trident)/i.test(navigator.userAgent);
42
+ // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
43
+ /** Whether the current rendering engine is Blink. */
44
+ this.BLINK =
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
+ !!(window.chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;
47
+ // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
48
+ // ensure that Webkit runs standalone and is not used as another engine's base.
49
+ /** Whether the current rendering engine is WebKit. */
50
+ this.WEBKIT = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
51
+ /** Whether the current platform is Apple iOS. */
52
+ this.IOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);
53
+ // It's difficult to detect the plain Gecko engine, because most of the browsers identify
54
+ // them self as Gecko-like browsers and modify the userAgent's according to that.
55
+ // Since we only cover one explicit Firefox case, we can simply check for Firefox
56
+ // instead of having an unstable check for Gecko.
57
+ /** Whether the current browser is Firefox. */
58
+ this.FIREFOX = /(firefox|minefield)/i.test(navigator.userAgent);
59
+ /** Whether the current platform is Android. */
60
+ // Trident on mobile adds the android platform to the userAgent to trick detections.
61
+ this.ANDROID = /android/i.test(navigator.userAgent) && !this.TRIDENT;
62
+ // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
63
+ // this and just place the Safari keyword in the userAgent. To be more safe about Safari every
64
+ // Safari browser should also use Webkit as its layout engine.
65
+ /** Whether the current browser is Safari. */
66
+ this.SAFARI = /safari/i.test(navigator.userAgent) && this.WEBKIT;
67
+ }
68
+ }
69
+
70
+ // https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts
71
+ /** Global registry for all dynamically-created, injected media queries. */
72
+ const mediaQueriesForWebkitCompatibility = new Set();
73
+ /** Style tag that holds all of the dynamically-created media queries. */
74
+ let mediaQueryStyleNode;
75
+ /** A utility for calling matchMedia queries. */
76
+ class MediaMatcher {
77
+ constructor() {
78
+ this._platform = new Platform();
79
+ this._matchMedia = window.matchMedia.bind(window);
80
+ }
81
+ /**
82
+ * Evaluates the given media query and returns the native MediaQueryList from which results
83
+ * can be retrieved.
84
+ * Confirms the layout engine will trigger for the selector query provided and returns the
85
+ * MediaQueryList for the query provided.
86
+ */
87
+ matchMedia(query) {
88
+ if (this._platform.WEBKIT || this._platform.BLINK) {
89
+ createEmptyStyleRule(query);
90
+ }
91
+ return this._matchMedia(query);
92
+ }
93
+ }
94
+ /**
95
+ * Creates an empty stylesheet that is used to work around browser inconsistencies related to
96
+ * `matchMedia`. At the time of writing, it handles the following cases:
97
+ * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`
98
+ * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.
99
+ * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules
100
+ * inside the `@media` match existing elements on the page. We work around it by having one rule
101
+ * targeting the `body`. See https://github.com/angular/components/issues/23546.
102
+ */
103
+ function createEmptyStyleRule(query) {
104
+ if (mediaQueriesForWebkitCompatibility.has(query)) {
105
+ return;
106
+ }
107
+ try {
108
+ if (!mediaQueryStyleNode) {
109
+ mediaQueryStyleNode = document.createElement('style');
110
+ mediaQueryStyleNode.setAttribute('type', 'text/css');
111
+ document.head.appendChild(mediaQueryStyleNode);
112
+ }
113
+ if (mediaQueryStyleNode.sheet) {
114
+ mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);
115
+ mediaQueriesForWebkitCompatibility.add(query);
116
+ }
117
+ }
118
+ catch (e) {
119
+ loglevel.loglevel.error(e);
120
+ }
121
+ }
122
+
123
+ const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:0.65;filter:grayscale(100%)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:none}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:underline}.cat-button-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--base:var(--cat-primary-text, 32, 127, 138)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 28, 112, 122);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 28, 112, 122)}.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 25, 101, 110);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 25, 101, 110)}.cat-button-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--base:105, 118, 135}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--base:0, 132, 88}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 117, 78;--fill:255, 255, 255;--text:0, 117, 78}.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 105, 70;--fill:255, 255, 255;--text:0, 105, 70}.cat-button-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--base:159, 97, 0}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 214, 148;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 222, 168;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--base:217, 52, 13}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:194, 46, 11;--fill:255, 255, 255;--text:194, 46, 11}.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:174, 42, 10;--fill:255, 255, 255;--text:174, 42, 10}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1rem;padding-right:1rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1rem;padding-right:1rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1rem;padding-right:1rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1rem;padding-right:1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1rem;padding-right:1rem}.cat-button-active::before{content:\"\";display:block;position:absolute;top:0;left:0;width:0.25rem;height:100%;background:rgb(var(--base))}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
124
+
125
+ const CatButton = class {
126
+ constructor(hostRef) {
127
+ index.registerInstance(this, hostRef);
128
+ this.catClick = index.createEvent(this, "catClick", 7);
129
+ this.catFocus = index.createEvent(this, "catFocus", 7);
130
+ this.catBlur = index.createEvent(this, "catBlur", 7);
131
+ this._iconOnly = true;
132
+ /**
133
+ * The rendering style of the button.
134
+ */
135
+ this.variant = 'outlined';
136
+ /**
137
+ * The color palette of the button.
138
+ */
139
+ this.color = 'secondary';
140
+ /**
141
+ * Show an active status indicator on the left side of the button.
142
+ */
143
+ this.active = false;
144
+ /**
145
+ * The size of the button.
146
+ */
147
+ this.size = 'm';
148
+ /**
149
+ * Specifies that the button should be disabled. A disabled button is unusable
150
+ * and un-clickable. Corresponds with the native HTML disabled attribute.
151
+ */
152
+ this.disabled = false;
153
+ /**
154
+ * Displays the button in a loading state with a spinner. Just like a disabled
155
+ * button, an inactive button is unusable and un-clickable. However, it
156
+ * retains the current focus state.
157
+ */
158
+ this.loading = false;
159
+ /**
160
+ * Allows the button to submit a form.
161
+ */
162
+ this.submit = false;
163
+ /**
164
+ * Ellipse overflowing button content.
165
+ */
166
+ this.ellipsed = true;
167
+ /**
168
+ * Use round button edges.
169
+ */
170
+ this.round = false;
171
+ /**
172
+ * Hide the actual button content and only display the icon.
173
+ */
174
+ this.iconOnly = false;
175
+ /**
176
+ * Display the icon on the right.
177
+ */
178
+ this.iconRight = false;
179
+ }
180
+ onIconOnlyChanged(value) {
181
+ var _a, _b;
182
+ // teardown
183
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
184
+ (_a = this.mediaQueryList) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.mediaQueryListener);
185
+ this.mediaQueryList = undefined;
186
+ this.mediaQueryListener = undefined;
187
+ // setup
188
+ if (isBreakpoint(value)) {
189
+ (_b = this.mediaMatcher) !== null && _b !== void 0 ? _b : (this.mediaMatcher = new MediaMatcher());
190
+ this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);
191
+ this.mediaQueryListener = (event) => (this._iconOnly = event.matches);
192
+ this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
193
+ this._iconOnly = this.mediaQueryList.matches;
194
+ }
195
+ else {
196
+ this._iconOnly = value;
197
+ }
198
+ }
199
+ componentWillLoad() {
200
+ this.onIconOnlyChanged(this.iconOnly);
201
+ }
202
+ componentWillRender() {
203
+ if (this.isIconButton && !this.a11yLabel) {
204
+ loglevel.loglevel.warn('[A11y] Missing ARIA label on icon button', this);
205
+ }
206
+ }
207
+ haltDisabledEvents(event) {
208
+ if (this.disabled || this.loading) {
209
+ event.preventDefault();
210
+ event.stopImmediatePropagation();
211
+ }
212
+ }
213
+ /**
214
+ * Sets focus on the button. Use this method instead of `button.focus()`.
215
+ *
216
+ * @param options An optional object providing options to control aspects of
217
+ * the focusing process.
218
+ */
219
+ async setFocus(options) {
220
+ this.button.focus(options);
221
+ }
222
+ render() {
223
+ var _a;
224
+ if (this.url) {
225
+ return (index.h("a", { ref: el => (this.button = el), href: this.disabled ? undefined : this.url, target: this.urlTarget, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, id: this.buttonId, part: "button", class: {
226
+ 'cat-button': true,
227
+ 'cat-button-icon': this.isIconButton,
228
+ 'cat-button-round': this.round,
229
+ 'cat-button-loading': this.loading,
230
+ 'cat-button-disabled': this.disabled,
231
+ 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,
232
+ [`cat-button-${this.variant}`]: Boolean(this.variant),
233
+ [`cat-button-${this.color}`]: Boolean(this.color),
234
+ [`cat-button-${this.size}`]: Boolean(this.size)
235
+ }, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
236
+ }
237
+ else {
238
+ return (index.h("button", { ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, id: this.buttonId, part: "button", class: {
239
+ 'cat-button': true,
240
+ 'cat-button-active': this.active,
241
+ 'cat-button-icon': this.isIconButton,
242
+ 'cat-button-round': (_a = this.round) !== null && _a !== void 0 ? _a : this.isIconButton,
243
+ 'cat-button-loading': this.loading,
244
+ 'cat-button-disabled': this.disabled,
245
+ 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,
246
+ [`cat-button-${this.variant}`]: Boolean(this.variant),
247
+ [`cat-button-${this.color}`]: Boolean(this.color),
248
+ [`cat-button-${this.size}`]: Boolean(this.size)
249
+ }, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
250
+ }
251
+ }
252
+ get iconSize() {
253
+ switch (this.size) {
254
+ case 'xs':
255
+ return 's';
256
+ default:
257
+ return 'l';
258
+ }
259
+ }
260
+ get spinnerSize() {
261
+ switch (this.size) {
262
+ case 'xs':
263
+ return 'xs';
264
+ default:
265
+ return 'm';
266
+ }
267
+ }
268
+ get isIconButton() {
269
+ return Boolean(this.icon) && this._iconOnly;
270
+ }
271
+ get hasPrefixIcon() {
272
+ return Boolean(this.icon) && !this._iconOnly && !this.iconRight;
273
+ }
274
+ get hasSuffixIcon() {
275
+ return Boolean(this.icon) && !this._iconOnly && this.iconRight;
276
+ }
277
+ get content() {
278
+ return [
279
+ this.hasPrefixIcon ? (index.h("cat-icon", { icon: this.icon, size: this.iconSize, class: "cat-button-prefix", part: "prefix" })) : null,
280
+ this.isIconButton ? (index.h("cat-icon", { icon: this.icon, size: this.iconSize })) : (index.h("span", { class: "cat-button-content", part: "content" }, index.h("slot", null))),
281
+ this.hasSuffixIcon ? (index.h("cat-icon", { icon: this.icon, size: this.iconSize, class: "cat-button-suffix", part: "suffix" })) : null,
282
+ this.loading ? index.h("cat-spinner", { size: this.spinnerSize }) : null
283
+ ];
284
+ }
285
+ onClick(event) {
286
+ this.catClick.emit(event);
287
+ }
288
+ onFocus(event) {
289
+ this.catFocus.emit(event);
290
+ }
291
+ onBlur(event) {
292
+ this.catBlur.emit(event);
293
+ }
294
+ static get watchers() { return {
295
+ "iconOnly": ["onIconOnlyChanged"]
296
+ }; }
297
+ };
298
+ CatButton.style = catButtonCss;
299
+
300
+ exports.cat_button = CatButton;
301
+
302
+ //# sourceMappingURL=cat-button.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cat-button.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,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AAa,IAChBA,sBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,QAAQ,GAAY,IACjG,IAAI;MACR,IAAI,CAAC,YAAY,IACfA,sBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAa,KAE3DA,kBAAM,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,SAAS,IAC7CA,qBAAa,CACR,CACR;MACD,IAAI,CAAC,aAAa,IAChBA,sBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,QAAQ,GAAY,IACjG,IAAI;MACR,IAAI,CAAC,OAAO,GAAGA,yBAAa,IAAI,EAAE,IAAI,CAAC,WAAW,GAAgB,GAAG,IAAI;KAC1E,CAAC;GACH;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3B;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3B;EAEO,MAAM,CAAC,KAAiB;IAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC1B;;;;;;;;;","names":["log","h"],"sources":["./src/utils/breakpoints.ts","./src/utils/platform.ts","./src/utils/media-matcher.ts","./src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","./src/components/cat-button/cat-button.tsx"],"sourcesContent":["const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = typeof _breakpoints[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-button {\n position: relative;\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition: color cat-token('time.transition.s') linear, border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear, box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n // flex: 1 1 auto;\n // text-align: center;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n @include cat-disabled;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.05);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: $cat-link-text-decoration;\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: $cat-link-text-decoration-hover;\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n $-total-height: cat-size($size);\n\n .cat-button-#{$size} {\n min-width: cat-size($size);\n padding: ($-total-height - $-line-height) * 0.5 $padding;\n @include cat-body($fontSize);\n\n .cat-button-prefix {\n margin-right: 0.25rem;\n }\n\n .cat-button-suffix {\n margin-left: 0.25rem;\n }\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n padding-left: 0;\n padding-right: 0;\n }\n\n :host-context(nav) & {\n padding-left: $cat-nav-padding-horizontal;\n padding-right: $cat-nav-padding-horizontal;\n }\n }\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// -- active state\n\n.cat-button-active::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 0.25rem;\n height: 100%;\n background: cat-token-wrap(var(--base));\n}\n\n// ----- context\n\n:host-context(nav) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n border-radius: 0;\n justify-content: left;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n}\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions. Primary style should be used only\n * once per view for main call-to-action.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'secondary';\n\n /**\n * Show an active status indicator on the left side of the button.\n */\n @Prop() active = false;\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Ellipse overflowing button content.\n */\n @Prop() ellipsed = true;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter<MouseEvent>;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n componentWillRender(): void {\n if (this.isIconButton && !this.a11yLabel) {\n log.warn('[A11y] Missing ARIA label on icon button', this);\n }\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Sets focus on the button. Use this method instead of `button.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.button.focus(options);\n }\n\n render() {\n if (this.url) {\n return (\n <a\n ref={el => (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n </a>\n );\n } else {\n return (\n <button\n ref={el => (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n </button>\n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconRight;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconRight;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? (\n <cat-icon icon={this.icon} size={this.iconSize} class=\"cat-button-prefix\" part=\"prefix\"></cat-icon>\n ) : null,\n this.isIconButton ? (\n <cat-icon icon={this.icon} size={this.iconSize}></cat-icon>\n ) : (\n <span class=\"cat-button-content\" part=\"content\">\n <slot></slot>\n </span>\n ),\n this.hasSuffixIcon ? (\n <cat-icon icon={this.icon} size={this.iconSize} class=\"cat-button-suffix\" part=\"suffix\"></cat-icon>\n ) : null,\n this.loading ? <cat-spinner size={this.spinnerSize}></cat-spinner> : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.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"],"version":3}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-abcb3941.js');
6
+
7
+ const catCardCss = ":host{display:block;margin-bottom:1rem;border-radius:0.5rem;background-color:white;box-shadow:inset 0 0 0 1px #ebecf0;padding:1.5rem}:host([hidden]){display:none}::slotted(nav){margin:-1rem -1.5rem !important}::slotted(:last-child){margin-bottom:0}";
8
+
9
+ const CatCard = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h(index.Host, null, index.h("slot", null)));
15
+ }
16
+ };
17
+ CatCard.style = catCardCss;
18
+
19
+ exports.cat_card = CatCard;
20
+
21
+ //# sourceMappingURL=cat-card.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cat-card.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,0PAA0P;;MCWhQ,OAAO;;;;EAClB,MAAM;IACJ,QACEA,QAACC,UAAI,QACHD,qBAAa,CACR,EACP;GACH;;;;;;","names":["h","Host"],"sources":["./src/components/cat-card/cat-card.scss?tag=cat-card&encapsulation=shadow","./src/components/cat-card/cat-card.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n$-padding: 1.5rem;\n\n:host {\n display: block;\n margin-bottom: $cat-body-margin-bottom;\n border-radius: cat-border-radius('l');\n background-color: cat-token('color.ui.background.body');\n box-shadow: inset 0 0 0 1px cat-token('color.ui.border.default');\n padding: $-padding;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(nav) {\n margin: #{$cat-body-margin-bottom * 0.5 - $-padding} #{-$-padding} !important;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * Cards are surfaces that display content and actions on a single topic. They\n * should be easy to scan for relevant and actionable information.\n */\n@Component({\n tag: 'cat-card',\n styleUrl: 'cat-card.scss',\n shadow: true\n})\nexport class CatCard {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-abcb3941.js');
6
+ const loglevel = require('./loglevel-24040e9d.js');
7
+
8
+ const catCheckboxCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid #d7dbe0;border-radius:0.125rem;transition:background-color 0.13s ease, border-color 0.13s ease}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 0.13s ease;width:70%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
9
+
10
+ let nextUniqueId = 0;
11
+ const CatCheckbox = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.catChange = index.createEvent(this, "catChange", 7);
15
+ this.catFocus = index.createEvent(this, "catFocus", 7);
16
+ this.catBlur = index.createEvent(this, "catBlur", 7);
17
+ this.id = `cat-checkbox-${nextUniqueId++}`;
18
+ /**
19
+ * Checked state of the checkbox
20
+ */
21
+ this.checked = false;
22
+ /**
23
+ * Disabled state of the checkbox
24
+ */
25
+ this.disabled = false;
26
+ /**
27
+ * Indeterminate state of the checkbox
28
+ */
29
+ this.indeterminate = false;
30
+ /**
31
+ * Label of the checkbox which is presented in the UI
32
+ */
33
+ this.label = '';
34
+ /**
35
+ * Visually hide the label, but still show it to assistive technologies like screen readers.
36
+ */
37
+ this.labelHidden = false;
38
+ /**
39
+ * Required state of the checkbox
40
+ */
41
+ this.required = false;
42
+ }
43
+ componentDidLoad() {
44
+ if (this.input && this.indeterminate) {
45
+ this.input.indeterminate = true;
46
+ }
47
+ }
48
+ componentWillRender() {
49
+ if (!this.label) {
50
+ loglevel.loglevel.error('[A11y] Missing ARIA label on checkbox', this);
51
+ }
52
+ }
53
+ /**
54
+ * Sets focus on the checkbox. Use this method instead of `checkbox.focus()`.
55
+ *
56
+ * @param options An optional object providing options to control aspects of
57
+ * the focusing process.
58
+ */
59
+ async setFocus(options) {
60
+ this.input.focus(options);
61
+ }
62
+ render() {
63
+ return (index.h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, index.h("input", { ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), index.h("span", { class: "box", "aria-hidden": "true", part: "checkbox" }, index.h("svg", { class: "check", viewBox: "0 0 12 10" }, index.h("polyline", { points: "1.5 6 4.5 9 10.5 1" })), index.h("svg", { class: "dash", viewBox: "0 0 12 10" }, index.h("polyline", { points: "1.5 5 10.5 5" }))), index.h("span", { class: "label", part: "label" }, this.label)));
64
+ }
65
+ onInput(event) {
66
+ this.catChange.emit(event);
67
+ }
68
+ onFocus(event) {
69
+ this.catFocus.emit(event);
70
+ }
71
+ onBlur(event) {
72
+ this.catBlur.emit(event);
73
+ }
74
+ };
75
+ CatCheckbox.style = catCheckboxCss;
76
+
77
+ exports.cat_checkbox = CatCheckbox;
78
+
79
+ //# sourceMappingURL=cat-checkbox.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cat-checkbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,yxDAAyxD;;ACGhzD,IAAI,YAAY,GAAG,CAAC,CAAC;MAcR,WAAW;EALxB;;;;;IAMmB,OAAE,GAAG,gBAAgB,YAAY,EAAE,EAAE,CAAC;;;;IAM/C,YAAO,GAAG,KAAK,CAAC;;;;IAKhB,aAAQ,GAAG,KAAK,CAAC;;;;IAKjB,kBAAa,GAAG,KAAK,CAAC;;;;IAKtB,UAAK,GAAG,EAAE,CAAC;;;;IAKX,gBAAW,GAAG,KAAK,CAAC;;;;IAUpB,aAAQ,GAAG,KAAK,CAAC;GAuF1B;EAjEC,gBAAgB;IACd,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,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nCA,sBAAU,MAAM,EAAC,cAAc,GAAY,CACvC,CACD,EACPA,kBAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IAC7B,IAAI,CAAC,KAAK,CACN,CACD,EACR;GACH;EAEO,OAAO,CAAC,KAAY;IAC1B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC5B;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3B;EAEO,MAAM,CAAC,KAAiB;IAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC1B;;;;;;","names":["log","h"],"sources":["./src/components/cat-checkbox/cat-checkbox.scss?tag=cat-checkbox&encapsulation=shadow","./src/components/cat-checkbox/cat-checkbox.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: flex;\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n}\n\ninput {\n @include cat-visually-hidden;\n}\n\n.box {\n flex: 0 0 auto;\n display: flex;\n position: relative;\n height: 1.25rem;\n width: 1.25rem;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.input');\n border-radius: cat-border-radius(s);\n transition: background-color cat-token('time.transition.s') ease, border-color cat-token('time.transition.s') ease;\n\n svg {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 16px;\n stroke-dashoffset: 16px;\n transition: all cat-token('time.transition.s') ease;\n width: 70%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.99);\n }\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 0;\n }\n }\n\n :indeterminate + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .dash {\n stroke-dashoffset: 0;\n }\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.label {\n flex: 1 1 auto;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Event, EventEmitter, h, Method, Prop } from '@stencil/core';\nimport log from 'loglevel';\n\nlet nextUniqueId = 0;\n\n/**\n * Checkboxes are used to let a user choose one or more options from a limited\n * number of options.\n *\n * @part checkbox - The checkbox element.\n * @part label - The label content.\n */\n@Component({\n tag: 'cat-checkbox',\n styleUrls: ['cat-checkbox.scss'],\n shadow: true\n})\nexport class CatCheckbox {\n private readonly id = `cat-checkbox-${nextUniqueId++}`;\n private input!: HTMLInputElement;\n\n /**\n * Checked state of the checkbox\n */\n @Prop() checked = false;\n\n /**\n * Disabled state of the checkbox\n */\n @Prop() disabled = false;\n\n /**\n * Indeterminate state of the checkbox\n */\n @Prop() indeterminate = false;\n\n /**\n * Label of the checkbox which is presented in the UI\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 * The name of the input\n */\n @Prop() name?: string;\n\n /**\n * Required state of the checkbox\n */\n @Prop() required = false;\n\n /**\n * The value of the checkbox\n */\n @Prop() value?: string;\n\n /**\n * Emitted when the checked status of the checkbox is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the checkbox received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentDidLoad() {\n if (this.input && this.indeterminate) {\n this.input.indeterminate = true;\n }\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.error('[A11y] Missing ARIA label on checkbox', this);\n }\n }\n\n /**\n * Sets focus on the checkbox. Use this method instead of `checkbox.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 render() {\n return (\n <label htmlFor={this.id} class={{ 'is-hidden': this.labelHidden, 'is-disabled': this.disabled }}>\n <input\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n />\n <span class=\"box\" aria-hidden=\"true\" part=\"checkbox\">\n <svg class=\"check\" viewBox=\"0 0 12 10\">\n <polyline points=\"1.5 6 4.5 9 10.5 1\"></polyline>\n </svg>\n <svg class=\"dash\" viewBox=\"0 0 12 10\">\n <polyline points=\"1.5 5 10.5 5\"></polyline>\n </svg>\n </span>\n <span class=\"label\" part=\"label\">\n {this.label}\n </span>\n </label>\n );\n }\n\n private onInput(event: Event) {\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"],"version":3}