@usecapsule/core-components 3.2.0-dev.1 → 3.3.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (445) hide show
  1. package/css/capsule-core.css +25 -10
  2. package/css/capsule-core.css.map +1 -1
  3. package/dist/capsule/capsule.esm.js +1 -1
  4. package/dist/capsule/capsule.esm.js.map +1 -1
  5. package/dist/capsule/index.esm.js +1 -1
  6. package/dist/capsule/index.esm.js.map +1 -1
  7. package/dist/capsule/{p-a6aaf3f4.entry.js → p-0e558c7f.entry.js} +3 -3
  8. package/dist/capsule/p-0e558c7f.entry.js.map +1 -0
  9. package/dist/capsule/{p-452b9998.entry.js → p-1bd11889.entry.js} +2 -2
  10. package/dist/capsule/p-1bd11889.entry.js.map +1 -0
  11. package/dist/capsule/p-32cdf894.entry.js +2 -0
  12. package/dist/capsule/p-32cdf894.entry.js.map +1 -0
  13. package/dist/capsule/p-3b042fd1.entry.js +2 -0
  14. package/dist/capsule/{p-6793ef7a.entry.js.map → p-3b042fd1.entry.js.map} +1 -1
  15. package/dist/capsule/{p-b976b6f0.entry.js → p-41bc3c58.entry.js} +2 -2
  16. package/dist/capsule/{p-b976b6f0.entry.js.map → p-41bc3c58.entry.js.map} +1 -1
  17. package/dist/capsule/p-5965b15e.entry.js +2 -0
  18. package/dist/capsule/{p-f6c74d69.entry.js.map → p-5965b15e.entry.js.map} +1 -1
  19. package/dist/capsule/{p-447d49b9.entry.js → p-5d62e610.entry.js} +2 -2
  20. package/dist/capsule/{p-447d49b9.entry.js.map → p-5d62e610.entry.js.map} +1 -1
  21. package/dist/capsule/p-60508b1e.entry.js +20 -0
  22. package/dist/capsule/p-60508b1e.entry.js.map +1 -0
  23. package/dist/capsule/{p-6dcaee48.entry.js → p-de2a16e4.entry.js} +2 -2
  24. package/dist/capsule/{p-6dcaee48.entry.js.map → p-de2a16e4.entry.js.map} +1 -1
  25. package/dist/capsule/p-e1255160.js.map +1 -1
  26. package/dist/capsule/p-f2393be6.js.map +1 -1
  27. package/dist/capsule/p-fa6b7678.js +3 -0
  28. package/dist/capsule/p-fa6b7678.js.map +1 -0
  29. package/dist/cjs/capsule.cjs.js +10 -10
  30. package/dist/cjs/capsule.cjs.js.map +1 -1
  31. package/dist/cjs/cpsl-alert_34.cjs.entry.js +17036 -13428
  32. package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
  33. package/dist/cjs/cpsl-animation.cjs.entry.js +8 -4
  34. package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -1
  35. package/dist/cjs/cpsl-col.cjs.entry.js +25 -6
  36. package/dist/cjs/cpsl-col.cjs.entry.js.map +1 -1
  37. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  38. package/dist/cjs/cpsl-hero.cjs.entry.js +38 -0
  39. package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -0
  40. package/dist/cjs/cpsl-identicon.cjs.entry.js +2 -2
  41. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  42. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  43. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +3 -2
  44. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -1
  45. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  46. package/dist/cjs/index-65f57499.js +1439 -0
  47. package/dist/cjs/index-65f57499.js.map +1 -0
  48. package/dist/cjs/index.cjs.js +47 -16
  49. package/dist/cjs/index.cjs.js.map +1 -1
  50. package/dist/cjs/loader.cjs.js +2 -2
  51. package/dist/collection/assets/icons/arrow-circle-broken-down-left.svg +3 -0
  52. package/dist/collection/assets/icons/bank.svg +3 -0
  53. package/dist/collection/assets/icons/credit-card.svg +3 -0
  54. package/dist/collection/assets/icons/dot.svg +3 -0
  55. package/dist/collection/assets/icons/download.svg +3 -0
  56. package/dist/collection/assets/icons/globe.svg +3 -0
  57. package/dist/collection/assets/icons/hero-alert-circle.svg +3 -0
  58. package/dist/collection/assets/icons/hero-checkmark-capsule.svg +11 -0
  59. package/dist/collection/assets/icons/hero-checkmark.svg +3 -0
  60. package/dist/collection/assets/icons/hero-external-connection.svg +71 -0
  61. package/dist/collection/assets/icons/index.js +21 -3
  62. package/dist/collection/assets/icons/index.js.map +1 -1
  63. package/dist/collection/assets/icons/link-external.svg +3 -0
  64. package/dist/collection/assets/icons/log-out.svg +3 -0
  65. package/dist/collection/assets/icons/moonpay-brand.svg +10 -0
  66. package/dist/collection/assets/icons/puzzle-piece.svg +3 -0
  67. package/dist/collection/assets/icons/qr-code-02.svg +3 -0
  68. package/dist/collection/assets/icons/qr-code.svg +3 -0
  69. package/dist/collection/assets/icons/refresh.svg +3 -3
  70. package/dist/collection/assets/icons/search.svg +3 -0
  71. package/dist/collection/assets/icons/send.svg +3 -0
  72. package/dist/collection/assets/icons/shield.svg +3 -0
  73. package/dist/collection/assets/icons/stripe-brand.svg +3 -0
  74. package/dist/collection/collection-manifest.json +4 -3
  75. package/dist/collection/components/cpsl-alert/cpsl-alert.js +3 -3
  76. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  77. package/dist/collection/components/cpsl-animation/cpsl-animation.js +4 -1
  78. package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
  79. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +5 -2
  80. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  81. package/dist/collection/components/{cpsl-modal/cpsl-modal.css → cpsl-auth-modal/cpsl-auth-modal.css} +33 -58
  82. package/dist/collection/components/{cpsl-modal/cpsl-modal.js → cpsl-auth-modal/cpsl-auth-modal.js} +13 -131
  83. package/dist/collection/components/cpsl-auth-modal/cpsl-auth-modal.js.map +1 -0
  84. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
  85. package/dist/collection/components/cpsl-button/cpsl-button.css +89 -2
  86. package/dist/collection/components/cpsl-button/cpsl-button.js +9 -5
  87. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  88. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +2 -2
  89. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js.map +1 -1
  90. package/dist/collection/components/cpsl-card/cpsl-card.css +5 -2
  91. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  92. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
  93. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +3 -0
  94. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +13 -7
  95. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  96. package/dist/collection/components/cpsl-col/cpsl-col.js +21 -5
  97. package/dist/collection/components/cpsl-col/cpsl-col.js.map +1 -1
  98. package/dist/collection/components/cpsl-divider/cpsl-divider.css +2 -1
  99. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  100. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +3 -2
  101. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  102. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  103. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  104. package/dist/collection/components/cpsl-dropdown/dropdown-interface.js.map +1 -1
  105. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +5 -5
  106. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -1
  107. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  108. package/dist/collection/components/cpsl-hero/cpsl-hero.css +136 -71
  109. package/dist/collection/components/cpsl-hero/cpsl-hero.js +64 -9
  110. package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
  111. package/dist/collection/components/cpsl-hero/cpsl-hero.stories.js.map +1 -1
  112. package/dist/collection/components/cpsl-icon/cpsl-icon.css +8 -0
  113. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  114. package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
  115. package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.css +97 -0
  116. package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.js +121 -0
  117. package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.js.map +1 -0
  118. package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +1 -1
  119. package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
  120. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -2
  121. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  122. package/dist/collection/components/cpsl-input/cpsl-input.css +21 -2
  123. package/dist/collection/components/cpsl-input/cpsl-input.js +117 -11
  124. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  125. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +2 -1
  126. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -1
  127. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -2
  128. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
  129. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +2 -1
  130. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
  131. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  132. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
  133. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  134. package/dist/collection/components/cpsl-popover/cpsl-popover.css +2 -0
  135. package/dist/collection/components/cpsl-popover/cpsl-popover.js +16 -6
  136. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -1
  137. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +12 -3
  138. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +28 -23
  139. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js.map +1 -1
  140. package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
  141. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  142. package/dist/collection/components/cpsl-select/cpsl-select.css +17 -0
  143. package/dist/collection/components/cpsl-select/cpsl-select.js +96 -4
  144. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
  145. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
  146. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -1
  147. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +14 -3
  148. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -1
  149. package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +30 -8
  150. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +5 -7
  151. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js.map +1 -1
  152. package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
  153. package/dist/collection/components/cpsl-tab/cpsl-tab.css +24 -1
  154. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  155. package/dist/collection/components/cpsl-tab/cpsl-tab.js.map +1 -1
  156. package/dist/collection/components/cpsl-table/cpsl-table.js +3 -1
  157. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  158. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +1 -4
  159. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +5 -2
  160. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
  161. package/dist/collection/components/cpsl-text/cpsl-text.css +19 -0
  162. package/dist/collection/components/cpsl-text/cpsl-text.js +7 -3
  163. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  164. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -1
  165. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  166. package/dist/collection/interface.js.map +1 -1
  167. package/dist/collection/utils/media.js +3 -0
  168. package/dist/collection/utils/media.js.map +1 -1
  169. package/dist/collection/utils/theme/generateBorderRadii.js +4 -3
  170. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  171. package/dist/collection/utils/theme/generateFont.js +1 -1
  172. package/dist/collection/utils/theme/generateFont.js.map +1 -1
  173. package/dist/collection/utils/theme/generatePalette.js +28 -9
  174. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  175. package/dist/collection/utils/theme/generateTheme.js +13 -3
  176. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  177. package/dist/collection/utils/theme/utils.js +1 -0
  178. package/dist/collection/utils/theme/utils.js.map +1 -1
  179. package/dist/esm/capsule.js +11 -11
  180. package/dist/esm/capsule.js.map +1 -1
  181. package/dist/esm/cpsl-alert_34.entry.js +17036 -13428
  182. package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
  183. package/dist/esm/cpsl-animation.entry.js +7 -3
  184. package/dist/esm/cpsl-animation.entry.js.map +1 -1
  185. package/dist/esm/cpsl-col.entry.js +25 -6
  186. package/dist/esm/cpsl-col.entry.js.map +1 -1
  187. package/dist/esm/cpsl-grid.entry.js +3 -3
  188. package/dist/esm/cpsl-hero.entry.js +34 -0
  189. package/dist/esm/cpsl-hero.entry.js.map +1 -0
  190. package/dist/esm/cpsl-identicon.entry.js +2 -2
  191. package/dist/esm/cpsl-info-box.entry.js +3 -3
  192. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  193. package/dist/esm/cpsl-modal-v2.entry.js +3 -2
  194. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -1
  195. package/dist/esm/cpsl-row.entry.js +2 -2
  196. package/dist/esm/index-91db3414.js +1408 -0
  197. package/dist/esm/index-91db3414.js.map +1 -0
  198. package/dist/esm/index.js +47 -16
  199. package/dist/esm/index.js.map +1 -1
  200. package/dist/esm/loader.js +3 -3
  201. package/dist/loader/cdn.js +1 -3
  202. package/dist/loader/index.cjs.js +1 -3
  203. package/dist/loader/index.d.ts +3 -0
  204. package/dist/loader/index.es2017.js +1 -3
  205. package/dist/loader/index.js +1 -3
  206. package/dist/scripts/buildAssets.js +1 -1
  207. package/dist/types/assets/icons/index.d.ts +20 -2
  208. package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +8 -0
  209. package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +6 -0
  210. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +10 -0
  211. package/dist/types/components/cpsl-auth-modal/cpsl-auth-modal.d.ts +58 -0
  212. package/dist/types/components/cpsl-avatar/cpsl-avatar.d.ts +11 -0
  213. package/dist/types/components/cpsl-button/cpsl-button.d.ts +30 -1
  214. package/dist/types/components/cpsl-button-group/cpsl-button-group.d.ts +3 -0
  215. package/dist/types/components/cpsl-checkbox/cpsl-checkbox.d.ts +6 -0
  216. package/dist/types/components/cpsl-code-input/cpsl-code-input.d.ts +19 -0
  217. package/dist/types/components/cpsl-col/cpsl-col.d.ts +96 -0
  218. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +31 -0
  219. package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +15 -0
  220. package/dist/types/components/cpsl-dropdown/dropdown-interface.d.ts +1 -1
  221. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +43 -0
  222. package/dist/types/components/cpsl-grid/cpsl-grid.d.ts +3 -0
  223. package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +21 -1
  224. package/dist/types/components/cpsl-icon/cpsl-icon.d.ts +6 -0
  225. package/dist/types/components/cpsl-icon-group/cpsl-icon-group.d.ts +20 -0
  226. package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +4 -0
  227. package/dist/types/components/cpsl-input/cpsl-input.d.ts +148 -0
  228. package/dist/types/components/cpsl-input/input-interface.d.ts +5 -0
  229. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +32 -0
  230. package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +3 -0
  231. package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +14 -0
  232. package/dist/types/components/cpsl-pagination/cpsl-pagination.d.ts +15 -0
  233. package/dist/types/components/cpsl-pill/cpsl-pill.d.ts +3 -0
  234. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +53 -0
  235. package/dist/types/components/cpsl-progress-indicator/cpsl-progress-indicator.d.ts +6 -0
  236. package/dist/types/components/cpsl-qr-code/cpsl-qr-code.d.ts +11 -0
  237. package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +6 -0
  238. package/dist/types/components/cpsl-select/cpsl-select.d.ts +67 -1
  239. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +10 -0
  240. package/dist/types/components/cpsl-slide-button/cpsl-slide-button.d.ts +18 -0
  241. package/dist/types/components/cpsl-spinner/cpsl-spinner.d.ts +8 -0
  242. package/dist/types/components/cpsl-switch/cpsl-switch.d.ts +6 -0
  243. package/dist/types/components/cpsl-tab/cpsl-tab.d.ts +11 -0
  244. package/dist/types/components/cpsl-tabs/cpsl-tabs.d.ts +13 -0
  245. package/dist/types/components/cpsl-text/cpsl-text.d.ts +16 -1
  246. package/dist/types/components/cpsl-tile-button/cpsl-tile-button.d.ts +6 -0
  247. package/dist/types/components.d.ts +216 -118
  248. package/dist/types/interface.d.ts +13 -0
  249. package/dist/types/stencil-public-runtime.d.ts +3 -10
  250. package/dist/types/utils/theme/generatePalette.d.ts +4 -2
  251. package/dist/types/utils/theme/generateTheme.d.ts +5 -1
  252. package/package.json +6 -12
  253. package/readme.md +47 -2
  254. package/dist/capsule/p-0462f723.js +0 -2
  255. package/dist/capsule/p-0462f723.js.map +0 -1
  256. package/dist/capsule/p-303e6e89.entry.js +0 -29
  257. package/dist/capsule/p-303e6e89.entry.js.map +0 -1
  258. package/dist/capsule/p-452b9998.entry.js.map +0 -1
  259. package/dist/capsule/p-6793ef7a.entry.js +0 -2
  260. package/dist/capsule/p-7dde3172.js +0 -3
  261. package/dist/capsule/p-7dde3172.js.map +0 -1
  262. package/dist/capsule/p-a6aaf3f4.entry.js.map +0 -1
  263. package/dist/capsule/p-f6c74d69.entry.js +0 -2
  264. package/dist/cjs/_commonjsHelpers-b3309d7b.js +0 -12
  265. package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
  266. package/dist/cjs/index-528f7428.js +0 -2107
  267. package/dist/cjs/index-528f7428.js.map +0 -1
  268. package/dist/collection/assets/icons/double-arc.svg +0 -13
  269. package/dist/collection/assets/icons/single-arc.svg +0 -11
  270. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +0 -29
  271. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +0 -1
  272. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +0 -37
  273. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +0 -1
  274. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +0 -29
  275. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +0 -1
  276. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +0 -37
  277. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +0 -1
  278. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js +0 -29
  279. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js.map +0 -1
  280. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js +0 -37
  281. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js.map +0 -1
  282. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js +0 -29
  283. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js.map +0 -1
  284. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js +0 -37
  285. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js.map +0 -1
  286. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +0 -29
  287. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +0 -1
  288. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +0 -37
  289. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +0 -1
  290. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js +0 -29
  291. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js.map +0 -1
  292. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js +0 -37
  293. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js.map +0 -1
  294. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js +0 -29
  295. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js.map +0 -1
  296. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js +0 -37
  297. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js.map +0 -1
  298. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js +0 -29
  299. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js.map +0 -1
  300. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js +0 -37
  301. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js.map +0 -1
  302. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +0 -29
  303. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +0 -1
  304. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +0 -37
  305. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +0 -1
  306. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +0 -29
  307. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +0 -1
  308. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +0 -37
  309. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +0 -1
  310. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +0 -29
  311. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +0 -1
  312. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +0 -37
  313. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +0 -1
  314. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js +0 -29
  315. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js.map +0 -1
  316. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js +0 -37
  317. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js.map +0 -1
  318. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +0 -29
  319. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +0 -1
  320. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +0 -37
  321. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js.map +0 -1
  322. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +0 -29
  323. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +0 -1
  324. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +0 -37
  325. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +0 -1
  326. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +0 -29
  327. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +0 -1
  328. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +0 -37
  329. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +0 -1
  330. package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js +0 -29
  331. package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js.map +0 -1
  332. package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js +0 -37
  333. package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js.map +0 -1
  334. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +0 -29
  335. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +0 -1
  336. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +0 -37
  337. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +0 -1
  338. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js +0 -29
  339. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js.map +0 -1
  340. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js +0 -37
  341. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js.map +0 -1
  342. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +0 -29
  343. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +0 -1
  344. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +0 -37
  345. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +0 -1
  346. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +0 -29
  347. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +0 -1
  348. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +0 -37
  349. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +0 -1
  350. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +0 -1
  351. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +0 -29
  352. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +0 -1
  353. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +0 -37
  354. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +0 -1
  355. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +0 -29
  356. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +0 -1
  357. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +0 -37
  358. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +0 -1
  359. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js +0 -29
  360. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js.map +0 -1
  361. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js +0 -37
  362. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js.map +0 -1
  363. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +0 -29
  364. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +0 -1
  365. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +0 -37
  366. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +0 -1
  367. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js +0 -29
  368. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js.map +0 -1
  369. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js +0 -37
  370. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js.map +0 -1
  371. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +0 -29
  372. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +0 -1
  373. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +0 -37
  374. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +0 -1
  375. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +0 -29
  376. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +0 -1
  377. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +0 -37
  378. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +0 -1
  379. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +0 -29
  380. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +0 -1
  381. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +0 -37
  382. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +0 -1
  383. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +0 -29
  384. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +0 -1
  385. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +0 -37
  386. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +0 -1
  387. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js +0 -29
  388. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js.map +0 -1
  389. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js +0 -37
  390. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js.map +0 -1
  391. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +0 -29
  392. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +0 -1
  393. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +0 -37
  394. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +0 -1
  395. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +0 -29
  396. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +0 -1
  397. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +0 -37
  398. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +0 -1
  399. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +0 -29
  400. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +0 -1
  401. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +0 -37
  402. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +0 -1
  403. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +0 -29
  404. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +0 -1
  405. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +0 -37
  406. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +0 -1
  407. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +0 -29
  408. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +0 -1
  409. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +0 -37
  410. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +0 -1
  411. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js +0 -29
  412. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js.map +0 -1
  413. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js +0 -37
  414. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js.map +0 -1
  415. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +0 -29
  416. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +0 -1
  417. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +0 -37
  418. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +0 -1
  419. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js +0 -29
  420. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js.map +0 -1
  421. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js +0 -37
  422. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js.map +0 -1
  423. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +0 -29
  424. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +0 -1
  425. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +0 -37
  426. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +0 -1
  427. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +0 -29
  428. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +0 -1
  429. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +0 -37
  430. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +0 -1
  431. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +0 -29
  432. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +0 -1
  433. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +0 -37
  434. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +0 -1
  435. package/dist/esm/_commonjsHelpers-1789f0cf.js +0 -9
  436. package/dist/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
  437. package/dist/esm/index-b188f201.js +0 -2076
  438. package/dist/esm/index-b188f201.js.map +0 -1
  439. package/dist/esm/polyfills/core-js.js +0 -11
  440. package/dist/esm/polyfills/dom.js +0 -79
  441. package/dist/esm/polyfills/es5-html-element.js +0 -1
  442. package/dist/esm/polyfills/index.js +0 -34
  443. package/dist/esm/polyfills/system.js +0 -6
  444. package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +0 -39
  445. /package/dist/types/Users/{briancorbin/Documents/Programming/Capsule/component-library/core → norwood/capsule-repos/web-sdk/packages/core-components}/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-modal-v2.js","sourceRoot":"","sources":["../../../../src/components/cpsl-modal-v2/cpsl-modal-v2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAgB,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,WAAW;;uCAOqB,IAAI;sCAML,IAAI;;;;;;IA2C9C,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAE7B,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,EAAE,CAAC,KAA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J,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Watch, Element, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-modal-v2',\n styleUrl: 'cpsl-modal-v2.scss',\n shadow: true,\n})\nexport class CpslModalV2 {\n @Element() el!: HTMLCpslModalV2Element;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the modal with a box shadow.\n */\n @Prop() elevated: boolean;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() noOverlay: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n @Watch('open')\n toggleHeight() {\n if (!this.open) {\n this.cpslModalExiting.emit();\n // Animate out before setting display to none\n setTimeout(() => {\n this.el.style.display = 'none';\n this.cpslModalExited.emit();\n }, this.exitTransitionDuration * 1000);\n } else {\n this.cpslModalEntering.emit();\n this.el.style.display = 'flex';\n setTimeout(() => {\n this.cpslModalEntered.emit();\n }, this.enterTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n this.toggleHeight();\n }\n\n render() {\n return (\n <Host class={{ 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay }}>\n {!this.noOverlay && (\n <cpsl-overlay\n zIndexOverride={Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n )}\n <cpsl-card class=\"card\" style={{ transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` }}>\n <slot></slot>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-modal-v2.js","sourceRoot":"","sources":["../../../../src/components/cpsl-modal-v2/cpsl-modal-v2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAgB,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,WAAW;;uCAOqB,IAAI;sCAML,IAAI;;;;;;IA2C9C,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAC7B,6CAA6C;YAC7C,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;gBAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;YAC9B,CAAC,EAAE,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YAC/B,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAC/B,CAAC,EAAE,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE;YACxF,CAAC,IAAI,CAAC,SAAS,IAAI,CAClB,qEACE,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EACrE,EAAE,EAAC,SAAS,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EACrD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH;YACD,kEAAW,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,GAAG,EAAE;gBACvI,8DAAa,CACH,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Watch, Element, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-modal-v2',\n styleUrl: 'cpsl-modal-v2.scss',\n shadow: true,\n})\nexport class CpslModalV2 {\n @Element() el!: HTMLCpslModalV2Element;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the modal with a box shadow.\n */\n @Prop() elevated: boolean;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() noOverlay: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n @Watch('open')\n toggleHeight() {\n if (!this.open) {\n this.cpslModalExiting.emit();\n // Animate out before setting display to none\n setTimeout(() => {\n this.el.style.display = 'none';\n this.cpslModalExited.emit();\n }, this.exitTransitionDuration * 1000);\n } else {\n this.cpslModalEntering.emit();\n this.el.style.display = 'flex';\n setTimeout(() => {\n this.cpslModalEntered.emit();\n }, this.enterTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n this.toggleHeight();\n }\n\n render() {\n return (\n <Host class={{ 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay }}>\n {!this.noOverlay && (\n <cpsl-overlay\n zIndexOverride={this.zIndexOverride ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n )}\n <cpsl-card class=\"card\" style={{ transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` }}>\n <slot></slot>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
@@ -20,7 +20,7 @@ export class CpslNavButtonGroup {
20
20
  item.setAttribute('full-width', 'true');
21
21
  this.selectItem();
22
22
  });
23
- if (Boolean((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length)) {
23
+ if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
24
24
  console.error('cpsl-button is the only valid child of cpsl-nav-button-group');
25
25
  this.otherSlots.forEach(item => item.remove());
26
26
  }
@@ -32,7 +32,7 @@ export class CpslNavButtonGroup {
32
32
  return this.el.querySelectorAll('&> *:not(cpsl-button)');
33
33
  }
34
34
  render() {
35
- return (h(Host, { key: 'c1d80cf6de655e2f8d67de7e9f60f1faa671a63c' }, h("slot", { key: '27db1e6328971b99c904e991fe791978ba31639e' })));
35
+ return (h(Host, { key: '9bd4edd8429e52b060d64fc5cf707c3ee3c26dd4' }, h("slot", { key: 'c035504b8795331c35de8bacab0b252ad4facc0d' })));
36
36
  }
37
37
  static get is() { return "cpsl-nav-button-group"; }
38
38
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-nav-button-group.js","sourceRoot":"","sources":["../../../../src/components/cpsl-nav-button-group/cpsl-nav-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,kBAAkB;;;;IAS7B,UAAU;QACR,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;;QACjB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACxC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,CAAC,EAAE,CAAC;YACrC,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAC9E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, Prop, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-nav-button-group',\n styleUrl: 'cpsl-nav-button-group.scss',\n shadow: true,\n})\nexport class CpslNavButtonGroup {\n @Element() el!: HTMLCpslNavButtonGroupElement;\n\n /**\n * The id of the selected button.\n */\n @Prop() selectedId?: string;\n\n @Watch('selectedId')\n selectItem() {\n this.buttonSlots.forEach(item => {\n if (item.id === this.selectedId) {\n item.classList.add('selected');\n } else {\n item.classList.remove('selected');\n }\n });\n }\n\n componentWillRender() {\n this.buttonSlots.forEach(item => {\n item.setAttribute('variant', 'primary');\n item.setAttribute('full-width', 'true');\n this.selectItem();\n });\n\n if (Boolean(this.otherSlots?.length)) {\n console.error('cpsl-button is the only valid child of cpsl-nav-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get buttonSlots() {\n return this.el.querySelectorAll('cpsl-button');\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-button)');\n }\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-nav-button-group.js","sourceRoot":"","sources":["../../../../src/components/cpsl-nav-button-group/cpsl-nav-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,kBAAkB;;;;IAS7B,UAAU;QACR,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;;QACjB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACxC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,IAAI,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE,CAAC;YAC5B,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAC9E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, Prop, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-nav-button-group',\n styleUrl: 'cpsl-nav-button-group.scss',\n shadow: true,\n})\nexport class CpslNavButtonGroup {\n @Element() el!: HTMLCpslNavButtonGroupElement;\n\n /**\n * The id of the selected button.\n */\n @Prop() selectedId?: string;\n\n @Watch('selectedId')\n selectItem() {\n this.buttonSlots.forEach(item => {\n if (item.id === this.selectedId) {\n item.classList.add('selected');\n } else {\n item.classList.remove('selected');\n }\n });\n }\n\n componentWillRender() {\n this.buttonSlots.forEach(item => {\n item.setAttribute('variant', 'primary');\n item.setAttribute('full-width', 'true');\n this.selectItem();\n });\n\n if (this.otherSlots?.length) {\n console.error('cpsl-button is the only valid child of cpsl-nav-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get buttonSlots() {\n return this.el.querySelectorAll('cpsl-button');\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-button)');\n }\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -15,6 +15,7 @@ export class CpslOverlay {
15
15
  document.documentElement.style.overflow = 'hidden';
16
16
  }
17
17
  else {
18
+ // Setting a timeout here to prevent modal from shifting when the scroll bar appears
18
19
  setTimeout(() => {
19
20
  document.documentElement.style.overflow = 'auto';
20
21
  }, this.exitTransitionDuration * 1000);
@@ -27,7 +28,7 @@ export class CpslOverlay {
27
28
  }
28
29
  }
29
30
  render() {
30
- return (h(Host, { key: '919a85b739f0d93b6453780b447a7ab8abde3427', style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: '743486d02a50741550ae49b36b7e0c11b949b46a' })));
31
+ return (h(Host, { key: 'c3a05ed63108fbe8354b5cd3bb1c08d02cf39a60', style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: '6b57f3341e2f11611cbd1fe44fb3088c8e3a434a' })));
31
32
  }
32
33
  static get is() { return "cpsl-overlay"; }
33
34
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-overlay.js","sourceRoot":"","sources":["../../../../src/components/cpsl-overlay/cpsl-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,WAAW;;uCAOqB,GAAG;sCAMJ,GAAG;;;;IAa7C,YAAY;QACV,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YACvH,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAExH,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACrD,CAAC;aAAM,CAAC;YAEN,UAAU,CAAC,GAAG,EAAE;gBACd,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;YACnD,CAAC,EAAE,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,gBAAgB;QACd,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;YACtH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACrD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE;YACnF,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch } from '@stencil/core';\nimport gsap from 'gsap';\n\n@Component({\n tag: 'cpsl-overlay',\n styleUrl: 'cpsl-overlay.scss',\n shadow: true,\n})\nexport class CpslOverlay {\n @Element() el!: HTMLCpslOverlayElement;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() enterTransitionDuration?: number = 0.5;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() exitTransitionDuration?: number = 0.5;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('open')\n toggleHeight() {\n this.open\n ? gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 })\n : gsap.timeline({ defaults: { duration: this.exitTransitionDuration } }).to(this.el, { display: 'none', opacity: 0 });\n\n if (this.open) {\n document.documentElement.style.overflow = 'hidden';\n } else {\n // Setting a timeout here to prevent modal from shifting when the scroll bar appears\n setTimeout(() => {\n document.documentElement.style.overflow = 'auto';\n }, this.exitTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n if (this.open) {\n gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 });\n document.documentElement.style.overflow = 'hidden';\n }\n }\n\n render() {\n return (\n <Host style={Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-overlay.js","sourceRoot":"","sources":["../../../../src/components/cpsl-overlay/cpsl-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,WAAW;;uCAOqB,GAAG;sCAMJ,GAAG;;;;IAa7C,YAAY;QACV,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,E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AAC,CAAC,CAAC,EAAE;YAC1E,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch } from '@stencil/core';\nimport gsap from 'gsap';\n\n@Component({\n tag: 'cpsl-overlay',\n styleUrl: 'cpsl-overlay.scss',\n shadow: true,\n})\nexport class CpslOverlay {\n @Element() el!: HTMLCpslOverlayElement;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() enterTransitionDuration?: number = 0.5;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() exitTransitionDuration?: number = 0.5;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('open')\n toggleHeight() {\n this.open\n ? gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 })\n : gsap.timeline({ defaults: { duration: this.exitTransitionDuration } }).to(this.el, { display: 'none', opacity: 0 });\n\n if (this.open) {\n document.documentElement.style.overflow = 'hidden';\n } else {\n // Setting a timeout here to prevent modal from shifting when the scroll bar appears\n setTimeout(() => {\n document.documentElement.style.overflow = 'auto';\n }, this.exitTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n if (this.open) {\n gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 });\n document.documentElement.style.overflow = 'hidden';\n }\n }\n\n render() {\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -71,7 +71,7 @@ export class CpslPagination {
71
71
  filteredPages.push(this.totalPages - 1);
72
72
  }
