@haiilo/catalyst 11.0.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/index.esm.js +2 -2
  4. package/dist/catalyst/index.esm.js.map +1 -1
  5. package/dist/catalyst/loader.esm.js.map +1 -0
  6. package/dist/catalyst/p-6a54965a.entry.js +10 -0
  7. package/dist/catalyst/p-6a54965a.entry.js.map +1 -0
  8. package/dist/catalyst/p-B-m4GNf1.js +3 -0
  9. package/dist/catalyst/p-B-m4GNf1.js.map +1 -0
  10. package/dist/catalyst/p-DQuL1Twl.js +2 -0
  11. package/dist/catalyst/p-DQuL1Twl.js.map +1 -0
  12. package/dist/catalyst/p-LJZzaWFR.js +2 -0
  13. package/dist/catalyst/p-LJZzaWFR.js.map +1 -0
  14. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  15. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  16. package/dist/cjs/cat-alert_30.cjs.entry.js +1467 -1833
  17. package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
  18. package/dist/cjs/catalyst.cjs.js +8 -7
  19. package/dist/cjs/catalyst.cjs.js.map +1 -1
  20. package/dist/cjs/index-DNLT6JC9.js +10178 -0
  21. package/dist/cjs/index-DNLT6JC9.js.map +1 -0
  22. package/dist/cjs/{index-1094f0fc.js → index-jGQAsDy6.js} +528 -358
  23. package/dist/cjs/index-jGQAsDy6.js.map +1 -0
  24. package/dist/cjs/index.cjs.js +461 -453
  25. package/dist/cjs/index.cjs.js.map +1 -1
  26. package/dist/cjs/loader.cjs.js +4 -5
  27. package/dist/cjs/loader.cjs.js.map +1 -1
  28. package/dist/collection/collection-manifest.json +2 -2
  29. package/dist/collection/components/cat-alert/cat-alert.js +15 -4
  30. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  31. package/dist/collection/components/cat-avatar/cat-avatar.js +33 -14
  32. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
  33. package/dist/collection/components/cat-badge/cat-badge.js +45 -9
  34. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  35. package/dist/collection/components/cat-button/cat-button.css +4 -2
  36. package/dist/collection/components/cat-button/cat-button.js +107 -35
  37. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  38. package/dist/collection/components/cat-button-group/cat-button-group.js +3 -2
  39. package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
  40. package/dist/collection/components/cat-checkbox/cat-checkbox.js +83 -24
  41. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  42. package/dist/collection/components/cat-date/cat-date.js +114 -39
  43. package/dist/collection/components/cat-date/cat-date.js.map +1 -1
  44. package/dist/collection/components/cat-date-inline/cat-date-inline.js +69 -19
  45. package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
  46. package/dist/collection/components/cat-datepicker/cat-datepicker.js +130 -42
  47. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  48. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +37 -12
  49. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
  50. package/dist/collection/components/cat-dropdown/cat-dropdown.js +129 -17
  51. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  52. package/dist/collection/components/cat-form-group/cat-form-group.js +19 -4
  53. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  54. package/dist/collection/components/cat-icon/cat-icon.js +15 -7
  55. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  56. package/dist/collection/components/cat-input/cat-input.js +143 -51
  57. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  58. package/dist/collection/components/cat-pagination/cat-pagination.js +60 -10
  59. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  60. package/dist/collection/components/cat-radio/cat-radio.js +65 -18
  61. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  62. package/dist/collection/components/cat-radio-group/cat-radio-group.js +21 -8
  63. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  64. package/dist/collection/components/cat-scrollable/cat-scrollable.js +32 -7
  65. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  66. package/dist/collection/components/cat-select/cat-select.js +105 -34
  67. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  68. package/dist/collection/components/cat-skeleton/cat-skeleton.js +22 -5
  69. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  70. package/dist/collection/components/cat-spinner/cat-spinner.js +15 -4
  71. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  72. package/dist/collection/components/cat-tab/cat-tab.js +84 -17
  73. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  74. package/dist/collection/components/cat-tabs/cat-tabs.css +29 -12
  75. package/dist/collection/components/cat-tabs/cat-tabs.js +189 -8
  76. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  77. package/dist/collection/components/cat-tag/cat-tag.js +84 -25
  78. package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
  79. package/dist/collection/components/cat-textarea/cat-textarea.js +90 -32
  80. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  81. package/dist/collection/components/cat-time/cat-time.js +120 -39
  82. package/dist/collection/components/cat-time/cat-time.js.map +1 -1
  83. package/dist/collection/components/cat-toggle/cat-toggle.js +71 -22
  84. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  85. package/dist/collection/components/cat-tooltip/cat-tooltip.js +49 -8
  86. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  87. package/dist/components/cat-alert.js +8 -3
  88. package/dist/components/cat-alert.js.map +1 -1
  89. package/dist/components/cat-avatar.js +1 -0
  90. package/dist/components/cat-avatar2.js +11 -8
  91. package/dist/components/cat-avatar2.js.map +1 -1
  92. package/dist/components/cat-badge.js +23 -3
  93. package/dist/components/cat-badge.js.map +1 -1
  94. package/dist/components/cat-button-group.js +2 -3
  95. package/dist/components/cat-button-group.js.map +1 -1
  96. package/dist/components/cat-button.js +1 -0
  97. package/dist/components/cat-button2.js +41 -17
  98. package/dist/components/cat-button2.js.map +1 -1
  99. package/dist/components/cat-card.js +2 -2
  100. package/dist/components/cat-card.js.map +1 -1
  101. package/dist/components/cat-checkbox.js +1 -0
  102. package/dist/components/cat-checkbox2.js +34 -10
  103. package/dist/components/cat-checkbox2.js.map +1 -1
  104. package/dist/components/cat-date-inline.js +1 -0
  105. package/dist/components/cat-date-inline2.js +29 -7
  106. package/dist/components/cat-date-inline2.js.map +1 -1
  107. package/dist/components/cat-date.js +41 -17
  108. package/dist/components/cat-date.js.map +1 -1
  109. package/dist/components/cat-datepicker-inline.js +16 -8
  110. package/dist/components/cat-datepicker-inline.js.map +1 -1
  111. package/dist/components/cat-datepicker.js +50 -20
  112. package/dist/components/cat-datepicker.js.map +1 -1
  113. package/dist/components/cat-datepicker.locale.js +110 -99
  114. package/dist/components/cat-datepicker.locale.js.map +1 -1
  115. package/dist/components/cat-dropdown.js +1 -0
  116. package/dist/components/cat-dropdown2.js +70 -13
  117. package/dist/components/cat-dropdown2.js.map +1 -1
  118. package/dist/components/cat-form-group.js +12 -3
  119. package/dist/components/cat-form-group.js.map +1 -1
  120. package/dist/components/cat-form-hint.js +1 -0
  121. package/dist/components/cat-form-hint.js.map +1 -1
  122. package/dist/components/cat-i18n-registry.js +1 -0
  123. package/dist/components/cat-i18n-registry.js.map +1 -1
  124. package/dist/components/cat-icon-registry.js +22 -21
  125. package/dist/components/cat-icon-registry.js.map +1 -1
  126. package/dist/components/cat-icon.js +1 -0
  127. package/dist/components/cat-icon2.js +5 -5
  128. package/dist/components/cat-icon2.js.map +1 -1
  129. package/dist/components/cat-input.js +1 -0
  130. package/dist/components/cat-input2.js +50 -25
  131. package/dist/components/cat-input2.js.map +1 -1
  132. package/dist/components/cat-pagination.js +32 -2
  133. package/dist/components/cat-pagination.js.map +1 -1
  134. package/dist/components/cat-radio-group.js +8 -5
  135. package/dist/components/cat-radio-group.js.map +1 -1
  136. package/dist/components/cat-radio.js +28 -8
  137. package/dist/components/cat-radio.js.map +1 -1
  138. package/dist/components/cat-scrollable.js +1 -0
  139. package/dist/components/cat-scrollable2.js +322 -542
  140. package/dist/components/cat-scrollable2.js.map +1 -1
  141. package/dist/components/cat-select-demo.js +27 -49
  142. package/dist/components/cat-select-demo.js.map +1 -1
  143. package/dist/components/cat-select.js +1 -0
  144. package/dist/components/cat-select2.js +135 -316
  145. package/dist/components/cat-select2.js.map +1 -1
  146. package/dist/components/cat-skeleton.js +1 -0
  147. package/dist/components/cat-skeleton2.js +12 -3
  148. package/dist/components/cat-skeleton2.js.map +1 -1
  149. package/dist/components/cat-spinner.js +1 -0
  150. package/dist/components/cat-spinner2.js +8 -3
  151. package/dist/components/cat-spinner2.js.map +1 -1
  152. package/dist/components/cat-tab.js +34 -9
  153. package/dist/components/cat-tab.js.map +1 -1
  154. package/dist/components/cat-tabs.js +140 -11
  155. package/dist/components/cat-tabs.js.map +1 -1
  156. package/dist/components/cat-tag.js +35 -13
  157. package/dist/components/cat-tag.js.map +1 -1
  158. package/dist/components/cat-textarea.js +33 -16
  159. package/dist/components/cat-textarea.js.map +1 -1
  160. package/dist/components/cat-time.js +44 -16
  161. package/dist/components/cat-time.js.map +1 -1
  162. package/dist/components/cat-toggle.js +28 -10
  163. package/dist/components/cat-toggle.js.map +1 -1
  164. package/dist/components/cat-tooltip.js +28 -3
  165. package/dist/components/cat-tooltip.js.map +1 -1
  166. package/dist/components/coerce.js +1 -0
  167. package/dist/components/coerce.js.map +1 -1
  168. package/dist/components/first-tabbable.js +1 -0
  169. package/dist/components/first-tabbable.js.map +1 -1
  170. package/dist/components/{floating-ui.dom.esm.js → floating-ui.dom.js} +3 -492
  171. package/dist/components/floating-ui.dom.js.map +1 -0
  172. package/dist/components/index.js +460 -450
  173. package/dist/components/index.js.map +1 -1
  174. package/dist/components/index2.js +9456 -0
  175. package/dist/components/index2.js.map +1 -0
  176. package/dist/components/loglevel.js +368 -356
  177. package/dist/components/loglevel.js.map +1 -1
  178. package/dist/components/media-matcher.js +1 -0
  179. package/dist/components/media-matcher.js.map +1 -1
  180. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  181. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  182. package/dist/esm/cat-alert_30.entry.js +1428 -1792
  183. package/dist/esm/cat-alert_30.entry.js.map +1 -1
  184. package/dist/esm/catalyst.js +7 -5
  185. package/dist/esm/catalyst.js.map +1 -1
  186. package/dist/esm/{index-e8c0ddf2.js → index-B-m4GNf1.js} +528 -338
  187. package/dist/esm/index-B-m4GNf1.js.map +1 -0
  188. package/dist/esm/index-LJZzaWFR.js +10057 -0
  189. package/dist/esm/index-LJZzaWFR.js.map +1 -0
  190. package/dist/esm/index.js +458 -448
  191. package/dist/esm/index.js.map +1 -1
  192. package/dist/esm/loader.js +5 -4
  193. package/dist/esm/loader.js.map +1 -1
  194. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +11 -1
  195. package/dist/types/components/cat-tab/cat-tab.d.ts +6 -0
  196. package/dist/types/components/cat-tabs/cat-tabs.d.ts +18 -0
  197. package/dist/types/components.d.ts +46 -0
  198. package/dist/types/stencil-public-runtime.d.ts +28 -2
  199. package/loader/index.d.ts +3 -0
  200. package/package.json +3 -3
  201. package/dist/catalyst/p-59e2ada2.entry.js +0 -10
  202. package/dist/catalyst/p-59e2ada2.entry.js.map +0 -1
  203. package/dist/catalyst/p-7f3bcfb9.js +0 -3
  204. package/dist/catalyst/p-7f3bcfb9.js.map +0 -1
  205. package/dist/catalyst/p-9500d6fb.js +0 -2
  206. package/dist/catalyst/p-9500d6fb.js.map +0 -1
  207. package/dist/catalyst/p-e1255160.js +0 -2
  208. package/dist/catalyst/p-e1255160.js.map +0 -1
  209. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  210. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  211. package/dist/cjs/index-1094f0fc.js.map +0 -1
  212. package/dist/cjs/of-958251e4.js +0 -1549
  213. package/dist/cjs/of-958251e4.js.map +0 -1
  214. package/dist/collection/components/cat-alert/cat-alert.e2e.js +0 -11
  215. package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +0 -1
  216. package/dist/collection/components/cat-alert/cat-alert.spec.js +0 -14
  217. package/dist/collection/components/cat-alert/cat-alert.spec.js.map +0 -1
  218. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +0 -10
  219. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +0 -1
  220. package/dist/collection/components/cat-avatar/cat-avatar.spec.js +0 -14
  221. package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +0 -1
  222. package/dist/collection/components/cat-badge/cat-badge.e2e.js +0 -10
  223. package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +0 -1
  224. package/dist/collection/components/cat-badge/cat-badge.spec.js +0 -14
  225. package/dist/collection/components/cat-badge/cat-badge.spec.js.map +0 -1
  226. package/dist/collection/components/cat-button/cat-button.e2e.js +0 -10
  227. package/dist/collection/components/cat-button/cat-button.e2e.js.map +0 -1
  228. package/dist/collection/components/cat-button/cat-button.spec.js +0 -20
  229. package/dist/collection/components/cat-button/cat-button.spec.js.map +0 -1
  230. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +0 -10
  231. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +0 -1
  232. package/dist/collection/components/cat-button-group/cat-button-group.spec.js +0 -14
  233. package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +0 -1
  234. package/dist/collection/components/cat-card/cat-card.e2e.js +0 -10
  235. package/dist/collection/components/cat-card/cat-card.e2e.js.map +0 -1
  236. package/dist/collection/components/cat-card/cat-card.spec.js +0 -14
  237. package/dist/collection/components/cat-card/cat-card.spec.js.map +0 -1
  238. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +0 -10
  239. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +0 -1
  240. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +0 -14
  241. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +0 -1
  242. package/dist/collection/components/cat-date/cat-date.e2e.js +0 -11
  243. package/dist/collection/components/cat-date/cat-date.e2e.js.map +0 -1
  244. package/dist/collection/components/cat-date/cat-date.spec.js +0 -17
  245. package/dist/collection/components/cat-date/cat-date.spec.js.map +0 -1
  246. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js +0 -11
  247. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js.map +0 -1
  248. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js +0 -16
  249. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js.map +0 -1
  250. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +0 -11
  251. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +0 -1
  252. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +0 -15
  253. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +0 -1
  254. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +0 -11
  255. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +0 -1
  256. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +0 -15
  257. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +0 -1
  258. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +0 -10
  259. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +0 -1
  260. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +0 -21
  261. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +0 -1
  262. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +0 -10
  263. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +0 -1
  264. package/dist/collection/components/cat-form-group/cat-form-group.spec.js +0 -14
  265. package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +0 -1
  266. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +0 -15
  267. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +0 -1
  268. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +0 -7
  269. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +0 -1
  270. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +0 -7
  271. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +0 -1
  272. package/dist/collection/components/cat-icon/cat-icon.e2e.js +0 -11
  273. package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +0 -1
  274. package/dist/collection/components/cat-icon/cat-icon.spec.js +0 -15
  275. package/dist/collection/components/cat-icon/cat-icon.spec.js.map +0 -1
  276. package/dist/collection/components/cat-input/cat-input.e2e.js +0 -11
  277. package/dist/collection/components/cat-input/cat-input.e2e.js.map +0 -1
  278. package/dist/collection/components/cat-input/cat-input.spec.js +0 -15
  279. package/dist/collection/components/cat-input/cat-input.spec.js.map +0 -1
  280. package/dist/collection/components/cat-notification/cat-notification.spec.js +0 -7
  281. package/dist/collection/components/cat-notification/cat-notification.spec.js.map +0 -1
  282. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +0 -14
  283. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +0 -1
  284. package/dist/collection/components/cat-pagination/cat-pagination.spec.js +0 -15
  285. package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +0 -1
  286. package/dist/collection/components/cat-radio/cat-radio.e2e.js +0 -10
  287. package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +0 -1
  288. package/dist/collection/components/cat-radio/cat-radio.spec.js +0 -14
  289. package/dist/collection/components/cat-radio/cat-radio.spec.js.map +0 -1
  290. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +0 -10
  291. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +0 -1
  292. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +0 -14
  293. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +0 -1
  294. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +0 -10
  295. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +0 -1
  296. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +0 -14
  297. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +0 -1
  298. package/dist/collection/components/cat-select/cat-select.e2e.js +0 -14
  299. package/dist/collection/components/cat-select/cat-select.e2e.js.map +0 -1
  300. package/dist/collection/components/cat-select/cat-select.spec.js +0 -15
  301. package/dist/collection/components/cat-select/cat-select.spec.js.map +0 -1
  302. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +0 -10
  303. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +0 -1
  304. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +0 -14
  305. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +0 -1
  306. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +0 -10
  307. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +0 -1
  308. package/dist/collection/components/cat-spinner/cat-spinner.spec.js +0 -18
  309. package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +0 -1
  310. package/dist/collection/components/cat-tab/cat-tab.e2e.js +0 -10
  311. package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +0 -1
  312. package/dist/collection/components/cat-tab/cat-tab.spec.js +0 -14
  313. package/dist/collection/components/cat-tab/cat-tab.spec.js.map +0 -1
  314. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +0 -10
  315. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +0 -1
  316. package/dist/collection/components/cat-tabs/cat-tabs.spec.js +0 -14
  317. package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +0 -1
  318. package/dist/collection/components/cat-tag/cat-tag.e2e.js +0 -14
  319. package/dist/collection/components/cat-tag/cat-tag.e2e.js.map +0 -1
  320. package/dist/collection/components/cat-tag/cat-tag.spec.js +0 -23
  321. package/dist/collection/components/cat-tag/cat-tag.spec.js.map +0 -1
  322. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +0 -11
  323. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +0 -1
  324. package/dist/collection/components/cat-textarea/cat-textarea.spec.js +0 -15
  325. package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +0 -1
  326. package/dist/collection/components/cat-time/cat-time.e2e.js +0 -11
  327. package/dist/collection/components/cat-time/cat-time.e2e.js.map +0 -1
  328. package/dist/collection/components/cat-time/cat-time.spec.js +0 -16
  329. package/dist/collection/components/cat-time/cat-time.spec.js.map +0 -1
  330. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +0 -10
  331. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +0 -1
  332. package/dist/collection/components/cat-toggle/cat-toggle.spec.js +0 -14
  333. package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +0 -1
  334. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +0 -10
  335. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +0 -1
  336. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +0 -20
  337. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +0 -1
  338. package/dist/collection/utils/media-matcher.spec.js +0 -39
  339. package/dist/collection/utils/media-matcher.spec.js.map +0 -1
  340. package/dist/components/floating-ui.dom.esm.js.map +0 -1
  341. package/dist/components/from.js +0 -928
  342. package/dist/components/from.js.map +0 -1
  343. package/dist/components/of.js +0 -10
  344. package/dist/components/of.js.map +0 -1
  345. package/dist/esm/app-globals-0f993ce5.js +0 -5
  346. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  347. package/dist/esm/index-e8c0ddf2.js.map +0 -1
  348. package/dist/esm/of-e4ec2eb4.js +0 -1523
  349. package/dist/esm/of-e4ec2eb4.js.map +0 -1
  350. package/loader/package.json +0 -11
