@haiilo/catalyst 6.0.3 → 6.1.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 (256) 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/p-2a094d64.entry.js +10 -0
  6. package/dist/catalyst/p-2a094d64.entry.js.map +1 -0
  7. package/dist/catalyst/{p-d7dc291a.js → p-48621e71.js} +1 -1
  8. package/dist/catalyst/p-48621e71.js.map +1 -0
  9. package/dist/catalyst/p-6904eb66.js +3 -0
  10. package/dist/catalyst/p-6904eb66.js.map +1 -0
  11. package/dist/cjs/cat-alert_25.cjs.entry.js +21 -9
  12. package/dist/cjs/cat-alert_25.cjs.entry.js.map +1 -1
  13. package/dist/cjs/{cat-icon-registry-6161e2ee.js → cat-icon-registry-5647cf1f.js} +1 -1
  14. package/dist/cjs/cat-icon-registry-5647cf1f.js.map +1 -0
  15. package/dist/cjs/catalyst.cjs.js +3 -6
  16. package/dist/cjs/catalyst.cjs.js.map +1 -1
  17. package/dist/cjs/{index-4258b31e.js → index-e06682a8.js} +89 -32
  18. package/dist/cjs/index-e06682a8.js.map +1 -0
  19. package/dist/cjs/index.cjs.js +1 -1
  20. package/dist/cjs/index.cjs.js.map +1 -1
  21. package/dist/cjs/loader.cjs.js +2 -11
  22. package/dist/cjs/loader.cjs.js.map +1 -1
  23. package/dist/collection/collection-manifest.json +27 -27
  24. package/dist/collection/components/cat-alert/cat-alert.e2e.js +11 -0
  25. package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +1 -0
  26. package/dist/collection/components/cat-alert/cat-alert.js +2 -2
  27. package/dist/collection/components/cat-alert/cat-alert.spec.js +21 -0
  28. package/dist/collection/components/cat-alert/cat-alert.spec.js.map +1 -0
  29. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +10 -0
  30. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +1 -0
  31. package/dist/collection/components/cat-avatar/cat-avatar.js +3 -3
  32. package/dist/collection/components/cat-avatar/cat-avatar.spec.js +18 -0
  33. package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +1 -0
  34. package/dist/collection/components/cat-badge/cat-badge.e2e.js +10 -0
  35. package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +1 -0
  36. package/dist/collection/components/cat-badge/cat-badge.js +1 -1
  37. package/dist/collection/components/cat-badge/cat-badge.spec.js +18 -0
  38. package/dist/collection/components/cat-badge/cat-badge.spec.js.map +1 -0
  39. package/dist/collection/components/cat-button/cat-button.e2e.js +10 -0
  40. package/dist/collection/components/cat-button/cat-button.e2e.js.map +1 -0
  41. package/dist/collection/components/cat-button/cat-button.js +20 -12
  42. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  43. package/dist/collection/components/cat-button/cat-button.spec.js +18 -0
  44. package/dist/collection/components/cat-button/cat-button.spec.js.map +1 -0
  45. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +10 -0
  46. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +1 -0
  47. package/dist/collection/components/cat-button-group/cat-button-group.js +1 -1
  48. package/dist/collection/components/cat-button-group/cat-button-group.spec.js +18 -0
  49. package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +1 -0
  50. package/dist/collection/components/cat-card/cat-card.e2e.js +10 -0
  51. package/dist/collection/components/cat-card/cat-card.e2e.js.map +1 -0
  52. package/dist/collection/components/cat-card/cat-card.js +1 -1
  53. package/dist/collection/components/cat-card/cat-card.spec.js +18 -0
  54. package/dist/collection/components/cat-card/cat-card.spec.js.map +1 -0
  55. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +10 -0
  56. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +1 -0
  57. package/dist/collection/components/cat-checkbox/cat-checkbox.js +51 -31
  58. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  59. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +29 -0
  60. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +1 -0
  61. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +11 -0
  62. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +1 -0
  63. package/dist/collection/components/cat-datepicker/cat-datepicker.js +18 -12
  64. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  65. package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js +1 -1
  66. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +19 -0
  67. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +1 -0
  68. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +10 -0
  69. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +1 -0
  70. package/dist/collection/components/cat-dropdown/cat-dropdown.js +17 -11
  71. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  72. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +26 -0
  73. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +1 -0
  74. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +10 -0
  75. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +1 -0
  76. package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
  77. package/dist/collection/components/cat-form-group/cat-form-group.spec.js +18 -0
  78. package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +1 -0
  79. package/dist/collection/components/cat-form-hint/cat-form-hint.js +2 -2
  80. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +15 -0
  81. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +1 -0
  82. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +1 -1
  83. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +7 -0
  84. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +1 -0
  85. package/dist/collection/components/cat-icon/cat-icon-registry.js +13 -13
  86. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +7 -0
  87. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +1 -0
  88. package/dist/collection/components/cat-icon/cat-icon.e2e.js +11 -0
  89. package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +1 -0
  90. package/dist/collection/components/cat-icon/cat-icon.js +2 -2
  91. package/dist/collection/components/cat-icon/cat-icon.spec.js +15 -0
  92. package/dist/collection/components/cat-icon/cat-icon.spec.js.map +1 -0
  93. package/dist/collection/components/cat-input/cat-input.e2e.js +11 -0
  94. package/dist/collection/components/cat-input/cat-input.e2e.js.map +1 -0
  95. package/dist/collection/components/cat-input/cat-input.js +21 -13
  96. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  97. package/dist/collection/components/cat-input/cat-input.spec.js +36 -0
  98. package/dist/collection/components/cat-input/cat-input.spec.js.map +1 -0
  99. package/dist/collection/components/cat-notification/cat-notification.js +4 -3
  100. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  101. package/dist/collection/components/cat-notification/cat-notification.spec.js +7 -0
  102. package/dist/collection/components/cat-notification/cat-notification.spec.js.map +1 -0
  103. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +14 -0
  104. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +1 -0
  105. package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
  106. package/dist/collection/components/cat-pagination/cat-pagination.spec.js +31 -0
  107. package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +1 -0
  108. package/dist/collection/components/cat-radio/cat-radio.e2e.js +10 -0
  109. package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +1 -0
  110. package/dist/collection/components/cat-radio/cat-radio.js +13 -8
  111. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  112. package/dist/collection/components/cat-radio/cat-radio.spec.js +24 -0
  113. package/dist/collection/components/cat-radio/cat-radio.spec.js.map +1 -0
  114. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +10 -0
  115. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +1 -0
  116. package/dist/collection/components/cat-radio-group/cat-radio-group.js +5 -3
  117. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  118. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +20 -0
  119. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +1 -0
  120. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +10 -0
  121. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +1 -0
  122. package/dist/collection/components/cat-scrollable/cat-scrollable.js +6 -4
  123. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  124. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +25 -0
  125. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +1 -0
  126. package/dist/collection/components/cat-select/cat-select.e2e.js +14 -0
  127. package/dist/collection/components/cat-select/cat-select.e2e.js.map +1 -0
  128. package/dist/collection/components/cat-select/cat-select.js +39 -23
  129. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  130. package/dist/collection/components/cat-select/cat-select.spec.js +41 -0
  131. package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -0
  132. package/dist/collection/components/cat-select-demo/cat-select-demo.js +2 -2
  133. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +10 -0
  134. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +1 -0
  135. package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
  136. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +18 -0
  137. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +1 -0
  138. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +10 -0
  139. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +1 -0
  140. package/dist/collection/components/cat-spinner/cat-spinner.js +1 -1
  141. package/dist/collection/components/cat-spinner/cat-spinner.spec.js +18 -0
  142. package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +1 -0
  143. package/dist/collection/components/cat-tab/cat-tab.e2e.js +10 -0
  144. package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +1 -0
  145. package/dist/collection/components/cat-tab/cat-tab.js +5 -3
  146. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  147. package/dist/collection/components/cat-tab/cat-tab.spec.js +17 -0
  148. package/dist/collection/components/cat-tab/cat-tab.spec.js.map +1 -0
  149. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +10 -0
  150. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +1 -0
  151. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  152. package/dist/collection/components/cat-tabs/cat-tabs.spec.js +17 -0
  153. package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +1 -0
  154. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +11 -0
  155. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +1 -0
  156. package/dist/collection/components/cat-textarea/cat-textarea.js +20 -13
  157. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  158. package/dist/collection/components/cat-textarea/cat-textarea.spec.js +34 -0
  159. package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +1 -0
  160. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +10 -0
  161. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +1 -0
  162. package/dist/collection/components/cat-toggle/cat-toggle.js +13 -8
  163. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  164. package/dist/collection/components/cat-toggle/cat-toggle.spec.js +22 -0
  165. package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +1 -0
  166. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +10 -0
  167. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +1 -0
  168. package/dist/collection/components/cat-tooltip/cat-tooltip.js +8 -5
  169. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  170. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +24 -0
  171. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +1 -0
  172. package/dist/collection/utils/first-tabbable.js +1 -1
  173. package/dist/collection/utils/media-matcher.js +2 -2
  174. package/dist/collection/utils/media-matcher.spec.js +39 -0
  175. package/dist/collection/utils/media-matcher.spec.js.map +1 -0
  176. package/dist/components/cat-alert.js +1 -1
  177. package/dist/components/cat-alert.js.map +1 -1
  178. package/dist/components/cat-avatar2.js +1 -1
  179. package/dist/components/cat-avatar2.js.map +1 -1
  180. package/dist/components/cat-badge.js +1 -1
  181. package/dist/components/cat-badge.js.map +1 -1
  182. package/dist/components/cat-button-group.js +1 -1
  183. package/dist/components/cat-button-group.js.map +1 -1
  184. package/dist/components/cat-button2.js +1 -1
  185. package/dist/components/cat-button2.js.map +1 -1
  186. package/dist/components/cat-card.js +1 -1
  187. package/dist/components/cat-card.js.map +1 -1
  188. package/dist/components/cat-checkbox2.js +17 -7
  189. package/dist/components/cat-checkbox2.js.map +1 -1
  190. package/dist/components/cat-datepicker.js +1 -1
  191. package/dist/components/cat-datepicker.js.map +1 -1
  192. package/dist/components/cat-dropdown2.js +1 -1
  193. package/dist/components/cat-dropdown2.js.map +1 -1
  194. package/dist/components/cat-form-group.js +1 -1
  195. package/dist/components/cat-form-group.js.map +1 -1
  196. package/dist/components/cat-form-hint.js.map +1 -1
  197. package/dist/components/cat-i18n-registry.js.map +1 -1
  198. package/dist/components/cat-icon-registry.js.map +1 -1
  199. package/dist/components/cat-icon2.js +1 -1
  200. package/dist/components/cat-icon2.js.map +1 -1
  201. package/dist/components/cat-input2.js +1 -1
  202. package/dist/components/cat-input2.js.map +1 -1
  203. package/dist/components/cat-pagination.js +1 -1
  204. package/dist/components/cat-pagination.js.map +1 -1
  205. package/dist/components/cat-radio-group.js +1 -1
  206. package/dist/components/cat-radio-group.js.map +1 -1
  207. package/dist/components/cat-radio.js +1 -1
  208. package/dist/components/cat-radio.js.map +1 -1
  209. package/dist/components/cat-scrollable2.js +1 -1
  210. package/dist/components/cat-scrollable2.js.map +1 -1
  211. package/dist/components/cat-select-demo.js +1 -1
  212. package/dist/components/cat-select-demo.js.map +1 -1
  213. package/dist/components/cat-select2.js +5 -3
  214. package/dist/components/cat-select2.js.map +1 -1
  215. package/dist/components/cat-skeleton2.js +1 -1
  216. package/dist/components/cat-skeleton2.js.map +1 -1
  217. package/dist/components/cat-spinner2.js +1 -1
  218. package/dist/components/cat-spinner2.js.map +1 -1
  219. package/dist/components/cat-tab.js +1 -1
  220. package/dist/components/cat-tab.js.map +1 -1
  221. package/dist/components/cat-tabs.js +1 -1
  222. package/dist/components/cat-tabs.js.map +1 -1
  223. package/dist/components/cat-textarea.js +1 -1
  224. package/dist/components/cat-textarea.js.map +1 -1
  225. package/dist/components/cat-toggle.js +1 -1
  226. package/dist/components/cat-toggle.js.map +1 -1
  227. package/dist/components/cat-tooltip.js +2 -2
  228. package/dist/components/cat-tooltip.js.map +1 -1
  229. package/dist/components/coerce.js.map +1 -1
  230. package/dist/components/index.js.map +1 -1
  231. package/dist/esm/cat-alert_25.entry.js +21 -9
  232. package/dist/esm/cat-alert_25.entry.js.map +1 -1
  233. package/dist/esm/{cat-icon-registry-f15b29d9.js → cat-icon-registry-fc49b06c.js} +1 -1
  234. package/dist/esm/cat-icon-registry-fc49b06c.js.map +1 -0
  235. package/dist/esm/catalyst.js +4 -7
  236. package/dist/esm/catalyst.js.map +1 -1
  237. package/dist/esm/{index-636ce8d6.js → index-bac79c60.js} +89 -32
  238. package/dist/esm/index-bac79c60.js.map +1 -0
  239. package/dist/esm/index.js +2 -2
  240. package/dist/esm/index.js.map +1 -1
  241. package/dist/esm/loader.js +3 -12
  242. package/dist/esm/loader.js.map +1 -1
  243. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +6 -4
  244. package/dist/types/stencil-public-runtime.d.ts +3 -0
  245. package/loader/index.d.ts +1 -1
  246. package/package.json +10 -10
  247. package/dist/catalyst/p-b218a2b0.entry.js +0 -10
  248. package/dist/catalyst/p-b218a2b0.entry.js.map +0 -1
  249. package/dist/catalyst/p-ce6a1db2.js +0 -3
  250. package/dist/catalyst/p-ce6a1db2.js.map +0 -1
  251. package/dist/catalyst/p-d7dc291a.js.map +0 -1
  252. package/dist/cjs/cat-icon-registry-6161e2ee.js.map +0 -1
  253. package/dist/cjs/index-4258b31e.js.map +0 -1
  254. package/dist/esm/cat-icon-registry-f15b29d9.js.map +0 -1
  255. package/dist/esm/index-636ce8d6.js.map +0 -1
  256. package/dist/esm/polyfills/css-shim.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cat-scrollable.js","sourceRoot":"","sources":["../../../src/components/cat-scrollable/cat-scrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AAMH,MAAM,OAAO,aAAa;;IAIP,SAAI,GAAG,IAAI,OAAO,EAAQ,CAAC;IAC3B,cAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;IAChC,mBAAc,GAAG,IAAI,OAAO,EAAyB,CAAC;IACtD,oBAAe,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;qBAKxF,KAAK;qBAIL,KAAK;uBAIH,KAAK;uBAIL,KAAK;wBAIJ,KAAK;0BAKK,KAAK;0BAKL,CAAC;;EAsB1B,kBAA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UACE,OAAO,CAAC,CAAC;OACZ;KACF;IACD,OAAO,CAAC,CAAC;EACX,CAAC;EAEO,WAAW,CAAC,IAAY,EAAE,KAAc;IAC9C,IAAI,KAAK,EAAE;MACT,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAChD;SAAM;MACL,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACnD;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnKuB,sBAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { fromEvent, merge, Observable, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\n\n/**\n * An element to display scrollable content.\n */\n@Component({\n tag: 'cat-scrollable',\n styleUrl: 'cat-scrollable.scss',\n shadow: true\n})\nexport class CatScrollable {\n private static readonly THROTTLE = 50;\n scrollElement?: HTMLElement;\n scrollWrapperElement?: HTMLElement;\n private readonly init = new Subject<void>();\n private readonly destroyed = new Subject<void>();\n private readonly resizedEntries = new Subject<ResizeObserverEntry[]>();\n private readonly resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));\n private scrolled!: Observable<Event>;\n\n /** Flags to disable/enable scroll shadowX. */\n @Prop()\n noShadowX = false;\n\n /** Flags to disable/enable scroll shadowY. */\n @Prop()\n noShadowY = false;\n\n /** Flags to disable/enable overflowX. */\n @Prop()\n noOverflowX = false;\n\n /** Flags to disable/enable overflowY. */\n @Prop()\n noOverflowY = false;\n\n /** Flag to disable/enable overscroll behavior. */\n @Prop()\n noOverscroll = false;\n\n /**\n * Flag to not fire an initial event after content initialization.\n */\n @Prop() noScrolledInit = false;\n\n /**\n * Buffer to be used to calculate the scroll distance.\n */\n @Prop() scrolledBuffer = 0;\n\n /**\n * Emitted when the content is fully scrolled to the top.\n */\n @Event() scrolledTop!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the left.\n */\n @Event() scrolledLeft!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the right.\n */\n @Event() scrolledRight!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the bottom.\n */\n @Event() scrolledBottom!: EventEmitter<void>;\n\n componentDidRender() {\n if (this.scrollElement) {\n this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));\n this.resizedObserver.observe(this.scrollElement);\n }\n if (this.scrollWrapperElement) {\n this.resizedObserver.observe(this.scrollWrapperElement);\n }\n this.attachEmitter('left', this.scrolledLeft);\n this.attachEmitter('right', this.scrolledRight);\n this.attachEmitter('bottom', this.scrolledBottom);\n this.attachEmitter('top', this.scrolledTop);\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => ({\n top: this.getScrollOffset('top') > 0,\n left: this.getScrollOffset('left') > 0,\n right: this.getScrollOffset('right') > 0,\n bottom: this.getScrollOffset('bottom') > 0\n })),\n distinctUntilChanged(),\n takeUntil(this.destroyed)\n )\n .subscribe(({ top, left, right, bottom }) => {\n this.toggleClass('cat-scrollable-top', top);\n this.toggleClass('cat-scrollable-left', left);\n this.toggleClass('cat-scrollable-right', right);\n this.toggleClass('cat-scrollable-bottom', bottom);\n });\n }\n\n componentDidLoad() {\n if (!this.noScrolledInit) {\n this.init.next();\n }\n }\n\n disconnectedCallback() {\n this.init.complete();\n this.destroyed.next();\n this.destroyed.complete();\n this.resizedObserver.disconnect();\n }\n\n render() {\n return [\n <div class=\"scrollable-wrapper\" ref={el => (this.scrollWrapperElement = el)}>\n {!this.noShadowY && <div class=\"shadow-top\"></div>}\n {!this.noShadowX && <div class=\"shadow-left\"></div>}\n {!this.noShadowX && <div class=\"shadow-right\"></div>}\n {!this.noShadowY && <div class=\"shadow-bottom\"></div>}\n </div>,\n <div\n ref={el => (this.scrollElement = el)}\n class={{\n 'scrollable-content': true,\n 'scroll-x': !this.noOverflowX,\n 'scroll-y': !this.noOverflowY,\n 'no-overscroll': this.noOverscroll\n }}\n >\n <slot></slot>\n </div>\n ];\n }\n\n private attachEmitter(from: 'top' | 'left' | 'right' | 'bottom', emitter: EventEmitter<void>) {\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => this.getScrollOffset(from)),\n map(offset => offset <= this.scrolledBuffer),\n distinctUntilChanged(),\n filter(isLower => isLower),\n takeUntil(this.destroyed)\n )\n .subscribe(() => emitter.emit());\n }\n\n private getScrollOffset(from: 'top' | 'left' | 'right' | 'bottom') {\n if (this.scrollElement) {\n switch (from) {\n case 'top':\n return this.scrollElement.scrollTop;\n case 'left':\n return this.scrollElement.scrollLeft;\n case 'right':\n return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;\n case 'bottom':\n return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;\n default:\n return 0;\n }\n }\n return 0;\n }\n\n private toggleClass(name: string, value: boolean) {\n if (value) {\n this.scrollWrapperElement?.classList.add(name);\n } else {\n this.scrollWrapperElement?.classList.remove(name);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"cat-scrollable.js","sourceRoot":"","sources":["../../../src/components/cat-scrollable/cat-scrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC7D,O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,CAAC,IAAyC;IAC/D,IAAI,IAAI,CAAC,aAAa,EAAE;MACtB,QAAQ,IAAI,EAAE;QACZ,KAAK,KAAK;UACR,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;QACtC,KAAK,MAAM;UACT,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;QACvC,KAAK,OAAO;UACV,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;QACzG,KAAK,QAAQ;UACX,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;QAC1G;UACE,OAAO,CAAC,CAAC;OACZ;KACF;IACD,OAAO,CAAC,CAAC;EACX,CAAC;EAEO,WAAW,CAAC,IAAY,EAAE,KAAc;IAC9C,IAAI,KAAK,EAAE;MACT,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAChD;SAAM;MACL,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACnD;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnKuB,sBAAQ,GAAG,EAAE,AAAL,CAAM;SAD3B,aAAa","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { fromEvent, merge, Observable, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\n\n/**\n * An element to display scrollable content.\n */\n@Component({\n tag: 'cat-scrollable',\n styleUrl: 'cat-scrollable.scss',\n shadow: true\n})\nexport class CatScrollable {\n private static readonly THROTTLE = 50;\n scrollElement?: HTMLElement;\n scrollWrapperElement?: HTMLElement;\n private readonly init = new Subject<void>();\n private readonly destroyed = new Subject<void>();\n private readonly resizedEntries = new Subject<ResizeObserverEntry[]>();\n private readonly resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));\n private scrolled!: Observable<Event>;\n\n /** Flags to disable/enable scroll shadowX. */\n @Prop()\n noShadowX = false;\n\n /** Flags to disable/enable scroll shadowY. */\n @Prop()\n noShadowY = false;\n\n /** Flags to disable/enable overflowX. */\n @Prop()\n noOverflowX = false;\n\n /** Flags to disable/enable overflowY. */\n @Prop()\n noOverflowY = false;\n\n /** Flag to disable/enable overscroll behavior. */\n @Prop()\n noOverscroll = false;\n\n /**\n * Flag to not fire an initial event after content initialization.\n */\n @Prop() noScrolledInit = false;\n\n /**\n * Buffer to be used to calculate the scroll distance.\n */\n @Prop() scrolledBuffer = 0;\n\n /**\n * Emitted when the content is fully scrolled to the top.\n */\n @Event() scrolledTop!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the left.\n */\n @Event() scrolledLeft!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the right.\n */\n @Event() scrolledRight!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the bottom.\n */\n @Event() scrolledBottom!: EventEmitter<void>;\n\n componentDidRender() {\n if (this.scrollElement) {\n this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));\n this.resizedObserver.observe(this.scrollElement);\n }\n if (this.scrollWrapperElement) {\n this.resizedObserver.observe(this.scrollWrapperElement);\n }\n this.attachEmitter('left', this.scrolledLeft);\n this.attachEmitter('right', this.scrolledRight);\n this.attachEmitter('bottom', this.scrolledBottom);\n this.attachEmitter('top', this.scrolledTop);\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => ({\n top: this.getScrollOffset('top') > 0,\n left: this.getScrollOffset('left') > 0,\n right: this.getScrollOffset('right') > 0,\n bottom: this.getScrollOffset('bottom') > 0\n })),\n distinctUntilChanged(),\n takeUntil(this.destroyed)\n )\n .subscribe(({ top, left, right, bottom }) => {\n this.toggleClass('cat-scrollable-top', top);\n this.toggleClass('cat-scrollable-left', left);\n this.toggleClass('cat-scrollable-right', right);\n this.toggleClass('cat-scrollable-bottom', bottom);\n });\n }\n\n componentDidLoad() {\n if (!this.noScrolledInit) {\n this.init.next();\n }\n }\n\n disconnectedCallback() {\n this.init.complete();\n this.destroyed.next();\n this.destroyed.complete();\n this.resizedObserver.disconnect();\n }\n\n render() {\n return [\n <div class=\"scrollable-wrapper\" ref={el => (this.scrollWrapperElement = el)}>\n {!this.noShadowY && <div class=\"shadow-top\"></div>}\n {!this.noShadowX && <div class=\"shadow-left\"></div>}\n {!this.noShadowX && <div class=\"shadow-right\"></div>}\n {!this.noShadowY && <div class=\"shadow-bottom\"></div>}\n </div>,\n <div\n ref={el => (this.scrollElement = el)}\n class={{\n 'scrollable-content': true,\n 'scroll-x': !this.noOverflowX,\n 'scroll-y': !this.noOverflowY,\n 'no-overscroll': this.noOverscroll\n }}\n >\n <slot></slot>\n </div>\n ];\n }\n\n private attachEmitter(from: 'top' | 'left' | 'right' | 'bottom', emitter: EventEmitter<void>) {\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => this.getScrollOffset(from)),\n map(offset => offset <= this.scrolledBuffer),\n distinctUntilChanged(),\n filter(isLower => isLower),\n takeUntil(this.destroyed)\n )\n .subscribe(() => emitter.emit());\n }\n\n private getScrollOffset(from: 'top' | 'left' | 'right' | 'bottom') {\n if (this.scrollElement) {\n switch (from) {\n case 'top':\n return this.scrollElement.scrollTop;\n case 'left':\n return this.scrollElement.scrollLeft;\n case 'right':\n return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;\n case 'bottom':\n return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;\n default:\n return 0;\n }\n }\n return 0;\n }\n\n private toggleClass(name: string, value: boolean) {\n if (value) {\n this.scrollWrapperElement?.classList.add(name);\n } else {\n this.scrollWrapperElement?.classList.remove(name);\n }\n }\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { CatScrollable } from "./cat-scrollable";
3
+ describe('cat-scrollable', () => {
4
+ it('renders', async () => {
5
+ const page = await newSpecPage({
6
+ components: [CatScrollable],
7
+ html: `<cat-scrollable></cat-scrollable>`
8
+ });
9
+ expect(page.root).toEqualHtml(`
10
+ <cat-scrollable>
11
+ <mock:shadow-root>
12
+ <div class="scrollable-wrapper">
13
+ <div class="shadow-top"></div>
14
+ <div class="shadow-left"></div>
15
+ <div class="shadow-right"></div>
16
+ <div class="shadow-bottom"></div>
17
+ </div>
18
+ <div class="scrollable-content scroll-x scroll-y">
19
+ <slot></slot>
20
+ </div>
21
+ </cat-scrollable>
22
+ `);
23
+ });
24
+ });
25
+ //# sourceMappingURL=cat-scrollable.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cat-scrollable.spec.js","sourceRoot":"","sources":["../../../src/components/cat-scrollable/cat-scrollable.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;EAC9B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,aAAa,CAAC;MAC3B,IAAI,EAAE,mCAAmC;KAC1C,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;KAa7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CatScrollable } from './cat-scrollable';\n\ndescribe('cat-scrollable', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CatScrollable],\n html: `<cat-scrollable></cat-scrollable>`\n });\n expect(page.root).toEqualHtml(`\n <cat-scrollable>\n <mock:shadow-root>\n <div class=\"scrollable-wrapper\">\n <div class=\"shadow-top\"></div>\n <div class=\"shadow-left\"></div>\n <div class=\"shadow-right\"></div>\n <div class=\"shadow-bottom\"></div>\n </div>\n <div class=\"scrollable-content scroll-x scroll-y\">\n <slot></slot>\n </div>\n </cat-scrollable>\n `);\n });\n});\n"]}
@@ -0,0 +1,14 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('cat-select', () => {
3
+ beforeAll(() => {
4
+ console.error = jest.fn();
5
+ console.warn = jest.fn();
6
+ });
7
+ it('renders', async () => {
8
+ const page = await newE2EPage();
9
+ await page.setContent('<cat-select label="Label"></cat-select>');
10
+ const element = await page.find('cat-select');
11
+ expect(element).toHaveClass('hydrated');
12
+ });
13
+ });
14
+ //# sourceMappingURL=cat-select.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cat-select.e2e.js","sourceRoot":"","sources":["../../../src/components/cat-select/cat-select.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,SAAS,CAAC,GAAG,EAAE;IACb,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;EAC3B,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yCAAyC,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;EAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cat-select', () => {\n beforeAll(() => {\n console.error = jest.fn();\n console.warn = jest.fn();\n });\n\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cat-select label=\"Label\"></cat-select>');\n\n const element = await page.find('cat-select');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
@@ -1,11 +1,11 @@
1
- import { autoUpdate, computePosition, offset } from '@floating-ui/dom';
2
- import { h, Host } from '@stencil/core';
3
- import autosizeInput from 'autosize-input';
4
- import log from 'loglevel';
5
- import { catchError, debounce, distinctUntilChanged, filter, first, of, scan, startWith, Subject, switchMap, takeWhile, tap, timer } from 'rxjs';
6
- import { coerceBoolean, coerceNumber } from '../../utils/coerce';
7
- import { CatFormHint } from '../cat-form-hint/cat-form-hint';
8
- import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';
1
+ import { autoUpdate, computePosition, offset } from "@floating-ui/dom";
2
+ import { h, Host } from "@stencil/core";
3
+ import autosizeInput from "autosize-input";
4
+ import log from "loglevel";
5
+ import { catchError, debounce, distinctUntilChanged, filter, first, of, scan, startWith, Subject, switchMap, takeWhile, tap, timer } from "rxjs";
6
+ import { coerceBoolean, coerceNumber } from "../../utils/coerce";
7
+ import { CatFormHint } from "../cat-form-hint/cat-form-hint";
8
+ import { catI18nRegistry as i18n } from "../cat-i18n/cat-i18n-registry";
9
9
  const INIT_STATE = {
10
10
  term: '',
11
11
  isOpen: false,
@@ -18,6 +18,7 @@ const INIT_STATE = {
18
18
  activeSelectionIndex: -1
19
19
  };
20
20
  let nextUniqueId = 0;
21
+ let nextTagUniqueId = 0;
21
22
  /**
22
23
  * Select lets user choose one option from an options' menu. Consider using
23
24
  * select when you have 6 or more options. Select component supports any content
@@ -27,7 +28,7 @@ let nextUniqueId = 0;
27
28
  * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
28
29
  * @part label - The label content.
29
30
  */
30
- export class CatSelect {
31
+ class CatSelect {
31
32
  constructor() {
32
33
  this._id = `cat-input-${nextUniqueId++}`;
33
34
  this.term$ = new Subject();
@@ -153,7 +154,8 @@ export class CatSelect {
153
154
  }
154
155
  }
155
156
  this.hide();
156
- if (!this.multiple && this.state.tempSelection?.length) {
157
+ // Conditionally remove selection if the option was not manually selected through click or enter key press
158
+ if (!this.multiple && (!this.tags || !this.state.selection?.length) && this.state.tempSelection?.length) {
157
159
  this.patchState({
158
160
  activeSelectionIndex: -1,
159
161
  selection: this.state.tempSelection,
@@ -556,7 +558,7 @@ export class CatSelect {
556
558
  if (term.trim().length && !this.isTagSelected(term)) {
557
559
  const value = this.value;
558
560
  const tags = value?.tags;
559
- const tag = { id: `select-${this.id}-tag-${tags ? tags.length : 0}`, name: term };
561
+ const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };
560
562
  this.select({ item: tag, render: { label: tag.name } });
561
563
  }
562
564
  this.setTransparentCaret();
@@ -727,7 +729,8 @@ export class CatSelect {
727
729
  "references": {
728
730
  "Placement": {
729
731
  "location": "import",
730
- "path": "@floating-ui/dom"
732
+ "path": "@floating-ui/dom",
733
+ "id": "../node_modules/@floating-ui/dom/index.d.ts::Placement"
731
734
  }
732
735
  }
733
736
  },
@@ -750,11 +753,13 @@ export class CatSelect {
750
753
  "references": {
751
754
  "CatSelectTaggingValue": {
752
755
  "location": "local",
753
- "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx"
756
+ "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx",
757
+ "id": "src/components/cat-select/cat-select.tsx::CatSelectTaggingValue"
754
758
  },
755
759
  "CatSelectMultipleTaggingValue": {
756
760
  "location": "local",
757
- "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx"
761
+ "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx",
762
+ "id": "src/components/cat-select/cat-select.tsx::CatSelectMultipleTaggingValue"
758
763
  }
759
764
  }
760
765
  },
@@ -986,7 +991,8 @@ export class CatSelect {
986
991
  "references": {
987
992
  "ErrorMap": {
988
993
  "location": "import",
989
- "path": "../cat-form-hint/cat-form-hint"
994
+ "path": "../cat-form-hint/cat-form-hint",
995
+ "id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
990
996
  }
991
997
  }
992
998
  },
@@ -1059,7 +1065,8 @@ export class CatSelect {
1059
1065
  "resolved": "FocusEvent",
1060
1066
  "references": {
1061
1067
  "FocusEvent": {
1062
- "location": "global"
1068
+ "location": "global",
1069
+ "id": "global::FocusEvent"
1063
1070
  }
1064
1071
  }
1065
1072
  }
@@ -1078,7 +1085,8 @@ export class CatSelect {
1078
1085
  "resolved": "FocusEvent",
1079
1086
  "references": {
1080
1087
  "FocusEvent": {
1081
- "location": "global"
1088
+ "location": "global",
1089
+ "id": "global::FocusEvent"
1082
1090
  }
1083
1091
  }
1084
1092
  }
@@ -1097,7 +1105,8 @@ export class CatSelect {
1097
1105
  "resolved": "InputEvent",
1098
1106
  "references": {
1099
1107
  "InputEvent": {
1100
- "location": "global"
1108
+ "location": "global",
1109
+ "id": "global::InputEvent"
1101
1110
  }
1102
1111
  }
1103
1112
  }
@@ -1116,7 +1125,8 @@ export class CatSelect {
1116
1125
  "resolved": "FocusEvent",
1117
1126
  "references": {
1118
1127
  "FocusEvent": {
1119
- "location": "global"
1128
+ "location": "global",
1129
+ "id": "global::FocusEvent"
1120
1130
  }
1121
1131
  }
1122
1132
  }
@@ -1136,19 +1146,23 @@ export class CatSelect {
1136
1146
  }],
1137
1147
  "references": {
1138
1148
  "Promise": {
1139
- "location": "global"
1149
+ "location": "global",
1150
+ "id": "global::Promise"
1140
1151
  },
1141
1152
  "CatSelectConnector": {
1142
1153
  "location": "local",
1143
- "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx"
1154
+ "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx",
1155
+ "id": "src/components/cat-select/cat-select.tsx::CatSelectConnector"
1144
1156
  },
1145
1157
  "Observable": {
1146
1158
  "location": "import",
1147
- "path": "rxjs"
1159
+ "path": "rxjs",
1160
+ "id": "../node_modules/rxjs/dist/types/index.d.ts::Observable"
1148
1161
  },
1149
1162
  "Item": {
1150
1163
  "location": "local",
1151
- "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx"
1164
+ "path": "/Users/fynn/Workspace/catalyst/core/src/components/cat-select/cat-select.tsx",
1165
+ "id": "src/components/cat-select/cat-select.tsx::Item"
1152
1166
  }
1153
1167
  },
1154
1168
  "return": "Promise<void>"
@@ -1200,7 +1214,9 @@ export class CatSelect {
1200
1214
  "passive": false
1201
1215
  }];
1202
1216
  }
1217
+ static get stencilHasStaticMembersWithInit() { return true; }
1203
1218
  }
1204
1219
  CatSelect.SKELETON_COUNT = 4;
1205
1220
  CatSelect.DROPDOWN_OFFSET = 4;
1221
+ export { CatSelect };
1206
1222
  //# sourceMappingURL=cat-select.js.map