73
73
  }
74
- return (h(Host, { key: '0256d628867d9f9e48fbe9959267d75c3bd31637' }, h("cpsl-button-group", { key: '33ca6823866c975e1e17bba0009bed1da9e42d25', selectedId: `${this.currentPage}` }, h("cpsl-button", { key: '3f2727aa63723afc21ca07c634de14ba3d613db9', class: "arrow-button", onClick: this.handlePrevClick }, h("cpsl-icon", { key: '732be305dd09deddab8cfdaab33de67f701b0ecf', class: { 'icon': true, 'start-icon': true }, icon: "arrowNarrow" })), filteredPages.map(page => (h("cpsl-button", { key: page, variant: "secondary", fullWidth: true, id: `${page}`, onClick: this.handlePageClick(page) }, h("cpsl-text", { variant: "bodyS" }, page + 1)))), h("cpsl-button", { key: 'e5f88f5dbf1070170f686fb4dd8e42a5573746a7', class: "arrow-button", onClick: this.handleNextClick }, h("cpsl-icon", { key: 'b85203ed5334aeece97829633d6385cbe52aa1e7', class: "icon", icon: "arrowNarrow" })))));
74
+ return (h(Host, { key: '89d002fff30667f081dcb91e3380b3d452860bf9' }, h("cpsl-button-group", { key: '169546258dbb7bcf29f4914f77e677f1addcc400', selectedId: `${this.currentPage}` }, h("cpsl-button", { key: 'fb523b4e254412493b0f7c86be13a05eed38efff', class: "arrow-button", onClick: this.handlePrevClick }, h("cpsl-icon", { key: 'c455f7f3b349e6c43ec5f5da3a2b76630bb1c73f', class: { 'icon': true, 'start-icon': true }, icon: "arrowNarrow" })), filteredPages.map(page => (h("cpsl-button", { key: page, variant: "secondary", fullWidth: true, id: `${page}`, onClick: this.handlePageClick(page) }, h("cpsl-text", { variant: "bodyS" }, page + 1)))), h("cpsl-button", { key: '52c54082f971199a7a5a231f11a2fb3f063c2b9e', class: "arrow-button", onClick: this.handleNextClick }, h("cpsl-icon", { key: '300954f69d40f4077bdc1e77f46d66c99f7c7ac0', class: "icon", icon: "arrowNarrow" })))));
75
75
  }