@@ -5,17 +5,41 @@ let nextUniqueId = 0;
5
5
  */
6
6
  export class CatTab {
7
7
  constructor() {
8
+ /**
9
+ * The label of the tab.
10
+ */
8
11
  this.label = '';
9
- this.icon = undefined;
12
+ /**
13
+ * Hide the actual button content and only display the tab.
14
+ */
10
15
  this.iconOnly = false;
16
+ /**
17
+ * Display the icon on the right.
18
+ */
11
19
  this.iconRight = false;
12
- this.url = undefined;
13
- this.urlTarget = undefined;
20
+ /**
21
+ * Specifies that the tab should be deactivated.
22
+ */
14
23
  this.deactivated = false;
24
+ /**
25
+ * Specifies that the tab does not have an active state and thus cannot be
26
+ * activated. This does not mean, that the tab is deactivated. The tab can
27
+ * still be clicked and emit the `catClick` event. This is helpful if a tab
28
+ * should only trigger a click action (such as opening a modal).
29
+ */
15
30
  this.noActive = false;
31
+ /**
32
+ * Specifies that the tab is always visible in adaptive mode.
33
+ * Only the first sticky tab will be taken into account.
34
+ * Sticky has advantage on activeTabAlwaysVisible if there is no space to show both.
35
+ */
36
+ this.sticky = false;
37
+ /**
38
+ * Specifies that the tab content pane contains an error. This will color
39
+ * the tab in an error state and also switch to an error icon if an icon
40
+ * is specified.
41
+ */
16
42
  this.error = false;
17
- this.nativeAttributes = undefined;
18
- this.testId = undefined;
19
43
  }
20
44
  connectedCallback() {
21
45
  if (!this.hostElement.id) {
@@ -26,7 +50,7 @@ export class CatTab {
26
50
  this.catClick.emit(event);
27
51
  }
28
52
  render() {
29
- return h(Host, { key: '7ccaa08d91c8e490f380ba2bee37342e6a1d8ceb' });
53
+ return h(Host, { key: 'd74edadf291560111aff4a925b4147b377a24b63' });
30
54
  }
31
55
  static get is() { return "cat-tab"; }
32
56
  static get encapsulation() { return "shadow"; }
@@ -44,6 +68,7 @@ export class CatTab {
44
68
  return {
45
69
  "label": {
46
70
  "type": "string",
71
+ "attribute": "label",
47
72
  "mutable": false,
48
73
  "complexType": {
49
74
  "original": "string",
@@ -56,12 +81,14 @@ export class CatTab {
56
81
  "tags": [],
57
82
  "text": "The label of the tab."
58
83
  },
59
- "attribute": "label",
84
+ "getter": false,
85
+ "setter": false,
60
86
  "reflect": true,
61
87
  "defaultValue": "''"
62
88
  },
63
89
  "icon": {
64
90
  "type": "string",
91
+ "attribute": "icon",
65
92
  "mutable": false,
66
93
  "complexType": {
67
94
  "original": "string",
@@ -74,11 +101,13 @@ export class CatTab {
74
101
  "tags": [],
75
102
  "text": "The name of an icon to be displayed in the tab."
76
103
  },
77
- "attribute": "icon",
104
+ "getter": false,
105
+ "setter": false,
78
106
  "reflect": true
79
107
  },
80
108
  "iconOnly": {
81
109
  "type": "any",
110
+ "attribute": "icon-only",
82
111
  "mutable": false,
83
112
  "complexType": {
84
113
  "original": "boolean | Breakpoint",
@@ -97,12 +126,14 @@ export class CatTab {
97
126
  "tags": [],
98
127
  "text": "Hide the actual button content and only display the tab."
99
128
  },
100
- "attribute": "icon-only",
129
+ "getter": false,
130
+ "setter": false,
101
131
  "reflect": true,
102
132
  "defaultValue": "false"
103
133
  },
104
134
  "iconRight": {
105
135
  "type": "boolean",
136
+ "attribute": "icon-right",
106
137
  "mutable": false,
107
138
  "complexType": {
108
139
  "original": "boolean",
@@ -115,12 +146,14 @@ export class CatTab {
115
146
  "tags": [],
116
147
  "text": "Display the icon on the right."
117
148
  },
118
- "attribute": "icon-right",
149
+ "getter": false,
150
+ "setter": false,
119
151
  "reflect": true,
120
152
  "defaultValue": "false"
121
153
  },
122
154
  "url": {
123
155
  "type": "string",
156
+ "attribute": "url",
124
157
  "mutable": false,
125
158
  "complexType": {
126
159
  "original": "string",
@@ -133,11 +166,13 @@ export class CatTab {
133
166
  "tags": [],
134
167
  "text": "A destination to link to, rendered in the href attribute of a link."
135
168
  },
136
- "attribute": "url",
169
+ "getter": false,
170
+ "setter": false,
137
171
  "reflect": true
138
172
  },
139
173
  "urlTarget": {
140
174
  "type": "string",
175
+ "attribute": "url-target",
141
176
  "mutable": false,
142
177
  "complexType": {
143
178
  "original": "'_blank' | '_self'",
@@ -150,11 +185,13 @@ export class CatTab {
150
185
  "tags": [],
151
186
  "text": "Specifies where to open the linked document."
152
187
  },
153
- "attribute": "url-target",
188
+ "getter": false,
189
+ "setter": false,
154
190
  "reflect": true
155
191
  },
156
192
  "deactivated": {
157
193
  "type": "boolean",
194
+ "attribute": "deactivated",
158
195
  "mutable": false,
159
196
  "complexType": {
160
197
  "original": "boolean",
@@ -167,12 +204,14 @@ export class CatTab {
167
204
  "tags": [],
168
205
  "text": "Specifies that the tab should be deactivated."
169
206
  },
170
- "attribute": "deactivated",
207
+ "getter": false,
208
+ "setter": false,
171
209
  "reflect": true,
172
210
  "defaultValue": "false"
173
211
  },
174
212
  "noActive": {
175
213
  "type": "boolean",
214
+ "attribute": "no-active",
176
215
  "mutable": false,
177
216
  "complexType": {
178
217
  "original": "boolean",
@@ -185,12 +224,34 @@ export class CatTab {
185
224
  "tags": [],
186
225
  "text": "Specifies that the tab does not have an active state and thus cannot be\nactivated. This does not mean, that the tab is deactivated. The tab can\nstill be clicked and emit the `catClick` event. This is helpful if a tab\nshould only trigger a click action (such as opening a modal)."
187
226
  },
188
- "attribute": "no-active",
227
+ "getter": false,
228
+ "setter": false,
229
+ "reflect": true,
230
+ "defaultValue": "false"
231
+ },
232
+ "sticky": {
233
+ "type": "boolean",
234
+ "attribute": "sticky",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "boolean",
238
+ "resolved": "boolean",
239
+ "references": {}
240
+ },
241
+ "required": false,
242
+ "optional": false,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": "Specifies that the tab is always visible in adaptive mode.\nOnly the first sticky tab will be taken into account.\nSticky has advantage on activeTabAlwaysVisible if there is no space to show both."
246
+ },
247
+ "getter": false,
248
+ "setter": false,
189
249
  "reflect": true,
190
250
  "defaultValue": "false"
191
251
  },
192
252
  "error": {
193
253
  "type": "boolean",
254
+ "attribute": "error",
194
255
  "mutable": false,
195
256
  "complexType": {
196
257
  "original": "boolean",
@@ -203,12 +264,14 @@ export class CatTab {
203
264
  "tags": [],
204
265
  "text": "Specifies that the tab content pane contains an error. This will color\nthe tab in an error state and also switch to an error icon if an icon\nis specified."
205
266
  },
206
- "attribute": "error",
267
+ "getter": false,
268
+ "setter": false,
207
269
  "reflect": true,
208
270
  "defaultValue": "false"
209
271
  },
210
272
  "nativeAttributes": {
211
273
  "type": "unknown",
274
+ "attribute": "native-attributes",
212
275
  "mutable": false,
213
276
  "complexType": {
214
277
  "original": "{ [key: string]: string }",
@@ -220,10 +283,13 @@ export class CatTab {
220
283
  "docs": {
221
284
  "tags": [],
222
285
  "text": "Attributes that will be added to the native HTML button element"
223
- }
286
+ },
287
+ "getter": false,
288
+ "setter": false
224
289
  },
225
290
  "testId": {
226
291
  "type": "string",
292
+ "attribute": "test-id",
227
293
  "mutable": false,
228
294
  "complexType": {
229
295
  "original": "string",
@@ -236,7 +302,8 @@ export class CatTab {
236
302
  "tags": [],
237
303
  "text": "A unique identifier for the underlying native element that is used for\ntesting purposes. The attribute is added as `data-test` attribute and acts\nas a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`."
238
304
  },
239
- "attribute": "test-id",
305
+ "getter": false,
306
+ "setter": false,
240
307
  "reflect": false
241
308
  }
242
309
  };
@@ -1 +1 @@
1
- {"version":3,"file":"cat-tab.js","sourceRoot":"","sources":["../../../src/components/cat-tab/cat-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG/F,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;GAEG;AAMH,MAAM,OAAO,MAAM;;qBAMgB,EAAE;;wBAUuB,KAAK;yBAK1B,KAAK;;;2BAeH,KAAK;wBAQR,KAAK;qBAOR,KAAK;;;;IAmBtC,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,YAAY,EAAE,EAAE,CAAC;QACpD,CAAC;IACH,CAAC;IAGD,OAAO,CAAC,KAAiB;QACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,OAAO,EAAC,IAAI,sDAAQ,CAAC;IACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Event, EventEmitter, Listen, Host, Element } from '@stencil/core';\nimport { Breakpoint } from '../../utils/breakpoints';\n\nlet nextUniqueId = 0;\n\n/**\n * A single tab inside a tabs component.\n */\n@Component({\n tag: 'cat-tab',\n styleUrl: 'cat-tab.scss',\n shadow: true\n})\nexport class CatTab {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The label of the tab.\n */\n @Prop({ reflect: true }) label = '';\n\n /**\n * The name of an icon to be displayed in the tab.\n */\n @Prop({ reflect: true }) icon?: string;\n\n /**\n * Hide the actual button content and only display the tab.\n */\n @Prop({ reflect: true }) iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop({ reflect: true }) iconRight = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop({ reflect: true }) url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop({ reflect: true }) urlTarget?: '_blank' | '_self';\n\n /**\n * Specifies that the tab should be deactivated.\n */\n @Prop({ reflect: true }) deactivated = false;\n\n /**\n * Specifies that the tab does not have an active state and thus cannot be\n * activated. This does not mean, that the tab is deactivated. The tab can\n * still be clicked and emit the `catClick` event. This is helpful if a tab\n * should only trigger a click action (such as opening a modal).\n */\n @Prop({ reflect: true }) noActive = false;\n\n /**\n * Specifies that the tab content pane contains an error. This will color\n * the tab in an error state and also switch to an error icon if an icon\n * is specified.\n */\n @Prop({ reflect: true }) error = false;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * Emitted when tab is clicked.\n */\n @Event() catClick!: EventEmitter<MouseEvent>;\n\n connectedCallback() {\n if (!this.hostElement.id) {\n this.hostElement.id = `cat-tab-${nextUniqueId++}`;\n }\n }\n\n @Listen('click')\n onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"]}
1
+ {"version":3,"file":"cat-tab.js","sourceRoot":"","sources":["../../../src/components/cat-tab/cat-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG/F,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;GAEG;AAMH,MAAM,OAAO,MAAM;IALnB;QAQE;;WAEG;QACsB,UAAK,GAAG,EAAE,CAAC;QAOpC;;WAEG;QACsB,aAAQ,GAAyB,KAAK,CAAC;QAEhE;;WAEG;QACsB,cAAS,GAAG,KAAK,CAAC;QAY3C;;WAEG;QACsB,gBAAW,GAAG,KAAK,CAAC;QAE7C;;;;;WAKG;QACsB,aAAQ,GAAG,KAAK,CAAC;QAE1C;;;;WAIG;QACsB,WAAM,GAAG,KAAK,CAAC;QAExC;;;;WAIG;QACsB,UAAK,GAAG,KAAK,CAAC;KAiCxC;IAdC,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,YAAY,EAAE,EAAE,CAAC;QACpD,CAAC;IACH,CAAC;IAGD,OAAO,CAAC,KAAiB;QACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,OAAO,EAAC,IAAI,sDAAQ,CAAC;IACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Event, EventEmitter, Listen, Host, Element } from '@stencil/core';\nimport { Breakpoint } from '../../utils/breakpoints';\n\nlet nextUniqueId = 0;\n\n/**\n * A single tab inside a tabs component.\n */\n@Component({\n tag: 'cat-tab',\n styleUrl: 'cat-tab.scss',\n shadow: true\n})\nexport class CatTab {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The label of the tab.\n */\n @Prop({ reflect: true }) label = '';\n\n /**\n * The name of an icon to be displayed in the tab.\n */\n @Prop({ reflect: true }) icon?: string;\n\n /**\n * Hide the actual button content and only display the tab.\n */\n @Prop({ reflect: true }) iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop({ reflect: true }) iconRight = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop({ reflect: true }) url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop({ reflect: true }) urlTarget?: '_blank' | '_self';\n\n /**\n * Specifies that the tab should be deactivated.\n */\n @Prop({ reflect: true }) deactivated = false;\n\n /**\n * Specifies that the tab does not have an active state and thus cannot be\n * activated. This does not mean, that the tab is deactivated. The tab can\n * still be clicked and emit the `catClick` event. This is helpful if a tab\n * should only trigger a click action (such as opening a modal).\n */\n @Prop({ reflect: true }) noActive = false;\n\n /**\n * Specifies that the tab is always visible in adaptive mode.\n * Only the first sticky tab will be taken into account.\n * Sticky has advantage on activeTabAlwaysVisible if there is no space to show both.\n */\n @Prop({ reflect: true }) sticky = false;\n\n /**\n * Specifies that the tab content pane contains an error. This will color\n * the tab in an error state and also switch to an error icon if an icon\n * is specified.\n */\n @Prop({ reflect: true }) error = false;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * Emitted when tab is clicked.\n */\n @Event() catClick!: EventEmitter<MouseEvent>;\n\n connectedCallback() {\n if (!this.hostElement.id) {\n this.hostElement.id = `cat-tab-${nextUniqueId++}`;\n }\n }\n\n @Listen('click')\n onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"]}
@@ -25,7 +25,8 @@
25
25
  flex: 1 0 auto;
26
26
  }
27
27
 
28
- .cat-tab {
28
+ .cat-tab,
29
+ .cat-tab-more-button {
29
30
  display: inline-flex;
30
31
  flex-direction: column;
31
32
  align-items: center;
@@ -33,13 +34,8 @@
33
34
  position: relative;
34
35
  transition: none;
35
36
  }
36
- .cat-tab:first-of-type {
37
- margin-left: -0.75rem;
38
- }
39
- .cat-tab:last-of-type {
40
- margin-right: -0.75rem;
41
- }
42
- .cat-tab::after {
37
+ .cat-tab::after,
38
+ .cat-tab-more-button::after {
43
39
  opacity: 0;
44
40
  content: "";
45
41
  position: absolute;
@@ -49,16 +45,37 @@
49
45
  bottom: 0;
50
46
  height: 2px;
51
47
  }
52
- .cat-tab:hover::after {
48
+ .cat-tab:hover::after,
49
+ .cat-tab-more-button:hover::after {
53
50
  opacity: 0.25;
54
51
  }
55
- .cat-tab.cat-tab-active {
52
+ .cat-tab.cat-tab-active,
53
+ .cat-tab-more-button.cat-tab-active {
56
54
  font-weight: 700;
57
55
  color: rgb(var(--cat-primary-text-active, 2, 99, 113));
58
56
  }
57
+ .cat-tab.cat-tab-active::after,
58
+ .cat-tab-more-button.cat-tab-active::after {
59
+ opacity: 1;
60
+ }
61
+
62
+ .cat-tab:first-of-type {
63
+ margin-left: -0.75rem;
64
+ }
65
+ .cat-tab:last-of-type {
66
+ margin-right: -0.75rem;
67
+ }
59
68
  .cat-tab.cat-tab-error {
60
69
  color: rgb(var(--cat-danger-text-active, 174, 42, 10));
61
70
  }
62
- .cat-tab.cat-tab-active::after {
63
- opacity: 1;
71
+
72
+ nav ul {
73
+ list-style: none;
74
+ margin: 0;
75
+ padding: 0;
76
+ }
77
+
78
+ .cat-tab-list {
79
+ display: flex;
80
+ width: 100%;
64
81
  }
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { catI18nRegistry as i18n } from "../cat-i18n/cat-i18n-registry";
2
3
  /**
3
4
  * Tabs are used to display multiple panels to be contained within a single
4
5
  * window, using tabs as a navigational element.
@@ -8,9 +9,26 @@ import { Host, h } from "@stencil/core";
8
9
  */
9
10
  export class CatTabs {
10
11
  constructor() {
12
+ this.resizedObserver = new ResizeObserver(() => this.adjustAdaptiveTabs());
11
13
  this.tabs = [];
14
+ this.hiddenTabs = [];
15
+ /**
16
+ * The ID of the active tab.
17
+ */
12
18
  this.activeTab = '';
19
+ /**
20
+ * The alignment of the tabs.
21
+ */
13
22
  this.tabsAlign = 'left';
23
+ /**
24
+ * Whether the visible items change according to the available space. A 'More' button is used to reveal hidden items.
25
+ */
26
+ this.adaptive = false;
27
+ /**
28
+ * Whether the active tab should always be visible. Applied when adaptive is enabled.
29
+ * Has less priority than sticky if there is no space to show both.
30
+ */
31
+ this.activeTabAlwaysVisible = false;
14
32
  }
15
33
  componentWillLoad() {
16
34
  this.syncTabs();
@@ -22,6 +40,12 @@ export class CatTabs {
22
40
  attributes: true,
23
41
  subtree: true
24
42
  });
43
+ if (this.adaptive) {
44
+ this.resizedObserver.observe(this.hostElement);
45
+ requestAnimationFrame(() => {
46
+ this.adjustAdaptiveTabs();
47
+ });
48
+ }
25
49
  }
26
50
  disconnectedCallback() {
27
51
  this.mutationObserver?.disconnect();
@@ -58,19 +82,113 @@ export class CatTabs {
58
82
  async setActiveIndex(index) {
59
83
  this.activate(this.tabs[index]);
60
84
  }
85
+ /**
86
+ * Recalculates visible and hidden adaptive tabs.
87
+ */
88
+ async updateAdaptiveTabs() {
89
+ if (this.adaptive) {
90
+ this.adjustAdaptiveTabs();
91
+ }
92
+ }
61
93
  render() {
62
94
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
63
- return (h(Host, { key: '082aff7c37c19d3c4ac84a062067988e4f0ef889' }, this.tabs.map((tab) => {
64
- return (h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
95
+ return (h(Host, { key: '874b547102901311b51c66aace5a2f91f4d52bbb' }, h("div", { key: 'ab2ccbf398bdb5897c71762c9befe63f383a04db', role: "tablist", class: "cat-tab-list" }, this.tabs.map((tab, index) => {
96
+ return (h("cat-button", { buttonId: tab.id, part: "tab", class: {
65
97
  'cat-tab': true,
66
98
  'cat-tab-active': tab.id === this.activeTab,
67
- 'cat-tab-error': tab.error
68
- }, active: tab.id === this.activeTab, color: tab.error ? 'danger' : tab.id === this.activeTab ? 'primary' : 'secondary', variant: "text", icon: tab.icon ? (tab.error ? '$cat:input-error' : tab.icon) : undefined, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => this.click(tab), testId: tab.testId, nativeAttributes: { ...tab.nativeAttributes }, nativeContentAttributes: { 'data-text': tab.label }, "data-dropdown-no-close": true }, tab.label));
69
- }), h("slot", { key: '444aad05e4a51ba0d767b194c6e4074c55106995', name: "more" })));
99
+ 'cat-tab-error': tab.error,
100
+ 'cat-tab-sticky': tab.sticky
101
+ }, active: tab.id === this.activeTab, color: tab.error ? 'danger' : tab.id === this.activeTab ? 'primary' : 'secondary', variant: "text", icon: tab.icon ? (tab.error ? '$cat:input-error' : tab.icon) : undefined, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => this.click(tab), testId: tab.testId, nativeAttributes: {
102
+ ...tab.nativeAttributes,
103
+ role: 'tab',
104
+ 'aria-selected': String(tab.id === this.activeTab),
105
+ 'aria-setsize': String(this.tabs.length),
106
+ 'aria-posinset': String(index + 1)
107
+ }, nativeContentAttributes: { 'data-text': tab.label }, "data-dropdown-no-close": true }, tab.label));
108
+ }), this.adaptive ? (h("cat-dropdown", { ref: el => (this.moreDropdown = el) }, h("cat-button", { ref: el => (this.moreButton = el), class: {
109
+ 'cat-tab-more-button': true,
110
+ 'cat-tab-active': !!this.hiddenTabs.find(tab => tab.id === this.activeTab)
111
+ }, iconRight: true, icon: this.moreDropdown?.isOpen ? 'chevron-up-outlined' : 'chevron-down-outlined', slot: "trigger", part: "more", variant: "text", color: this.hiddenTabs.find(tab => tab.id === this.activeTab) ? 'primary' : 'secondary' }, i18n.t('tabs.more')), h("nav", { slot: "content" }, h("ul", null, this.hiddenTabs.map((tab, index) => {
112
+ return (h("li", null, h("cat-button", { class: "cat-nav-item", active: tab.id === this.activeTab, urlTarget: tab.urlTarget, onCatClick: () => this.click(tab), testId: tab.testId, nativeAttributes: {
113
+ ...tab.nativeAttributes,
114
+ role: 'tab',
115
+ 'aria-selected': String(tab.id === this.activeTab),
116
+ 'aria-setsize': String(this.tabs.length),
117
+ 'aria-posinset': String(index + 1)
118
+ }, nativeContentAttributes: { 'data-text': tab.label } }, tab.label)));
119
+ }))))) : null)));
120
+ }
121
+ adjustAdaptiveTabs() {
122
+ const tabs = this.hostElement.shadowRoot?.querySelectorAll('.cat-tab');
123
+ if (!tabs?.length) {
124
+ return;
125
+ }
126
+ // show all hidden tabs for correct calculation
127
+ for (const tab of tabs) {
128
+ tab.style.display = 'inline-flex';
129
+ }
130
+ // show hidden "more" button for correct calculation
131
+ if (this.moreButton) {
132
+ this.moreButton.style.display = 'inline-flex';
133
+ }
134
+ const MORE_WIDTH = this.moreButton?.offsetWidth || 0;
135
+ const visibleTabsIndexes = [];
136
+ let fittingWidth = 0;
137
+ const stickyTabIndex = this.tabs.findIndex(tab => tab.sticky);
138
+ const stickyTabWidth = tabs.item(stickyTabIndex)?.scrollWidth || 0;
139
+ const stickyTabIsVisible = stickyTabIndex > -1 && stickyTabWidth <= this.hostElement.offsetWidth;
140
+ const activeTabIndex = this.tabs.findIndex(tab => tab.id === this.activeTab);
141
+ const activeTabWidth = tabs.item(activeTabIndex)?.scrollWidth || 0;
142
+ const activeTabIsVisible = this.activeTabAlwaysVisible &&
143
+ activeTabIndex > -1 &&
144
+ activeTabWidth + stickyTabWidth <= this.hostElement.offsetWidth;
145
+ if (stickyTabIsVisible) {
146
+ fittingWidth += stickyTabWidth;
147
+ visibleTabsIndexes.push(stickyTabIndex.toString());
148
+ }
149
+ if (activeTabIsVisible && stickyTabIndex !== activeTabIndex) {
150
+ fittingWidth += activeTabWidth;
151
+ visibleTabsIndexes.push(activeTabIndex.toString());
152
+ }
153
+ for (const [index, tab] of tabs.entries()) {
154
+ if ((activeTabIsVisible && index === activeTabIndex) || (stickyTabIsVisible && index === stickyTabIndex)) {
155
+ continue;
156
+ }
157
+ if (fittingWidth + tab.scrollWidth <= this.hostElement.offsetWidth) {
158
+ // tab fits within tabs parent
159
+ fittingWidth += tab.scrollWidth;
160
+ visibleTabsIndexes.push(index.toString());
161
+ }
162
+ else if (fittingWidth + MORE_WIDTH <= this.hostElement.offsetWidth) {
163
+ // tab doesn't fit, but more button does
164
+ break;
165
+ }
166
+ else {
167
+ // tab doesn't fit and more button doesn't fit either
168
+ // remove last fitting tab so that more button fits
169
+ visibleTabsIndexes.pop();
170
+ break;
171
+ }
172
+ }
173
+ this.hiddenTabs = this.tabs.filter((_, index) => !visibleTabsIndexes.includes(index.toString()));
174
+ if (this.moreButton) {
175
+ if (this.tabs.length > visibleTabsIndexes.length) {
176
+ this.moreButton.style.display = 'inline-flex';
177
+ }
178
+ else {
179
+ this.moreButton.style.display = 'none';
180
+ }
181
+ }
182
+ for (const [index, tab] of tabs.entries()) {
183
+ if (!visibleTabsIndexes.includes(index.toString())) {
184
+ tab.style.display = 'none';
185
+ }
186
+ }
70
187
  }
71
188
  syncTabs() {
72
189
  this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
73
190
  this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab) && !tab.noActive)[0]?.id;
191
+ this.adjustAdaptiveTabs();
74
192
  }
75
193
  click(tab) {
76
194
  if (this.canActivate(tab)) {
@@ -87,6 +205,7 @@ export class CatTabs {
87
205
  else if (this.canActivate(tab)) {
88
206
  this.activeTab = tab.id;
89
207
  }
208
+ this.adjustAdaptiveTabs();
90
209
  }
91
210
  canActivate(tab) {
92
211
  return !tab.deactivated && !tab.url && tab.id !== this.activeTab;
@@ -108,6 +227,7 @@ export class CatTabs {
108
227
  return {
109
228
  "activeTab": {
110
229
  "type": "string",
230
+ "attribute": "active-tab",
111
231
  "mutable": true,
112
232
  "complexType": {
113
233
  "original": "string",
@@ -120,12 +240,14 @@ export class CatTabs {
120
240
  "tags": [],
121
241
  "text": "The ID of the active tab."
122
242
  },
123
- "attribute": "active-tab",
243
+ "getter": false,
244
+ "setter": false,
124
245
  "reflect": true,
125
246
  "defaultValue": "''"
126
247
  },
127
248
  "tabsAlign": {
128
249
  "type": "string",
250
+ "attribute": "tabs-align",
129
251
  "mutable": false,
130
252
  "complexType": {
131
253
  "original": "'left' | 'center' | 'right' | 'justify'",
@@ -138,15 +260,57 @@ export class CatTabs {
138
260
  "tags": [],
139
261
  "text": "The alignment of the tabs."
140
262
  },
141
- "attribute": "tabs-align",
263
+ "getter": false,
264
+ "setter": false,
142
265
  "reflect": false,
143
266
  "defaultValue": "'left'"
267
+ },
268
+ "adaptive": {
269
+ "type": "boolean",
270
+ "attribute": "adaptive",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "boolean",
274
+ "resolved": "boolean",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Whether the visible items change according to the available space. A 'More' button is used to reveal hidden items."
282
+ },
283
+ "getter": false,
284
+ "setter": false,
285
+ "reflect": false,
286
+ "defaultValue": "false"
287
+ },
288
+ "activeTabAlwaysVisible": {
289
+ "type": "boolean",
290
+ "attribute": "active-tab-always-visible",
291
+ "mutable": false,
292
+ "complexType": {
293
+ "original": "boolean",
294
+ "resolved": "boolean",
295
+ "references": {}
296
+ },
297
+ "required": false,
298
+ "optional": false,
299
+ "docs": {
300
+ "tags": [],
301
+ "text": "Whether the active tab should always be visible. Applied when adaptive is enabled.\nHas less priority than sticky if there is no space to show both."
302
+ },
303
+ "getter": false,
304
+ "setter": false,
305
+ "reflect": false,
306
+ "defaultValue": "false"
144
307
  }
145
308
  };
146
309
  }
147
310
  static get states() {
148
311
  return {
149
- "tabs": {}
312
+ "tabs": {},
313
+ "hiddenTabs": {}
150
314
  };
151
315
  }
152
316
  static get events() {
@@ -216,6 +380,23 @@ export class CatTabs {
216
380
  "text": "index The tab index."
217
381
  }]
218
382
  }
383
+ },
384
+ "updateAdaptiveTabs": {
385
+ "complexType": {
386
+ "signature": "() => Promise<void>",
387
+ "parameters": [],
388
+ "references": {
389
+ "Promise": {
390
+ "location": "global",
391
+ "id": "global::Promise"
392
+ }
393
+ },
394
+ "return": "Promise<void>"
395
+ },
396
+ "docs": {
397
+ "text": "Recalculates visible and hidden adaptive tabs.",
398
+ "tags": []
399
+ }
219
400
  }
220
401
  };
221
402
  }