76
76
  static get is() { return "cpsl-pagination"; }
77
77
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-pagination.js","sourceRoot":"","sources":["../../../../src/components/cpsl-pagination/cpsl-pagination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AAC,MAAM,EAAC,IAAI,EAAC,aAAa,GAAG,CACjC,CACI,CACf,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Event, h, EventEmitter, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pagination',\n styleUrl: 'cpsl-pagination.scss',\n shadow: true,\n})\nexport class CpslPagination {\n @State() currentPage = 0;\n\n /**\n * The initial page to select.\n * Default is 0.\n */\n @Prop() initialPage?: number;\n\n /**\n * The total number of pages.\n */\n @Prop() totalPages: number;\n\n /**\n * The number of pages visible to select.\n * Default is 5.\n * Min is 5.\n */\n\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) visiblePages?: number = 5;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslPaginationChanged!: EventEmitter<number>;\n\n @Watch('currentPage')\n watchChange() {\n this.cpslPaginationChanged.emit(this.currentPage);\n }\n\n componentWillLoad() {\n this.currentPage = this.initialPage ?? 0;\n if (this.visiblePages < 5) {\n this.visiblePages = 5;\n }\n }\n\n private handlePrevClick = () => {\n if (this.currentPage > 0) {\n this.currentPage--;\n }\n };\n\n private handleNextClick = () => {\n if (this.currentPage < this.totalPages - 1) {\n this.currentPage++;\n }\n };\n\n private handlePageClick = (value: number) => () => {\n if (value >= 0 && value <= this.totalPages - 1) {\n this.currentPage = value;\n }\n };\n\n render() {\n const filteredPages: number[] = this.totalPages <= this.visiblePages ? [...Array(this.totalPages).keys()] : [];\n\n if (this.totalPages > this.visiblePages) {\n filteredPages.push(0);\n\n const isFirstSelected = this.currentPage === 0;\n const isLastSelected = this.currentPage === this.totalPages - 1;\n const isFirstOrLastSelected = isFirstSelected || isLastSelected;\n\n let remainingVisible = this.visiblePages - (isFirstOrLastSelected ? 2 : 3);\n const halfRemaining = Math.round(remainingVisible / 2);\n const numberBefore = Math.max(this.currentPage - 1, 0);\n const numberAfter = Math.max(this.totalPages - 2 - this.currentPage, 0);\n let beforeHalf = halfRemaining;\n let afterHalf = remainingVisible - halfRemaining;\n\n if (numberBefore >= beforeHalf) {\n if (numberAfter < afterHalf) {\n beforeHalf += afterHalf - numberAfter;\n afterHalf = numberAfter;\n }\n } else {\n afterHalf += beforeHalf - numberBefore;\n beforeHalf = numberBefore;\n }\n\n while (beforeHalf > 0) {\n filteredPages.push(this.currentPage - beforeHalf);\n beforeHalf--;\n }\n\n if (!isFirstSelected) {\n filteredPages.push(this.currentPage);\n }\n\n const pagesAfter: number[] = [];\n while (afterHalf > 0) {\n pagesAfter.push(this.currentPage + afterHalf);\n afterHalf--;\n }\n\n filteredPages.push(...pagesAfter.reverse());\n\n if (!isLastSelected) {\n filteredPages.push(this.totalPages - 1);\n }\n }\n\n return (\n <Host>\n <cpsl-button-group selectedId={`${this.currentPage}`}>\n <cpsl-button class=\"arrow-button\" onClick={this.handlePrevClick}>\n <cpsl-icon class={{ 'icon': true, 'start-icon': true }} icon=\"arrowNarrow\" />\n </cpsl-button>\n {filteredPages.map(page => (\n <cpsl-button key={page} variant=\"secondary\" fullWidth id={`${page}`} onClick={this.handlePageClick(page)}>\n <cpsl-text variant=\"bodyS\">{page + 1}</cpsl-text>\n </cpsl-button>\n ))}\n <cpsl-button class=\"arrow-button\" onClick={this.handleNextClick}>\n <cpsl-icon class=\"icon\" icon=\"arrowNarrow\" />\n </cpsl-button>\n </cpsl-button-group>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-pagination.js","sourceRoot":"","sources":["../../../../src/components/cpsl-pagination/cpsl-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,cAAc;;QAuCjB,oBAAe,GAAG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cesContent":["import { Component, Host, Prop, State, Event, h, EventEmitter, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pagination',\n styleUrl: 'cpsl-pagination.scss',\n shadow: true,\n})\nexport class CpslPagination {\n @State() currentPage = 0;\n\n /**\n * The initial page to select.\n * Default is 0.\n */\n @Prop() initialPage?: number;\n\n /**\n * The total number of pages.\n */\n @Prop() totalPages: number;\n\n /**\n * The number of pages visible to select.\n * Default is 5.\n * Min is 5.\n */\n\n @Prop({ mutable: true }) visiblePages?: number = 5;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslPaginationChanged!: EventEmitter<number>;\n\n @Watch('currentPage')\n watchChange() {\n this.cpslPaginationChanged.emit(this.currentPage);\n }\n\n componentWillLoad() {\n this.currentPage = this.initialPage ?? 0;\n if (this.visiblePages < 5) {\n this.visiblePages = 5;\n }\n }\n\n private handlePrevClick = () => {\n if (this.currentPage > 0) {\n this.currentPage--;\n }\n };\n\n private handleNextClick = () => {\n if (this.currentPage < this.totalPages - 1) {\n this.currentPage++;\n }\n };\n\n private handlePageClick = (value: number) => () => {\n if (value >= 0 && value <= this.totalPages - 1) {\n this.currentPage = value;\n }\n };\n\n render() {\n const filteredPages: number[] = this.totalPages <= this.visiblePages ? [...Array(this.totalPages).keys()] : [];\n\n if (this.totalPages > this.visiblePages) {\n filteredPages.push(0);\n\n const isFirstSelected = this.currentPage === 0;\n const isLastSelected = this.currentPage === this.totalPages - 1;\n const isFirstOrLastSelected = isFirstSelected || isLastSelected;\n\n let remainingVisible = this.visiblePages - (isFirstOrLastSelected ? 2 : 3);\n const halfRemaining = Math.round(remainingVisible / 2);\n const numberBefore = Math.max(this.currentPage - 1, 0);\n const numberAfter = Math.max(this.totalPages - 2 - this.currentPage, 0);\n let beforeHalf = halfRemaining;\n let afterHalf = remainingVisible - halfRemaining;\n\n if (numberBefore >= beforeHalf) {\n if (numberAfter < afterHalf) {\n beforeHalf += afterHalf - numberAfter;\n afterHalf = numberAfter;\n }\n } else {\n afterHalf += beforeHalf - numberBefore;\n beforeHalf = numberBefore;\n }\n\n while (beforeHalf > 0) {\n filteredPages.push(this.currentPage - beforeHalf);\n beforeHalf--;\n }\n\n if (!isFirstSelected) {\n filteredPages.push(this.currentPage);\n }\n\n const pagesAfter: number[] = [];\n while (afterHalf > 0) {\n pagesAfter.push(this.currentPage + afterHalf);\n afterHalf--;\n }\n\n filteredPages.push(...pagesAfter.reverse());\n\n if (!isLastSelected) {\n filteredPages.push(this.totalPages - 1);\n }\n }\n\n return (\n <Host>\n <cpsl-button-group selectedId={`${this.currentPage}`}>\n <cpsl-button class=\"arrow-button\" onClick={this.handlePrevClick}>\n <cpsl-icon class={{ 'icon': true, 'start-icon': true }} icon=\"arrowNarrow\" />\n </cpsl-button>\n {filteredPages.map(page => (\n <cpsl-button key={page} variant=\"secondary\" fullWidth id={`${page}`} onClick={this.handlePageClick(page)}>\n <cpsl-text variant=\"bodyS\">{page + 1}</cpsl-text>\n </cpsl-button>\n ))}\n <cpsl-button class=\"arrow-button\" onClick={this.handleNextClick}>\n <cpsl-icon class=\"icon\" icon=\"arrowNarrow\" />\n </cpsl-button>\n </cpsl-button-group>\n </Host>\n );\n }\n}\n"]}
@@ -4,7 +4,7 @@ export class CpslPill {
4
4
  this.text = undefined;
5
5
  }
6
6
  render() {
7
- return (h(Host, { key: '81f5ffe5b0eab569386324c33d0b1eb2c4b21058' }, h("div", { key: '6d989b02dcd2651574503154c662e960e9b86881', class: "pill-container" }, h("span", { key: 'f686ad83dd9bca59a9b199fd6517d0c2fccb191c' }, this.text))));
7
+ return (h(Host, { key: 'db0f2db5e1ae046fb4498c5fa2974f56d461ca46' }, h("div", { key: 'a1f1fb791f0b228073008c2f864574f5d4cb47db', class: "pill-container" }, h("span", { key: 'd64c09db81a3c7f4ded1559fbc8351204cd71bb5' }, this.text))));
8
8
  }
9
9
  static get is() { return "cpsl-pill"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -66,10 +66,12 @@
66
66
 
67
67
  .container {
68
68
  visibility: hidden;
69
+ height: 0px;
69
70
  }
70
71
 
71
72
  .open {
72
73
  visibility: visible;
74
+ height: auto;
73
75
  z-index: 10006;
74
76
  }
75
77
 
@@ -23,18 +23,23 @@ export class CpslPopover {
23
23
  this.triggerClicked = false;
24
24
  this.configureTriggerInteraction = () => {
25
25
  const { trigger, triggerAction, destroyTriggerInteraction } = this;
26
- if (Boolean(destroyTriggerInteraction)) {
26
+ if (destroyTriggerInteraction) {
27
27
  destroyTriggerInteraction();
28
28
  }
29
29
  if (trigger === undefined) {
30
30
  return;
31
31
  }
32
32
  this.triggerEl = document.getElementById(trigger);
33
- if (!Boolean(this.triggerEl)) {
33
+ if (!this.triggerEl) {
34
34
  console.error(`A trigger element with the ID "${trigger}" was not found in the DOM.`, this.el);
35
35
  return;
36
36
  }
37
37
  let triggerCallbacks = [];
38
+ /**
39
+ * Based upon the kind of trigger interaction
40
+ * the user wants, we setup the correct event
41
+ * listeners.
42
+ */
38
43
  switch (triggerAction) {
39
44
  case 'hover':
40
45
  triggerCallbacks = [
@@ -86,7 +91,7 @@ export class CpslPopover {
86
91
  this.setPosition = () => {
87
92
  var _a;
88
93
  const anchorEl = (_a = this.anchorEl) !== null && _a !== void 0 ? _a : this.triggerEl;
89
- if (Boolean(anchorEl)) {
94
+ if (anchorEl) {
90
95
  const windowWidth = window.innerWidth;
91
96
  const windowHeight = window.innerHeight;
92
97
  const elWidth = this.el.clientWidth;
@@ -171,6 +176,9 @@ export class CpslPopover {
171
176
  this.trigger = undefined;
172
177
  this.windowPadding = 16;
173
178
  }
179
+ /**
180
+ * Call to close the popover manually.
181
+ */
174
182
  closePopover() {
175
183
  return __awaiter(this, void 0, void 0, function* () {
176
184
  this.close();
@@ -186,10 +194,12 @@ export class CpslPopover {
186
194
  if (this.open) {
187
195
  window.addEventListener('click', this.handleClickOutside);
188
196
  window.addEventListener('scroll', () => this.setPosition(), true);
197
+ window.addEventListener('resize', () => this.setPosition(), true);
189
198
  }
190
199
  else {
191
200
  window.removeEventListener('click', this.handleClickOutside);
192
- window.addEventListener('scroll', () => this.setPosition());
201
+ window.removeEventListener('scroll', () => this.setPosition(), true);
202
+ window.removeEventListener('resize', () => this.setPosition(), true);
193
203
  }
194
204
  }
195
205
  componentDidLoad() {
@@ -201,7 +211,7 @@ export class CpslPopover {
201
211
  }
202
212
  render() {
203
213
  var _a;
204
- return (h(Host, { key: 'bd7eae025737b5aa941191dbe9d8812134c360e3', class: {
214
+ return (h(Host, { key: '338d4a705c7bcd6a5ac6e1db38d7c077b8125dcb', class: {
205
215
  'open': this.open,
206
216
  'transform-h-left': this.transformOriginHorizontal === 'left',
207
217
  'transform-h-center': this.transformOriginHorizontal === 'center',
@@ -209,7 +219,7 @@ export class CpslPopover {
209
219
  'transform-v-top': this.transformOriginVertical === 'top',
210
220
  'transform-v-center': this.transformOriginVertical === 'center',
211
221
  'transform-v-bottom': this.transformOriginVertical === 'bottom',
212
- }, style: { top: `${this.positionY}px`, left: `${this.positionX}px`, width: this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px` } }, h("div", { key: '10a1464f27c340faf62a5dafad0860b1d25c4041', id: "container", class: { container: true, open: this.open } }, h("slot", { key: '575660d8738d4cecc1ad8b4c5ffeb035cd1bba66' }))));
222
+ }, style: { top: `${this.positionY}px`, left: `${this.positionX}px`, width: !this.open ? '0px' : this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px` } }, h("div", { key: 'dcd6ed99f039f905fe72850ff7943a7d8afc8335', id: "container", class: { container: true, open: this.open } }, h("slot", { key: '39e0e5f281f261e1828f82f30ead2728a10f92ac' }))));
213
223
  }
214
224
  static get is() { return "cpsl-popover"; }
215
225
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-popover.js","sourceRoot":"","sources":["../../../../src/components/cpsl-popover/cpsl-popover.tsx"],"names":[],"mappings":";;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M;gBAC7D,oBAAoB,EAAE,IAAI,CAAC,yBAAyB,KAAK,QAAQ;gBACjE,mBAAmB,EAAE,IAAI,CAAC,yBAAyB,KAAK,OAAO;gBAC/D,iBAAiB,EAAE,IAAI,CAAC,uBAAuB,KAAK,KAAK;gBACzD,oBAAoB,EAAE,IAAI,CAAC,uBAAuB,KAAK,QAAQ;gBAC/D,oBAAoB,EAAE,IAAI,CAAC,uBAAuB,KAAK,QAAQ;aAChE,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAA,IAAI,CAAC,SAAS,0CAAE,WAAW,IAAI,EAAE;YAEvI,4DAAK,EAAE,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;gBAC7D,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Watch, Element, h, Method, Event, EventEmitter } from '@stencil/core';\nimport { InteractionCallback } from '../../interface';\n\n@Component({\n tag: 'cpsl-popover',\n styleUrl: 'cpsl-popover.scss',\n shadow: true,\n})\nexport class CpslPopover {\n private triggerEl?: HTMLElement | null;\n private destroyTriggerInteraction?: () => void;\n\n @Element() el!: HTMLCpslPopoverElement;\n\n @State() open = false;\n private triggerClicked = false;\n @State() positionX?: number;\n @State() positionY?: number;\n\n /**\n * ID for the element that the popover anchors to.\n */\n @Prop() anchorEl?: HTMLElement;\n\n /**\n * Vertical anchor origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() anchorOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical anchor origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() anchorOriginVertical?: 'top' | 'center' | 'bottom' = 'bottom';\n\n /**\n * If `true` the container will use the width of the content, else it will be set to the width of the trigger.\n * Default is `true`\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autoWidth?: boolean = true;\n\n /**\n * Whether or not to disable to popover.\n */\n @Prop() disabled: boolean;\n\n /**\n * Used internally to prevent select from blurring unintentionally.\n */\n @Prop() preventBlur: boolean;\n\n /**\n * Vertical transformation origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() transformOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical transformation origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() transformOriginVertical?: 'top' | 'center' | 'bottom' = 'top';\n\n /**\n * Which trigger causes the popover to open.\n * Options are: `\"click\"`, `\"hover\"`.\n * Default is: `\"click\"`.\n */\n @Prop() triggerAction: 'click' | 'hover' = 'click';\n\n /**\n * ID for the element that triggers the popover to open.\n */\n @Prop() trigger: string;\n\n /**\n * Padding from edge of window for the popover container.\n */\n @Prop() windowPadding?: number = 16;\n\n /**\n * Emitted when the popover opens.\n */\n @Event() cpslOpen!: EventEmitter<void>;\n\n /**\n * Emitted when the popover closes.\n */\n @Event() cpslClose!: EventEmitter<void>;\n\n /**\n * Call to close the popover manually.\n */\n @Method()\n async closePopover() {\n this.close();\n }\n\n @Watch('trigger')\n @Watch('triggerAction')\n @Watch('preventBlur')\n onTriggerChange() {\n this.configureTriggerInteraction();\n }\n\n @Watch('anchorOriginHorizontal')\n @Watch('anchorOriginVertical')\n onAnchorChange() {\n this.setPosition();\n }\n\n @Watch('open')\n onOpenChange() {\n if (this.open) {\n window.addEventListener('click', this.handleClickOutside);\n window.addEventListener('scroll', () => this.setPosition(), true);\n } else {\n window.removeEventListener('click', this.handleClickOutside);\n window.addEventListener('scroll', () => this.setPosition());\n }\n }\n\n componentDidLoad() {\n this.configureTriggerInteraction();\n }\n\n private configureTriggerInteraction = () => {\n const { trigger, triggerAction, destroyTriggerInteraction } = this;\n\n if (Boolean(destroyTriggerInteraction)) {\n destroyTriggerInteraction();\n }\n\n if (trigger === undefined) {\n return;\n }\n\n this.triggerEl = document.getElementById(trigger);\n if (!Boolean(this.triggerEl)) {\n console.error(`A trigger element with the ID \"${trigger}\" was not found in the DOM.`, this.el);\n return;\n }\n\n let triggerCallbacks: InteractionCallback[] = [];\n /**\n * Based upon the kind of trigger interaction\n * the user wants, we setup the correct event\n * listeners.\n */\n switch (triggerAction) {\n case 'hover':\n triggerCallbacks = [\n {\n eventName: 'mouseenter',\n callback: async () => {\n this.present();\n },\n },\n {\n eventName: 'mouseleave',\n callback: () => {\n if (!this.containerEl.matches(':hover')) {\n this.close();\n } else {\n this.containerEl.addEventListener('mouseleave', () => {\n this.close();\n });\n }\n },\n },\n {\n eventName: 'click',\n callback: (ev: Event) => ev.stopPropagation(),\n },\n ];\n\n break;\n case 'click':\n default:\n triggerCallbacks = [\n {\n eventName: 'mousedown',\n callback: e => {\n if (this.preventBlur) {\n e.preventDefault();\n }\n this.present();\n },\n },\n ];\n break;\n }\n\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.addEventListener(eventName, callback));\n\n this.destroyTriggerInteraction = () => {\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.removeEventListener(eventName, callback));\n };\n };\n\n private setPosition = () => {\n const anchorEl = this.anchorEl ?? this.triggerEl;\n if (Boolean(anchorEl)) {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const elWidth = this.el.clientWidth;\n const elHeight = this.el.clientHeight;\n const { top, left, height, width } = anchorEl.getBoundingClientRect();\n\n switch (this.anchorOriginHorizontal) {\n case 'left': {\n this.positionX = left;\n break;\n }\n case 'center': {\n this.positionX = left + width / 2;\n break;\n }\n case 'right': {\n this.positionX = left + width;\n break;\n }\n }\n\n switch (this.anchorOriginVertical) {\n case 'top': {\n this.positionY = top;\n break;\n }\n case 'center': {\n this.positionY = top + height / 2;\n break;\n }\n case 'bottom': {\n this.positionY = top + height;\n break;\n }\n }\n\n if (this.positionY < this.windowPadding) {\n this.positionY = this.windowPadding;\n }\n if (this.positionY + elHeight > windowHeight - 16) {\n this.positionY = windowHeight - this.windowPadding - elHeight;\n }\n\n if (this.positionX < this.windowPadding) {\n this.positionX = this.windowPadding;\n }\n if (this.positionX + elWidth > windowWidth - 16) {\n this.positionX = windowWidth - this.windowPadding - elWidth;\n }\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (!this.triggerClicked && this.triggerEl.contains(event.target as Node)) {\n this.triggerClicked = true;\n return;\n }\n if (this.open && !this.el.contains(event.target as Node)) {\n event.preventDefault();\n this.close();\n }\n };\n\n private present = () => {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.cpslOpen.emit();\n this.setPosition();\n }\n };\n\n private close = () => {\n this.open = false;\n this.triggerClicked = false;\n this.cpslClose.emit();\n };\n\n get containerEl() {\n return this.el?.shadowRoot?.getElementById('container');\n }\n\n render() {\n return (\n <Host\n class={{\n 'open': this.open,\n 'transform-h-left': this.transformOriginHorizontal === 'left',\n 'transform-h-center': this.transformOriginHorizontal === 'center',\n 'transform-h-right': this.transformOriginHorizontal === 'right',\n 'transform-v-top': this.transformOriginVertical === 'top',\n 'transform-v-center': this.transformOriginVertical === 'center',\n 'transform-v-bottom': this.transformOriginVertical === 'bottom',\n }}\n style={{ top: `${this.positionY}px`, left: `${this.positionX}px`, width: this.autoWidth ? 'auto' : `${this.triggerEl?.clientWidth}px` }}\n >\n <div id=\"container\" class={{ container: true, open: this.open }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-popover.js","sourceRoot":"","sources":["../../../../src/components/cpsl-popover/cpsl-popover.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAQ7G,MAAM,OAAO,WAAW;;QAOd,mBAAc,GAAG,KAAK,CAAC;QAuHvB,gCAA2B,GAAG,GAAG,EAAE;YACzC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,GAAG,IAAI,CAAC;YAEnE,IAAI,yBAAyB,EAAE,CAAC;gBAC9B,yBAAyB,EAAE,CAAC;YAC9B,CAAC;YAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,OAAO;YACT,CAAC;YAED,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YAClD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,kCAAkC,OAAO,6BAA6B,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;gBAC/F,OAAO;YACT,CAAC;YAED,IAAI,gBAAgB,GAA0B,EAAE,CAAC;YACjD;;;;eAIG;YACH,QAAQ,aAAa,EAAE,CAAC;gBACtB,KAAK,OAAO;oBACV,gBAAgB,GAAG;wBACjB;4BACE,SAAS,EAAE,YAAY;4BACvB,QAAQ,EAAE,GAAS,EAAE;gCACnB,IAAI,CAAC,OAAO,E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AAE;gBAC7D,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Watch, Element, h, Method, Event, EventEmitter } from '@stencil/core';\nimport { InteractionCallback } from '../../interface';\n\n@Component({\n tag: 'cpsl-popover',\n styleUrl: 'cpsl-popover.scss',\n shadow: true,\n})\nexport class CpslPopover {\n private triggerEl?: HTMLElement | null;\n private destroyTriggerInteraction?: () => void;\n\n @Element() el!: HTMLCpslPopoverElement;\n\n @State() open = false;\n private triggerClicked = false;\n @State() positionX?: number;\n @State() positionY?: number;\n\n /**\n * ID for the element that the popover anchors to.\n */\n @Prop() anchorEl?: HTMLElement;\n\n /**\n * Vertical anchor origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() anchorOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical anchor origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() anchorOriginVertical?: 'top' | 'center' | 'bottom' = 'bottom';\n\n /**\n * If `true` the container will use the width of the content, else it will be set to the width of the trigger.\n * Default is `true`\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autoWidth?: boolean = true;\n\n /**\n * Whether or not to disable to popover.\n */\n @Prop() disabled: boolean;\n\n /**\n * Used internally to prevent select from blurring unintentionally.\n */\n @Prop() preventBlur: boolean;\n\n /**\n * Vertical transformation origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() transformOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical transformation origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() transformOriginVertical?: 'top' | 'center' | 'bottom' = 'top';\n\n /**\n * Which trigger causes the popover to open.\n * Options are: `\"click\"`, `\"hover\"`.\n * Default is: `\"click\"`.\n */\n @Prop() triggerAction: 'click' | 'hover' = 'click';\n\n /**\n * ID for the element that triggers the popover to open.\n */\n @Prop() trigger: string;\n\n /**\n * Padding from edge of window for the popover container.\n */\n @Prop() windowPadding?: number = 16;\n\n /**\n * Emitted when the popover opens.\n */\n @Event() cpslOpen!: EventEmitter<void>;\n\n /**\n * Emitted when the popover closes.\n */\n @Event() cpslClose!: EventEmitter<void>;\n\n /**\n * Call to close the popover manually.\n */\n @Method()\n async closePopover() {\n this.close();\n }\n\n @Watch('trigger')\n @Watch('triggerAction')\n @Watch('preventBlur')\n onTriggerChange() {\n this.configureTriggerInteraction();\n }\n\n @Watch('anchorOriginHorizontal')\n @Watch('anchorOriginVertical')\n onAnchorChange() {\n this.setPosition();\n }\n\n @Watch('open')\n onOpenChange() {\n if (this.open) {\n window.addEventListener('click', this.handleClickOutside);\n window.addEventListener('scroll', () => this.setPosition(), true);\n window.addEventListener('resize', () => this.setPosition(), true);\n } else {\n window.removeEventListener('click', this.handleClickOutside);\n window.removeEventListener('scroll', () => this.setPosition(), true);\n window.removeEventListener('resize', () => this.setPosition(), true);\n }\n }\n\n componentDidLoad() {\n this.configureTriggerInteraction();\n }\n\n private configureTriggerInteraction = () => {\n const { trigger, triggerAction, destroyTriggerInteraction } = this;\n\n if (destroyTriggerInteraction) {\n destroyTriggerInteraction();\n }\n\n if (trigger === undefined) {\n return;\n }\n\n this.triggerEl = document.getElementById(trigger);\n if (!this.triggerEl) {\n console.error(`A trigger element with the ID \"${trigger}\" was not found in the DOM.`, this.el);\n return;\n }\n\n let triggerCallbacks: InteractionCallback[] = [];\n /**\n * Based upon the kind of trigger interaction\n * the user wants, we setup the correct event\n * listeners.\n */\n switch (triggerAction) {\n case 'hover':\n triggerCallbacks = [\n {\n eventName: 'mouseenter',\n callback: async () => {\n this.present();\n },\n },\n {\n eventName: 'mouseleave',\n callback: () => {\n if (!this.containerEl.matches(':hover')) {\n this.close();\n } else {\n this.containerEl.addEventListener('mouseleave', () => {\n this.close();\n });\n }\n },\n },\n {\n eventName: 'click',\n callback: (ev: Event) => ev.stopPropagation(),\n },\n ];\n\n break;\n case 'click':\n default:\n triggerCallbacks = [\n {\n eventName: 'mousedown',\n callback: e => {\n if (this.preventBlur) {\n e.preventDefault();\n }\n this.present();\n },\n },\n ];\n break;\n }\n\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.addEventListener(eventName, callback));\n\n this.destroyTriggerInteraction = () => {\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.removeEventListener(eventName, callback));\n };\n };\n\n private setPosition = () => {\n const anchorEl = this.anchorEl ?? this.triggerEl;\n if (anchorEl) {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const elWidth = this.el.clientWidth;\n const elHeight = this.el.clientHeight;\n const { top, left, height, width } = anchorEl.getBoundingClientRect();\n\n switch (this.anchorOriginHorizontal) {\n case 'left': {\n this.positionX = left;\n break;\n }\n case 'center': {\n this.positionX = left + width / 2;\n break;\n }\n case 'right': {\n this.positionX = left + width;\n break;\n }\n }\n\n switch (this.anchorOriginVertical) {\n case 'top': {\n this.positionY = top;\n break;\n }\n case 'center': {\n this.positionY = top + height / 2;\n break;\n }\n case 'bottom': {\n this.positionY = top + height;\n break;\n }\n }\n\n if (this.positionY < this.windowPadding) {\n this.positionY = this.windowPadding;\n }\n if (this.positionY + elHeight > windowHeight - 16) {\n this.positionY = windowHeight - this.windowPadding - elHeight;\n }\n\n if (this.positionX < this.windowPadding) {\n this.positionX = this.windowPadding;\n }\n if (this.positionX + elWidth > windowWidth - 16) {\n this.positionX = windowWidth - this.windowPadding - elWidth;\n }\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (!this.triggerClicked && this.triggerEl.contains(event.target as Node)) {\n this.triggerClicked = true;\n return;\n }\n if (this.open && !this.el.contains(event.target as Node)) {\n event.preventDefault();\n this.close();\n }\n };\n\n private present = () => {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.cpslOpen.emit();\n this.setPosition();\n }\n };\n\n private close = () => {\n this.open = false;\n this.triggerClicked = false;\n this.cpslClose.emit();\n };\n\n get containerEl() {\n return this.el?.shadowRoot?.getElementById('container');\n }\n\n render() {\n return (\n <Host\n class={{\n 'open': this.open,\n 'transform-h-left': this.transformOriginHorizontal === 'left',\n 'transform-h-center': this.transformOriginHorizontal === 'center',\n 'transform-h-right': this.transformOriginHorizontal === 'right',\n 'transform-v-top': this.transformOriginVertical === 'top',\n 'transform-v-center': this.transformOriginVertical === 'center',\n 'transform-v-bottom': this.transformOriginVertical === 'bottom',\n }}\n style={{ top: `${this.positionY}px`, left: `${this.positionX}px`, width: !this.open ? '0px' : this.autoWidth ? 'auto' : `${this.triggerEl?.clientWidth}px` }}\n >\n <div id=\"container\" class={{ container: true, open: this.open }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -58,8 +58,12 @@
58
58
  --qr-background-color: var(--cpsl-color-qr-background);
59
59
  --qr-border-color: var(--cpsl-color-qr-border);
60
60
  --qr-border-radius: var(--cpsl-border-radius-qr-code);
61
- --qr-border-width: 1px;
62
- --qr-box-shadow: 0px 1px 2px var(--cpsl-color-alpha-black-10);
61
+ --qr-border-width: 0px;
62
+ --qr-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.06);
63
+ --qr-padding-top: 12px;
64
+ --qr-padding-end: 12px;
65
+ --qr-padding-bottom: 12px;
66
+ --qr-padding-start: 12px;
63
67
  display: inline-block;
64
68
  }
65
69
 
@@ -70,7 +74,7 @@
70
74
  padding-inline-end: var(--qr-padding-end);
71
75
  padding-top: var(--qr-padding-top);
72
76
  padding-bottom: var(--qr-padding-bottom);
73
- display: flex;
77
+ box-sizing: border-box;
74
78
  color: var(--qr-color);
75
79
  border-style: solid;
76
80
  border-width: var(--qr-border-width);
@@ -78,4 +82,9 @@
78
82
  border-radius: var(--qr-border-radius);
79
83
  background: var(--qr-background-color);
80
84
  box-shadow: var(--qr-box-shadow);
85
+ }
86
+
87
+ .qr-code {
88
+ width: 100%;
89
+ height: 100%;
81
90
  }
@@ -1,38 +1,43 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import QRCodeStyling from "qr-code-styling";
2
+ import QrCodeWithLogo from "qrcode-with-logos";
3
3
  export class CpslQrCode {
4
4
  constructor() {
5
5
  this.url = undefined;
6
6
  this.imageSrc = undefined;
7
- this.size = 250;
7
+ this.size = 286;
8
8
  }
9
9
  componentDidLoad() {
10
- const container = this.el.shadowRoot.getElementById('qr-container');
11
- container.innerHTML = '';
12
- const qrCode = new QRCodeStyling({
13
- type: 'svg',
14
- data: this.url,
15
- image: this.imageSrc,
16
- height: this.size,
17
- width: this.size,
18
- qrOptions: { errorCorrectionLevel: 'L' },
19
- backgroundOptions: {
20
- color: 'transparent',
21
- },
10
+ new QrCodeWithLogo({
11
+ content: this.url,
12
+ width: 1000,
13
+ image: this.imgEl,
14
+ logo: this.imageSrc
15
+ ? {
16
+ src: this.imageSrc,
17
+ borderRadius: 16,
18
+ }
19
+ : '',
22
20
  dotsOptions: {
23
- type: 'dots',
24
- color: 'currentColor',
21
+ type: 'dot',
22
+ },
23
+ cornersOptions: {
24
+ type: 'rounded',
25
+ radius: {
26
+ inner: 8,
27
+ outer: 32,
28
+ },
25
29
  },
26
- cornersSquareOptions: { type: 'extra-rounded' },
27
- cornersDotOptions: { type: 'dot' },
28
- imageOptions: {
29
- crossOrigin: 'anonymous',
30
+ nodeQrCodeOptions: {
31
+ margin: 0,
32
+ errorCorrectionLevel: 'M',
30
33
  },
31
34
  });
32
- qrCode.append(container);
35
+ }
36
+ get imgEl() {
37
+ return this.el.shadowRoot.getElementById('qr-code');
33
38
  }
34
39
  render() {
35
- return (h(Host, { key: '5655e021ffef542b385c133d6e624be3cef16c1d' }, h("div", { key: '96eb780f5b5f61815f63e6e3c85368b7bc5b42e6', id: "qr-container", class: "qr-container" })));
40
+ return (h(Host, { key: '29a0c108792b0c2640c63846baa5ad20f4098a24' }, h("div", { key: 'e4568804cd28026a4c5507b85a0646327e8353b7', id: "qr-container", class: "qr-container", style: { width: `${this.size}px`, height: `${this.size}px` } }, h("img", { key: 'eb86fd0c8262bfba16177c954c1725cdbab6e69d', id: "qr-code", class: "qr-code" }))));
36
41
  }
37
42
  static get is() { return "cpsl-qr-code"; }
38
43
  static get encapsulation() { return "shadow"; }
@@ -98,7 +103,7 @@ export class CpslQrCode {
98
103
  },
99
104
  "attribute": "size",
100
105
  "reflect": false,
101
- "defaultValue": "250"
106
+ "defaultValue": "286"
102
107
  }
103
108
  };
104
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-qr-code.js","sourceRoot":"","sources":["../../../../src/components/cpsl-qr-code/cpsl-qr-code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,MAAM,OAAO,UAAU;;;;oBAiBG,GAAG;;IAE3B,gBAAgB;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;QAEpE,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;QAEzB,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC;YAC/B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,IAAI,CAAC,GAAG;YACd,KAAK,EAAE,IAAI,CAAC,QAAQ;YACpB,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,SAAS,EAAE,EAAE,oBAAoB,EAAE,GAAG,EAAE;YACxC,iBAAiB,EAAE;gBACjB,KAAK,EAAE,aAAa;aACrB;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,cAAc;aACtB;YACD,oBAAoB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;YAC/C,iBAAiB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YAClC,YAAY,EAAE;gBACZ,WAAW,EAAE,WAAW;aACzB;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DACE,EAAE,EAAC,cAAc,EACjB,KAAK,EAAC,cAAc,GAEpB,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport QRCodeStyling from 'qr-code-styling';\n\n@Component({\n tag: 'cpsl-qr-code',\n styleUrl: 'cpsl-qr-code.scss',\n shadow: true,\n})\nexport class CpslQrCode {\n @Element() el!: HTMLCpslQrCodeElement;\n\n /**\n * URL for the QR code to link to.\n */\n @Prop() url: string;\n\n /**\n * Source for the center image of the QR code.\n */\n @Prop() imageSrc?: string;\n\n /**\n * Size of the QR code in pixels.\n * Default is 250.\n */\n @Prop() size?: number = 250;\n\n componentDidLoad() {\n const container = this.el.shadowRoot.getElementById('qr-container');\n\n container.innerHTML = '';\n\n const qrCode = new QRCodeStyling({\n type: 'svg',\n data: this.url,\n image: this.imageSrc,\n height: this.size,\n width: this.size,\n qrOptions: { errorCorrectionLevel: 'L' },\n backgroundOptions: {\n color: 'transparent',\n },\n dotsOptions: {\n type: 'dots',\n color: 'currentColor',\n },\n cornersSquareOptions: { type: 'extra-rounded' },\n cornersDotOptions: { type: 'dot' },\n imageOptions: {\n crossOrigin: 'anonymous',\n },\n });\n\n qrCode.append(container);\n }\n\n render() {\n return (\n <Host>\n <div\n id=\"qr-container\"\n class=\"qr-container\"\n // style={{ height: `${this.size - 10 ?? 240}px`, width: `${this.size - 10 ?? 240}px` }}\n />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-qr-code.js","sourceRoot":"","sources":["../../../../src/components/cpsl-qr-code/cpsl-qr-code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAO/C,MAAM,OAAO,UAAU;;;;oBAiBG,GAAG;;IAE3B,gBAAgB;QACd,IAAI,cAAc,CAAC;YACjB,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,QAAQ;gBACjB,CAAC,CAAC;oBACE,GAAG,EAAE,IAAI,CAAC,QAAQ;oBAClB,YAAY,EAAE,EAAE;iBACjB;gBACH,CAAC,CAAC,EAAE;YACN,WAAW,EAAE;gBACX,IAAI,EAAE,KAAK;aACZ;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE;oBACN,KAAK,EAAE,CAAC;oBACR,KAAK,EAAE,EAAE;iBACV;aACF;YACD,iBAAiB,EAAE;gBACjB,MAAM,EAAE,CAAC;gBACT,oBAAoB,EAAE,GAAG;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAqB,CAAC;IAC1E,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,EAAE,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE;gBACtG,4DAAK,EAAE,EAAC,SAAS,EAAC,KAAK,EAAC,SAAS,GAAG,CAChC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport QrCodeWithLogo from 'qrcode-with-logos';\n\n@Component({\n tag: 'cpsl-qr-code',\n styleUrl: 'cpsl-qr-code.scss',\n shadow: true,\n})\nexport class CpslQrCode {\n @Element() el!: HTMLCpslQrCodeElement;\n\n /**\n * URL for the QR code to link to.\n */\n @Prop() url: string;\n\n /**\n * Source for the center image of the QR code.\n */\n @Prop() imageSrc?: string;\n\n /**\n * Size of the QR code in pixels.\n * Default is 250.\n */\n @Prop() size?: number = 286;\n\n componentDidLoad() {\n new QrCodeWithLogo({\n content: this.url,\n width: 1000,\n image: this.imgEl,\n logo: this.imageSrc\n ? {\n src: this.imageSrc,\n borderRadius: 16,\n }\n : '',\n dotsOptions: {\n type: 'dot',\n },\n cornersOptions: {\n type: 'rounded',\n radius: {\n inner: 8,\n outer: 32,\n },\n },\n nodeQrCodeOptions: {\n margin: 0,\n errorCorrectionLevel: 'M',\n },\n });\n }\n\n private get imgEl(): HTMLImageElement {\n return this.el.shadowRoot.getElementById('qr-code') as HTMLImageElement;\n }\n\n render() {\n return (\n <Host>\n <div id=\"qr-container\" class=\"qr-container\" style={{ width: `${this.size}px`, height: `${this.size}px` }}>\n <img id=\"qr-code\" class=\"qr-code\" />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -9,7 +9,7 @@ export class CpslRadio {
9
9
  this.checked = undefined;
10
10
  }
11
11
  render() {
12
- return (h(Host, { key: '56ac31a17d3aebb35c2b0bfe54aefb2e9a99ecdb' }, h("input", { key: '294dd0e233b1921218a20726819c1b6f62a9545f', type: "radio", checked: this.checked }), h("span", { key: '23eb0b6319a39c1435df495b4491b9ec226be325', onClick: this.handleRadioClick, class: { container: true, checked: this.checked } })));
12
+ return (h(Host, { key: '2e2c99a0aaff88bc8c70b41eedc3b808c7c347ae' }, h("input", { key: '19522b1db8b3a6392689be69b747711179187e0a', type: "radio", checked: this.checked }), h("span", { key: '360fd7451b7bf0429b03748dcd8fb9bac30b0e43', onClick: this.handleRadioClick, class: { container: true, checked: this.checked } })));
13
13
  }
14
14
  static get is() { return "cpsl-radio"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CpslRow {
3
3
  render() {
4
- return (h(Host, { key: 'a7103593a92c7db3ff20e95c7f9a0b7a14897e34' }, h("slot", { key: 'e7980a87253ac57393a246aae808cfa47f7c20dc' })));
4
+ return (h(Host, { key: '7d5564c003a58e6a530361c0a7a6ee026746c322' }, h("slot", { key: 'b493ac66dc1709116a6ac1507eeed82fbb8305bd' })));
5
5
  }
6
6
  static get is() { return "cpsl-row"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -83,6 +83,8 @@
83
83
  --helper-text-icon-size: 16px;
84
84
  --helper-text-font-size: var(--cpsl-font-size-body-xs);
85
85
  --helper-text-margin-top: 0px;
86
+ --icon-height: 24px;
87
+ --icon-width: 24px;
86
88
  display: flex;
87
89
  flex-direction: column;
88
90
  gap: 4px;
@@ -190,11 +192,16 @@ input.disabled {
190
192
  .selected-container-content {
191
193
  flex: 1;
192
194
  }
195
+ .selected-container-content.hidden {
196
+ display: none;
197
+ }
193
198
 
194
199
  .chevron {
195
200
  transition: transform 0.3s ease;
196
201
  transform: rotate(180deg);
197
202
  --icon-color: var(--cpsl-color-text-disabled);
203
+ --height: var(--icon-height);
204
+ --width: var(--icon-width);
198
205
  }
199
206
  .chevron.open {
200
207
  transform: rotate(0deg);
@@ -226,4 +233,14 @@ input.disabled {
226
233
  .dropdown-inner {
227
234
  overflow: auto;
228
235
  scrollbar-width: thin;
236
+ }
237
+ .dropdown-inner ::slotted(cpsl-input) {
238
+ padding: 8px;
239
+ }
240
+
241
+ .search-container {
242
+ position: sticky;
243
+ top: 0px;
244
+ padding: 8px;
245
+ background-color: var(--cpsl-color-select-surface-default);
229
246
  }