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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (384) hide show
  1. package/dist/capsule/capsule.esm.js +1 -1
  2. package/dist/capsule/capsule.esm.js.map +1 -1
  3. package/dist/capsule/index.esm.js.map +1 -1
  4. package/dist/capsule/p-0462f723.js.map +1 -1
  5. package/dist/capsule/p-05cb769b.entry.js +10 -0
  6. package/dist/capsule/p-05cb769b.entry.js.map +1 -0
  7. package/dist/capsule/p-0eea90f8.entry.js +2 -0
  8. package/dist/capsule/{p-6793ef7a.entry.js.map → p-0eea90f8.entry.js.map} +1 -1
  9. package/dist/capsule/{p-b976b6f0.entry.js → p-41bc3c58.entry.js} +2 -2
  10. package/dist/capsule/{p-b976b6f0.entry.js.map → p-41bc3c58.entry.js.map} +1 -1
  11. package/dist/capsule/p-7233228e.entry.js +29 -0
  12. package/dist/capsule/p-7233228e.entry.js.map +1 -0
  13. package/dist/capsule/{p-447d49b9.entry.js → p-742bda0b.entry.js} +2 -2
  14. package/dist/capsule/{p-447d49b9.entry.js.map → p-742bda0b.entry.js.map} +1 -1
  15. package/dist/capsule/{p-f6c74d69.entry.js → p-c1aa1ffb.entry.js} +2 -2
  16. package/dist/capsule/{p-f6c74d69.entry.js.map → p-c1aa1ffb.entry.js.map} +1 -1
  17. package/dist/capsule/p-d351f076.entry.js +2 -0
  18. package/dist/capsule/p-d351f076.entry.js.map +1 -0
  19. package/dist/capsule/{p-452b9998.entry.js → p-dc4591d5.entry.js} +2 -2
  20. package/dist/capsule/{p-452b9998.entry.js.map → p-dc4591d5.entry.js.map} +1 -1
  21. package/dist/capsule/{p-6dcaee48.entry.js → p-de2a16e4.entry.js} +2 -2
  22. package/dist/capsule/{p-6dcaee48.entry.js.map → p-de2a16e4.entry.js.map} +1 -1
  23. package/dist/capsule/p-e1255160.js.map +1 -1
  24. package/dist/capsule/p-f2393be6.js.map +1 -1
  25. package/dist/capsule/p-fa6b7678.js +3 -0
  26. package/dist/capsule/p-fa6b7678.js.map +1 -0
  27. package/dist/cjs/capsule.cjs.js +10 -10
  28. package/dist/cjs/capsule.cjs.js.map +1 -1
  29. package/dist/cjs/{cpsl-alert_34.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +136 -95
  30. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-animation.cjs.entry.js +5 -2
  32. package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -1
  33. package/dist/cjs/cpsl-col.cjs.entry.js +25 -6
  34. package/dist/cjs/cpsl-col.cjs.entry.js.map +1 -1
  35. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  36. package/dist/cjs/cpsl-hero.cjs.entry.js +35 -0
  37. package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -0
  38. package/dist/cjs/cpsl-identicon.cjs.entry.js +2 -2
  39. package/dist/cjs/cpsl-info-box.cjs.entry.js +2 -2
  40. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +3 -2
  41. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -1
  42. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  43. package/dist/cjs/index-65f57499.js +1439 -0
  44. package/dist/cjs/index-65f57499.js.map +1 -0
  45. package/dist/cjs/index.cjs.js +10 -2
  46. package/dist/cjs/index.cjs.js.map +1 -1
  47. package/dist/cjs/loader.cjs.js +2 -2
  48. package/dist/collection/assets/icons/index.js +1 -3
  49. package/dist/collection/assets/icons/index.js.map +1 -1
  50. package/dist/collection/collection-manifest.json +2 -2
  51. package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
  52. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  53. package/dist/collection/components/cpsl-animation/cpsl-animation.js +4 -1
  54. package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
  55. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +5 -2
  56. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  57. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
  58. package/dist/collection/components/cpsl-button/cpsl-button.js +5 -2
  59. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  60. package/dist/collection/components/cpsl-button/cpsl-button.stories.js.map +1 -1
  61. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
  62. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  63. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
  64. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +5 -3
  65. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  66. package/dist/collection/components/cpsl-col/cpsl-col.js +21 -5
  67. package/dist/collection/components/cpsl-col/cpsl-col.js.map +1 -1
  68. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  69. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +3 -2
  70. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  71. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +2 -2
  72. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  73. package/dist/collection/components/cpsl-dropdown/dropdown-interface.js.map +1 -1
  74. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +6 -1
  75. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -1
  76. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  77. package/dist/collection/components/cpsl-hero/cpsl-hero.js +3 -2
  78. package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
  79. package/dist/collection/components/cpsl-hero/cpsl-hero.stories.js.map +1 -1
  80. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  81. package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +1 -1
  82. package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
  83. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  84. package/dist/collection/components/cpsl-input/cpsl-input.js +36 -2
  85. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  86. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -1
  87. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  88. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +2 -1
  89. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -1
  90. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  91. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +2 -1
  92. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
  93. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  94. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
  95. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  96. package/dist/collection/components/cpsl-popover/cpsl-popover.js +18 -6
  97. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -1
  98. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  99. package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
  100. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  101. package/dist/collection/components/cpsl-select/cpsl-select.js +3 -1
  102. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
  103. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
  104. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +14 -3
  105. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -1
  106. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  107. package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
  108. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  109. package/dist/collection/components/cpsl-table/cpsl-table.js +11 -1
  110. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  111. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +7 -1
  112. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
  113. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -2
  114. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  115. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  116. package/dist/collection/interface.js.map +1 -1
  117. package/dist/collection/utils/media.js +3 -0
  118. package/dist/collection/utils/media.js.map +1 -1
  119. package/dist/collection/utils/theme/generateBorderRadii.js +1 -1
  120. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  121. package/dist/collection/utils/theme/generatePalette.js +4 -1
  122. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  123. package/dist/collection/utils/theme/generateTheme.js +4 -0
  124. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  125. package/dist/collection/utils/theme/utils.js +1 -0
  126. package/dist/collection/utils/theme/utils.js.map +1 -1
  127. package/dist/esm/capsule.js +11 -11
  128. package/dist/esm/capsule.js.map +1 -1
  129. package/dist/esm/{cpsl-alert_34.entry.js → cpsl-alert_33.entry.js} +137 -95
  130. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  131. package/dist/esm/cpsl-animation.entry.js +5 -2
  132. package/dist/esm/cpsl-animation.entry.js.map +1 -1
  133. package/dist/esm/cpsl-col.entry.js +25 -6
  134. package/dist/esm/cpsl-col.entry.js.map +1 -1
  135. package/dist/esm/cpsl-grid.entry.js +3 -3
  136. package/dist/esm/cpsl-hero.entry.js +31 -0
  137. package/dist/esm/cpsl-hero.entry.js.map +1 -0
  138. package/dist/esm/cpsl-identicon.entry.js +2 -2
  139. package/dist/esm/cpsl-info-box.entry.js +2 -2
  140. package/dist/esm/cpsl-modal-v2.entry.js +3 -2
  141. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -1
  142. package/dist/esm/cpsl-row.entry.js +2 -2
  143. package/dist/esm/index-91db3414.js +1408 -0
  144. package/dist/esm/index-91db3414.js.map +1 -0
  145. package/dist/esm/index.js +10 -2
  146. package/dist/esm/index.js.map +1 -1
  147. package/dist/esm/loader.js +3 -3
  148. package/dist/loader/cdn.js +1 -3
  149. package/dist/loader/index.cjs.js +1 -3
  150. package/dist/loader/index.d.ts +3 -0
  151. package/dist/loader/index.es2017.js +1 -3
  152. package/dist/loader/index.js +1 -3
  153. package/dist/scripts/buildAssets.js +1 -1
  154. package/dist/types/assets/icons/index.d.ts +0 -2
  155. package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +8 -0
  156. package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +6 -0
  157. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +10 -0
  158. package/dist/types/components/cpsl-avatar/cpsl-avatar.d.ts +11 -0
  159. package/dist/types/components/cpsl-button/cpsl-button.d.ts +29 -0
  160. package/dist/types/components/cpsl-button-group/cpsl-button-group.d.ts +3 -0
  161. package/dist/types/components/cpsl-checkbox/cpsl-checkbox.d.ts +6 -0
  162. package/dist/types/components/cpsl-code-input/cpsl-code-input.d.ts +19 -0
  163. package/dist/types/components/cpsl-col/cpsl-col.d.ts +96 -0
  164. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +31 -0
  165. package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +15 -0
  166. package/dist/types/components/cpsl-dropdown/dropdown-interface.d.ts +1 -1
  167. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +43 -0
  168. package/dist/types/components/cpsl-grid/cpsl-grid.d.ts +3 -0
  169. package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +5 -0
  170. package/dist/types/components/cpsl-icon/cpsl-icon.d.ts +6 -0
  171. package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +4 -0
  172. package/dist/types/components/cpsl-input/cpsl-input.d.ts +138 -0
  173. package/dist/types/components/cpsl-input/input-interface.d.ts +5 -0
  174. package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +39 -0
  175. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +32 -0
  176. package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +3 -0
  177. package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +14 -0
  178. package/dist/types/components/cpsl-pagination/cpsl-pagination.d.ts +15 -0
  179. package/dist/types/components/cpsl-pill/cpsl-pill.d.ts +3 -0
  180. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +55 -2
  181. package/dist/types/components/cpsl-progress-indicator/cpsl-progress-indicator.d.ts +6 -0
  182. package/dist/types/components/cpsl-qr-code/cpsl-qr-code.d.ts +10 -0
  183. package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +6 -0
  184. package/dist/types/components/cpsl-select/cpsl-select.d.ts +45 -0
  185. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +10 -0
  186. package/dist/types/components/cpsl-slide-button/cpsl-slide-button.d.ts +18 -0
  187. package/dist/types/components/cpsl-spinner/cpsl-spinner.d.ts +8 -0
  188. package/dist/types/components/cpsl-switch/cpsl-switch.d.ts +6 -0
  189. package/dist/types/components/cpsl-tab/cpsl-tab.d.ts +11 -0
  190. package/dist/types/components/cpsl-tabs/cpsl-tabs.d.ts +13 -0
  191. package/dist/types/components/cpsl-text/cpsl-text.d.ts +15 -0
  192. package/dist/types/components/cpsl-tile-button/cpsl-tile-button.d.ts +6 -0
  193. package/dist/types/components.d.ts +28 -6
  194. package/dist/types/stencil-public-runtime.d.ts +3 -10
  195. package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
  196. package/dist/types/utils/theme/generatePalette.d.ts +1 -1
  197. package/dist/types/utils/theme/generateTheme.d.ts +4 -0
  198. package/package.json +4 -10
  199. package/readme.md +47 -2
  200. package/dist/capsule/p-303e6e89.entry.js +0 -29
  201. package/dist/capsule/p-303e6e89.entry.js.map +0 -1
  202. package/dist/capsule/p-6793ef7a.entry.js +0 -2
  203. package/dist/capsule/p-7dde3172.js +0 -3
  204. package/dist/capsule/p-7dde3172.js.map +0 -1
  205. package/dist/capsule/p-a6aaf3f4.entry.js +0 -10
  206. package/dist/capsule/p-a6aaf3f4.entry.js.map +0 -1
  207. package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +0 -1
  208. package/dist/cjs/index-528f7428.js +0 -2107
  209. package/dist/cjs/index-528f7428.js.map +0 -1
  210. package/dist/collection/assets/icons/double-arc.svg +0 -13
  211. package/dist/collection/assets/icons/single-arc.svg +0 -11
  212. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +0 -29
  213. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +0 -1
  214. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +0 -37
  215. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +0 -1
  216. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +0 -29
  217. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +0 -1
  218. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +0 -37
  219. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +0 -1
  220. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js +0 -29
  221. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js.map +0 -1
  222. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js +0 -37
  223. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js.map +0 -1
  224. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js +0 -29
  225. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js.map +0 -1
  226. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js +0 -37
  227. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js.map +0 -1
  228. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +0 -29
  229. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +0 -1
  230. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +0 -37
  231. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +0 -1
  232. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js +0 -29
  233. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js.map +0 -1
  234. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js +0 -37
  235. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js.map +0 -1
  236. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js +0 -29
  237. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js.map +0 -1
  238. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js +0 -37
  239. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js.map +0 -1
  240. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js +0 -29
  241. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js.map +0 -1
  242. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js +0 -37
  243. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js.map +0 -1
  244. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +0 -29
  245. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +0 -1
  246. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +0 -37
  247. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +0 -1
  248. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +0 -29
  249. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +0 -1
  250. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +0 -37
  251. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +0 -1
  252. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +0 -29
  253. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +0 -1
  254. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +0 -37
  255. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +0 -1
  256. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js +0 -29
  257. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js.map +0 -1
  258. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js +0 -37
  259. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js.map +0 -1
  260. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +0 -29
  261. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +0 -1
  262. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +0 -37
  263. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js.map +0 -1
  264. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +0 -29
  265. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +0 -1
  266. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +0 -37
  267. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +0 -1
  268. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +0 -29
  269. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +0 -1
  270. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +0 -37
  271. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +0 -1
  272. package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js +0 -29
  273. package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js.map +0 -1
  274. package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js +0 -37
  275. package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js.map +0 -1
  276. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +0 -29
  277. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +0 -1
  278. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +0 -37
  279. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +0 -1
  280. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js +0 -29
  281. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js.map +0 -1
  282. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js +0 -37
  283. package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js.map +0 -1
  284. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +0 -29
  285. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +0 -1
  286. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +0 -37
  287. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +0 -1
  288. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +0 -29
  289. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +0 -1
  290. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +0 -37
  291. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +0 -1
  292. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +0 -29
  293. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +0 -1
  294. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +0 -37
  295. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +0 -1
  296. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +0 -29
  297. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +0 -1
  298. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +0 -37
  299. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +0 -1
  300. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js +0 -29
  301. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js.map +0 -1
  302. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js +0 -37
  303. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js.map +0 -1
  304. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +0 -29
  305. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +0 -1
  306. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +0 -37
  307. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +0 -1
  308. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js +0 -29
  309. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js.map +0 -1
  310. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js +0 -37
  311. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js.map +0 -1
  312. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +0 -29
  313. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +0 -1
  314. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +0 -37
  315. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +0 -1
  316. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +0 -29
  317. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +0 -1
  318. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +0 -37
  319. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +0 -1
  320. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +0 -29
  321. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +0 -1
  322. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +0 -37
  323. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +0 -1
  324. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +0 -29
  325. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +0 -1
  326. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +0 -37
  327. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +0 -1
  328. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js +0 -29
  329. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js.map +0 -1
  330. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js +0 -37
  331. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js.map +0 -1
  332. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +0 -29
  333. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +0 -1
  334. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +0 -37
  335. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +0 -1
  336. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +0 -29
  337. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +0 -1
  338. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +0 -37
  339. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +0 -1
  340. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +0 -29
  341. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +0 -1
  342. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +0 -37
  343. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +0 -1
  344. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +0 -29
  345. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +0 -1
  346. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +0 -37
  347. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +0 -1
  348. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +0 -29
  349. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +0 -1
  350. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +0 -37
  351. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +0 -1
  352. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js +0 -29
  353. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js.map +0 -1
  354. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js +0 -37
  355. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js.map +0 -1
  356. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +0 -29
  357. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +0 -1
  358. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +0 -37
  359. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +0 -1
  360. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js +0 -29
  361. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js.map +0 -1
  362. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js +0 -37
  363. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js.map +0 -1
  364. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +0 -29
  365. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +0 -1
  366. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +0 -37
  367. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +0 -1
  368. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +0 -29
  369. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +0 -1
  370. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +0 -37
  371. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +0 -1
  372. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +0 -29
  373. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +0 -1
  374. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +0 -37
  375. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +0 -1
  376. package/dist/esm/cpsl-alert_34.entry.js.map +0 -1
  377. package/dist/esm/index-b188f201.js +0 -2076
  378. package/dist/esm/index-b188f201.js.map +0 -1
  379. package/dist/esm/polyfills/core-js.js +0 -11
  380. package/dist/esm/polyfills/dom.js +0 -79
  381. package/dist/esm/polyfills/es5-html-element.js +0 -1
  382. package/dist/esm/polyfills/index.js +0 -34
  383. package/dist/esm/polyfills/system.js +0 -6
  384. /package/dist/types/Users/{briancorbin/Documents/Programming/Capsule/component-library/core → taylorbosch/Documents/GitHub/Capsule/web-sdk/packages/core-components}/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -23,28 +23,36 @@ export class CpslSlideButton {
23
23
  };
24
24
  const dragMouseDown = (e) => {
25
25
  e.preventDefault();
26
+ // get the mouse cursor position at startup:
26
27
  pos3 = e.clientX;
27
28
  document.onmouseup = closeDragElement;
29
+ // call a function whenever the cursor moves:
28
30
  document.onmousemove = elementMouseDrag;
29
31
  };
30
32
  const dragTouchDown = (e) => {
31
33
  e.preventDefault();
32
34
  const touchLocation = e.targetTouches[0];
35
+ // get the mouse cursor position at startup:
33
36
  pos3 = touchLocation.clientX;
34
37
  document.ontouchend = closeDragElement;
38
+ // call a function whenever the cursor moves:
35
39
  document.ontouchmove = elementTouchDrag;
36
40
  };
37
41
  const elementMouseDrag = (e) => {
38
42
  e.preventDefault();
43
+ // calculate the new cursor position:
39
44
  pos1 = pos3 - e.clientX;
40
45
  pos3 = e.clientX;
46
+ // set the element's new position:
41
47
  finishElementDrag(pos1);
42
48
  };
43
49
  const elementTouchDrag = (e) => {
44
50
  e.preventDefault();
45
51
  const touchLocation = e.targetTouches[0];
52
+ // calculate the new cursor position:
46
53
  pos1 = pos3 - touchLocation.clientX;
47
54
  pos3 = touchLocation.clientX;
55
+ // set the element's new position:
48
56
  finishElementDrag(pos1);
49
57
  };
50
58
  const finishElementDrag = (pos) => {
@@ -77,6 +85,7 @@ export class CpslSlideButton {
77
85
  endIconEl.style.opacity = '0%';
78
86
  endBackgroundEl.style.opacity = '0%';
79
87
  }
88
+ // stop moving when mouse button is released:
80
89
  document.onmouseup = null;
81
90
  document.onmousemove = null;
82
91
  document.ontouchend = null;
@@ -90,7 +99,9 @@ export class CpslSlideButton {
90
99
  const sliderContainerEl = this.sliderContainerEl;
91
100
  const containerWidth = sliderContainerEl.clientWidth;
92
101
  const sliderHeight = el.getBoundingClientRect().height;
102
+ // Offset min by 1 for 1px left padding
93
103
  const minX = 1;
104
+ // Offset max by the slider width and 1px for padding
94
105
  const maxX = containerWidth - sliderHeight - 1;
95
106
  let pos1 = 0, pos3 = 0;
96
107
  el.onpointerdown = pointerDown;
@@ -114,7 +125,7 @@ export class CpslSlideButton {
114
125
  return this.el.shadowRoot.getElementById('end-icon');
115
126
  }
116
127
  render() {
117
- return (h(Host, { key: '2c1481d71b13947115c6aca7ae38d88204f72f52' }, h("div", { key: '42880b0a9ac2c130fb3f7c03e79d1e73a72df1ab', id: "slider-container", class: "slider-container" }, h("div", { key: '62c5f7fe9b77c0cd16615fa78f3135a6c235ef53', id: "start-slider-container-background", class: { 'start-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: '0caceb1b45b6bea67d8b6f2a61884f7ae7f4b6f9', id: "end-slider-container-background", class: { 'end-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: '7bef562aed22abdda9183471a48242ec8f74e816', id: "slider", class: { slider: true, disabled: this.disabled } }, h("cpsl-icon", { key: 'e2ac31a4c8ed8cecd5495f0bd1b61d47055c4f0c', id: "start-icon", class: { 'start-icon': true, 'icon': true }, icon: this.startIcon }), h("cpsl-icon", { key: 'c28b7aedf9289dc0bccc1c359a2ca7e2390a49ab', id: "end-icon", class: { 'end-icon': true, 'icon': true }, icon: this.endIcon })), h("span", { key: 'f698ecc109722522c13c825b506311aebbbce116', id: "start-text", class: { 'start-text': true, 'disabled': this.disabled } }, this.startText), h("span", { key: 'bcbc4a152084760322b5c3377680b950cdfc4b4e', id: "end-text", class: "end-text" }, this.endText))));
128
+ return (h(Host, { key: '38abbc7fa26d82bf0f2c63494466d878f4cadae3' }, h("div", { key: '0cd53607002637a0da1e7d381746e96bbc45ad33', id: "slider-container", class: "slider-container" }, h("div", { key: 'a6947eb23b1ca7ca22b365483618ef074a71c34f', id: "start-slider-container-background", class: { 'start-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: '897abd9fa09a132df76b0f007b9fa38bac25b235', id: "end-slider-container-background", class: { 'end-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: 'db5025b01da708cceb2c29938029710811f259c9', id: "slider", class: { slider: true, disabled: this.disabled } }, h("cpsl-icon", { key: '63ac51986d1eb52937a14555fec9ae19106fe8c6', id: "start-icon", class: { 'start-icon': true, 'icon': true }, icon: this.startIcon }), h("cpsl-icon", { key: '23f63127aebdc87278c760644838a91332a44b28', id: "end-icon", class: { 'end-icon': true, 'icon': true }, icon: this.endIcon })), h("span", { key: '305f60cf83a49feb0e2f3d3e7655bfd5f53582db', id: "start-text", class: { 'start-text': true, 'disabled': this.disabled } }, this.startText), h("span", { key: '0753f4f241fb4ac34e619539e0a1ec1ade2892bc', id: "end-text", class: "end-text" }, this.endText))));
118
129
  }
119
130
  static get is() { return "cpsl-slide-button"; }
120
131
  static get encapsulation() { return "shadow"; }
@@ -152,7 +163,7 @@ export class CpslSlideButton {
152
163
  "mutable": false,
153
164
  "complexType": {
154
165
  "original": "IconType",
155
- "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"doubleArc\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"singleArc\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
166
+ "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
156
167
  "references": {
157
168
  "IconType": {
158
169
  "location": "import",
@@ -192,7 +203,7 @@ export class CpslSlideButton {
192
203
  "mutable": false,
193
204
  "complexType": {
194
205
  "original": "IconType",
195
- "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"doubleArc\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"singleArc\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
206
+ "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
196
207
  "references": {
197
208
  "IconType": {
198
209
  "location": "import",
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-slide-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-slide-button/cpsl-slide-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,O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element, EventEmitter, Event } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-slide-button',\n styleUrl: 'cpsl-slide-button.scss',\n shadow: true,\n})\nexport class CpslSlideButton {\n @Element() el!: HTMLCpslSlideButtonElement;\n\n /**\n * Whether or not the component is disabled. If true, the component will display the `startText`.\n */\n @Prop() disabled: boolean;\n\n /**\n * The name of the ending icon to show.\n */\n @Prop() endIcon: IconType;\n\n /**\n * The ending text.\n */\n @Prop() endText: string;\n\n /**\n * The name of the starting icon to show.\n */\n @Prop() startIcon: IconType;\n\n /**\n * The starting text.\n */\n @Prop() startText: string;\n\n /**\n * The `cpslComplete` event is fired when the slider is at the end.\n */\n @Event() cpslComplete!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.dragElement(this.el.shadowRoot.getElementById('slider'));\n }\n\n private dragElement(el: HTMLElement) {\n const pointerDown = (e: PointerEvent) => {\n pos3 = e.clientX;\n\n switch (e.pointerType) {\n case 'mouse':\n el.onmousedown = dragMouseDown;\n break;\n default:\n el.ontouchstart = dragTouchDown;\n }\n };\n\n const dragMouseDown = (e: MouseEvent) => {\n e.preventDefault();\n // get the mouse cursor position at startup:\n pos3 = e.clientX;\n document.onmouseup = closeDragElement;\n // call a function whenever the cursor moves:\n document.onmousemove = elementMouseDrag;\n };\n\n const dragTouchDown = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // get the mouse cursor position at startup:\n pos3 = touchLocation.clientX;\n document.ontouchend = closeDragElement;\n // call a function whenever the cursor moves:\n document.ontouchmove = elementTouchDrag;\n };\n\n const elementMouseDrag = (e: MouseEvent) => {\n e.preventDefault();\n // calculate the new cursor position:\n pos1 = pos3 - e.clientX;\n pos3 = e.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const elementTouchDrag = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // calculate the new cursor position:\n pos1 = pos3 - touchLocation.clientX;\n pos3 = touchLocation.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const finishElementDrag = (pos: number) => {\n const newPos = el.offsetLeft - pos;\n if (newPos >= minX && newPos <= maxX) {\n const newPosPercent = Math.max(Math.min(Math.round((newPos / maxX) * 100) / 100, 100), 0);\n\n startTextEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endTextEl.style.opacity = `${newPosPercent * 100}%`;\n\n startIconEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endIconEl.style.opacity = `${newPosPercent * 100}%`;\n\n endBackgroundEl.style.opacity = `${newPosPercent * 100}%`;\n\n el.style.left = `${newPos}px`;\n }\n };\n\n const closeDragElement = () => {\n if (el.offsetLeft + sliderHeight >= containerWidth - sliderHeight / 2) {\n el.style.left = `${maxX}px`;\n startTextEl.style.opacity = '0%';\n endTextEl.style.opacity = '100%';\n startIconEl.style.opacity = '0%';\n endIconEl.style.opacity = '100%';\n endBackgroundEl.style.opacity = '100%';\n this.cpslComplete.emit(true);\n } else {\n el.style.left = `${minX}px`;\n startTextEl.style.opacity = '100%';\n endTextEl.style.opacity = '0%';\n startIconEl.style.opacity = '100%';\n endIconEl.style.opacity = '0%';\n endBackgroundEl.style.opacity = '0%';\n }\n // stop moving when mouse button is released:\n document.onmouseup = null;\n document.onmousemove = null;\n document.ontouchend = null;\n document.ontouchmove = null;\n };\n\n const startIconEl = this.startIconEl;\n const endIconEl = this.endIconEl;\n const startTextEl = this.startTextEl;\n const endTextEl = this.endTextEl;\n const endBackgroundEl = this.endBackgroundEl;\n\n const sliderContainerEl = this.sliderContainerEl;\n const containerWidth = sliderContainerEl.clientWidth;\n\n const sliderHeight = el.getBoundingClientRect().height;\n\n // Offset min by 1 for 1px left padding\n const minX = 1;\n // Offset max by the slider width and 1px for padding\n const maxX = containerWidth - sliderHeight - 1;\n\n let pos1 = 0,\n pos3 = 0;\n\n el.onpointerdown = pointerDown;\n }\n\n private get sliderContainerEl() {\n return this.el.shadowRoot.getElementById('slider-container');\n }\n\n private get startTextEl() {\n return this.el.shadowRoot.getElementById('start-text');\n }\n\n private get endTextEl() {\n return this.el.shadowRoot.getElementById('end-text');\n }\n\n private get endBackgroundEl() {\n return this.el.shadowRoot.getElementById('end-slider-container-background');\n }\n\n private get startIconEl() {\n return this.el.shadowRoot.getElementById('start-icon');\n }\n\n private get endIconEl() {\n return this.el.shadowRoot.getElementById('end-icon');\n }\n\n render() {\n return (\n <Host>\n <div id=\"slider-container\" class=\"slider-container\">\n <div id=\"start-slider-container-background\" class={{ 'start-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"end-slider-container-background\" class={{ 'end-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"slider\" class={{ slider: true, disabled: this.disabled }}>\n <cpsl-icon id=\"start-icon\" class={{ 'start-icon': true, 'icon': true }} icon={this.startIcon} />\n <cpsl-icon id=\"end-icon\" class={{ 'end-icon': true, 'icon': true }} icon={this.endIcon} />\n </div>\n <span id=\"start-text\" class={{ 'start-text': true, 'disabled': this.disabled }}>\n {this.startText}\n </span>\n <span id=\"end-text\" class=\"end-text\">\n {this.endText}\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-slide-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-slide-button/cpsl-slide-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAQvF,MAAM,OAAO,eAAe;;;;;;;;IAiC1B,gBAAgB;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChE,CAAC;IAEO,WAAW,CAAC,EAAe;QACjC,MAAM,WAAW,GAAG,CAAC,CAAe,EAAE,EAAE;YACtC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC;YAEjB,QAAQ,CAA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AE,mCAAmC,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAE,GACzF;gBACF,4DACE,EAAE,EAAC,iCAAiC,EACpC,KAAK,EAAE,EAAE,iCAAiC,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAE,GACvF;gBACF,4DAAK,EAAE,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;oBAC/D,kEAAW,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,GAAI;oBAChG,kEAAW,EAAE,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,GAAI,CACtF;gBACN,6DAAM,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAC3E,IAAI,CAAC,SAAS,CACV;gBACP,6DAAM,EAAE,EAAC,UAAU,EAAC,KAAK,EAAC,UAAU,IACjC,IAAI,CAAC,OAAO,CACR,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, EventEmitter, Event } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-slide-button',\n styleUrl: 'cpsl-slide-button.scss',\n shadow: true,\n})\nexport class CpslSlideButton {\n @Element() el!: HTMLCpslSlideButtonElement;\n\n /**\n * Whether or not the component is disabled. If true, the component will display the `startText`.\n */\n @Prop() disabled: boolean;\n\n /**\n * The name of the ending icon to show.\n */\n @Prop() endIcon: IconType;\n\n /**\n * The ending text.\n */\n @Prop() endText: string;\n\n /**\n * The name of the starting icon to show.\n */\n @Prop() startIcon: IconType;\n\n /**\n * The starting text.\n */\n @Prop() startText: string;\n\n /**\n * The `cpslComplete` event is fired when the slider is at the end.\n */\n @Event() cpslComplete!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.dragElement(this.el.shadowRoot.getElementById('slider'));\n }\n\n private dragElement(el: HTMLElement) {\n const pointerDown = (e: PointerEvent) => {\n pos3 = e.clientX;\n\n switch (e.pointerType) {\n case 'mouse':\n el.onmousedown = dragMouseDown;\n break;\n default:\n el.ontouchstart = dragTouchDown;\n }\n };\n\n const dragMouseDown = (e: MouseEvent) => {\n e.preventDefault();\n // get the mouse cursor position at startup:\n pos3 = e.clientX;\n document.onmouseup = closeDragElement;\n // call a function whenever the cursor moves:\n document.onmousemove = elementMouseDrag;\n };\n\n const dragTouchDown = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // get the mouse cursor position at startup:\n pos3 = touchLocation.clientX;\n document.ontouchend = closeDragElement;\n // call a function whenever the cursor moves:\n document.ontouchmove = elementTouchDrag;\n };\n\n const elementMouseDrag = (e: MouseEvent) => {\n e.preventDefault();\n // calculate the new cursor position:\n pos1 = pos3 - e.clientX;\n pos3 = e.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const elementTouchDrag = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // calculate the new cursor position:\n pos1 = pos3 - touchLocation.clientX;\n pos3 = touchLocation.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const finishElementDrag = (pos: number) => {\n const newPos = el.offsetLeft - pos;\n if (newPos >= minX && newPos <= maxX) {\n const newPosPercent = Math.max(Math.min(Math.round((newPos / maxX) * 100) / 100, 100), 0);\n\n startTextEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endTextEl.style.opacity = `${newPosPercent * 100}%`;\n\n startIconEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endIconEl.style.opacity = `${newPosPercent * 100}%`;\n\n endBackgroundEl.style.opacity = `${newPosPercent * 100}%`;\n\n el.style.left = `${newPos}px`;\n }\n };\n\n const closeDragElement = () => {\n if (el.offsetLeft + sliderHeight >= containerWidth - sliderHeight / 2) {\n el.style.left = `${maxX}px`;\n startTextEl.style.opacity = '0%';\n endTextEl.style.opacity = '100%';\n startIconEl.style.opacity = '0%';\n endIconEl.style.opacity = '100%';\n endBackgroundEl.style.opacity = '100%';\n this.cpslComplete.emit(true);\n } else {\n el.style.left = `${minX}px`;\n startTextEl.style.opacity = '100%';\n endTextEl.style.opacity = '0%';\n startIconEl.style.opacity = '100%';\n endIconEl.style.opacity = '0%';\n endBackgroundEl.style.opacity = '0%';\n }\n // stop moving when mouse button is released:\n document.onmouseup = null;\n document.onmousemove = null;\n document.ontouchend = null;\n document.ontouchmove = null;\n };\n\n const startIconEl = this.startIconEl;\n const endIconEl = this.endIconEl;\n const startTextEl = this.startTextEl;\n const endTextEl = this.endTextEl;\n const endBackgroundEl = this.endBackgroundEl;\n\n const sliderContainerEl = this.sliderContainerEl;\n const containerWidth = sliderContainerEl.clientWidth;\n\n const sliderHeight = el.getBoundingClientRect().height;\n\n // Offset min by 1 for 1px left padding\n const minX = 1;\n // Offset max by the slider width and 1px for padding\n const maxX = containerWidth - sliderHeight - 1;\n\n let pos1 = 0,\n pos3 = 0;\n\n el.onpointerdown = pointerDown;\n }\n\n private get sliderContainerEl() {\n return this.el.shadowRoot.getElementById('slider-container');\n }\n\n private get startTextEl() {\n return this.el.shadowRoot.getElementById('start-text');\n }\n\n private get endTextEl() {\n return this.el.shadowRoot.getElementById('end-text');\n }\n\n private get endBackgroundEl() {\n return this.el.shadowRoot.getElementById('end-slider-container-background');\n }\n\n private get startIconEl() {\n return this.el.shadowRoot.getElementById('start-icon');\n }\n\n private get endIconEl() {\n return this.el.shadowRoot.getElementById('end-icon');\n }\n\n render() {\n return (\n <Host>\n <div id=\"slider-container\" class=\"slider-container\">\n <div\n id=\"start-slider-container-background\"\n class={{ 'start-slider-container-background': true, 'slider-container-background': true }}\n />\n <div\n id=\"end-slider-container-background\"\n class={{ 'end-slider-container-background': true, 'slider-container-background': true }}\n />\n <div id=\"slider\" class={{ slider: true, disabled: this.disabled }}>\n <cpsl-icon id=\"start-icon\" class={{ 'start-icon': true, 'icon': true }} icon={this.startIcon} />\n <cpsl-icon id=\"end-icon\" class={{ 'end-icon': true, 'icon': true }} icon={this.endIcon} />\n </div>\n <span id=\"start-text\" class={{ 'start-text': true, 'disabled': this.disabled }}>\n {this.startText}\n </span>\n <span id=\"end-text\" class=\"end-text\">\n {this.endText}\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -5,13 +5,13 @@ export class CpslSpinner {
5
5
  this.speed = 1;
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '10b3edc28ae27a3feaf90e9a23f8833f9880e717', style: {
8
+ return (h(Host, { key: '752c92c025ab7c7a4402907f061fb461a5aa93e3', style: {
9
9
  'height': `${this.size}px`,
10
10
  'width': `${this.size}px`,
11
11
  'animation': `spin ${this.speed}s linear infinite`,
12
12
  '-webkit-animation': `spin ${this.speed}s linear infinite`,
13
13
  '-moz-animation': `spin ${this.speed}s linear infinite`,
14
- } }, h("svg", { key: '2ce2e8a1d0b7ad7b34cbcdc0984883363740c0f5', height: this.size, width: this.size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 54 54", fill: "none" }, h("path", { key: 'e16659e096d7f2557e0fe829ed239c63a3e08011', d: "M43.1586 17C39.8082 11.5978 33.8243 8 27 8C16.5066 8 8 16.5066 8 27C8 37.4934 16.5066 46 27 46C33.8242 46 39.8082 42.4022 43.1586 37", "stroke-width": "6", "stroke-linecap": "round" }), h("circle", { key: '1cc780ff25da0556aa3012cfa28b457443689dec', cx: "45", cy: "27", r: "5" }))));
14
+ } }, h("svg", { key: 'b901d2e2d02065ebc1395a08ede303567c87fd7c', height: this.size, width: this.size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 54 54", fill: "none" }, h("path", { key: '20e62d27eaf461700683c863e24fca0457242fca', d: "M43.1586 17C39.8082 11.5978 33.8243 8 27 8C16.5066 8 8 16.5066 8 27C8 37.4934 16.5066 46 27 46C33.8242 46 39.8082 42.4022 43.1586 37", "stroke-width": "6", "stroke-linecap": "round" }), h("circle", { key: '7b7dca75545477fa6314bf1a8b315140c5b029f5', cx: "45", cy: "27", r: "5" }))));
15
15
  }
16
16
  static get is() { return "cpsl-spinner"; }
17
17
  static get encapsulation() { return "shadow"; }
@@ -7,7 +7,7 @@ export class CpslSwitch {
7
7
  this.checked = undefined;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '4bb60b7497853c9445787089fb279bcf4755246b' }, h("input", { key: 'a8b054f90aba1040019d848737bf0e90f0796964', type: "checkbox", checked: this.checked }), h("span", { key: '569ddefabbef07dd1b9930475541b9dcb0352c80', onClick: this.handleSwitchClick, class: { container: true, checked: this.checked } }, h("span", { key: '23cc58424353fcd969546058e9849c8a85fddad1', class: { thumb: true, checked: this.checked } }))));
10
+ return (h(Host, { key: '45035a28db5319aa2818d38513fb40da81314ff5' }, h("input", { key: 'b7a9c111c55c6791eaf881442e4c335765aa2616', type: "checkbox", checked: this.checked }), h("span", { key: '3bf7175289486bb65786b4522e57bf76119437e0', onClick: this.handleSwitchClick, class: { container: true, checked: this.checked } }, h("span", { key: '71484a1fa21a4619be68863f321248a1da000015', class: { thumb: true, checked: this.checked } }))));
11
11
  }
12
12
  static get is() { return "cpsl-switch"; }
13
13
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class CpslTab {
21
21
  }
22
22
  }
23
23
  render() {
24
- return (h(Host, { key: 'e95f29b005dfda39d9e973c9fc540567024eec27', onClick: this.onTabClicked }, h("div", { key: '13f246e19210d03b75ee73b8afe739bcb7fb3d7d', class: { 'tab-container': true } }, h("slot", { key: 'add7e0bea1d4c4addbed47fbde20f5ec05b52035' }))));
24
+ return (h(Host, { key: 'd7a60f6d7f566bd06599a1a8e852d0bb91b280fe', onClick: this.onTabClicked }, h("div", { key: '06e36782db58fea99c82ef168ca1aaaa40fa73b4', class: { 'tab-container': true } }, h("slot", { key: '83dac7043bc3c311f43c55094e314d549e0b79e5' }))));
25
25
  }
26
26
  static get is() { return "cpsl-tab"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -2,7 +2,9 @@ import { Host, h } from "@stencil/core";
2
2
  export class CpslTable {
3
3
  constructor() {
4
4
  this.resizeOb = new ResizeObserver(entries => {
5
+ // since we are observing only a single element, so we access the first element in entries array
5
6
  const rect = entries[0].contentRect;
7
+ // current width & height
6
8
  const containerWidth = Math.round(rect.width);
7
9
  const containerHeight = Math.round(rect.height);
8
10
  const contentWidth = this.containerSlotEl.clientWidth;
@@ -45,7 +47,15 @@ export class CpslTable {
45
47
  return this.el.shadowRoot.getElementById('footer-container');
46
48
  }
47
49
  render() {
48
- return (h(Host, { key: 'e9cbff08e0793ef62230b8b53068e1473afdaea2' }, h("cpsl-card", { key: '59b98cf62317094f5ee651f1f9d3046e08c29ba6', part: "table-container", style: { position: 'relative' } }, h("div", { key: 'b3253c82710463d4657a5faa542717f8302fc589', id: "header-container", class: { 'container-header': true, 'shown': Boolean(this.containerHeaderEl) } }, h("slot", { key: '0ca0c2e99a6136c829b36d3b30c4623841845123', name: "header" })), h("div", { key: '966b47e7378c566065ccb7c8162e99c0375bcf48', id: "content-container", class: { 'content': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll }, part: "content" }, h("slot", { key: '8d7f77fb815ccdbd8f53d9d25d784d0206aef7b0', name: "content" })), this.headerEl && this.contentContainerEl && this.footerEl && (h("div", { style: { top: `${this.headerEl.clientHeight + 2}px`, height: `${this.contentContainerEl.clientHeight}px` }, class: { 'overlay': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll } })), h("div", { key: '3b90591c13c87072799d2aff0989841e18b3febc', id: "footer-container", class: { 'container-footer': true, 'shown': Boolean(this.containerFooterEl) } }, h("slot", { key: '5b479cd74365927c9534b4ed95fa9cea293875f7', name: "footer" })))));
50
+ return (h(Host, { key: 'fd29a5f781e3a76079d80f48d9b77cb9741dfb03' }, h("cpsl-card", { key: '2c4a206883f0d5adb462b5f8dd769e94225ceed2', part: "table-container", style: { position: 'relative' } }, h("div", { key: '751786e2ce9d4a69451987613e4f45c4f4d5e2f7', id: "header-container", class: { 'container-header': true, 'shown': Boolean(this.containerHeaderEl) } }, h("slot", { key: '1f6872b5eb0e06763521084d6749a8d735cdc5c6', name: "header" })), h("div", { key: '6116869054bef2663f3a71e54980ecb42171025a', id: "content-container", class: {
51
+ 'content': true,
52
+ 'horizontal-scroll': this.hasHorizontalScroll,
53
+ 'vertical-scroll': this.hasVerticalScroll,
54
+ }, part: "content" }, h("slot", { key: 'e22142febb5fc482237b723204df9bd58cb2255f', name: "content" })), this.headerEl && this.contentContainerEl && this.footerEl && (h("div", { key: '5dd40aa9b19738ecda6f629d526d9c112f4961bc', style: { top: `${this.headerEl.clientHeight + 2}px`, height: `${this.contentContainerEl.clientHeight}px` }, class: {
55
+ 'overlay': true,
56
+ 'horizontal-scroll': this.hasHorizontalScroll,
57
+ 'vertical-scroll': this.hasVerticalScroll,
58
+ } })), h("div", { key: '84ac6047646a9645b90523a2664590f2e7c8a7c1', id: "footer-container", class: { 'container-footer': true, 'shown': Boolean(this.containerFooterEl) } }, h("slot", { key: 'a1f5d553b487faba824524440007218f48ca28ef', name: "footer" })))));
49
59
  }
50
60
  static get is() { return "cpsl-table"; }
51
61
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-table.js","sourceRoot":"","sources":["../../../../src/components/cpsl-table/cpsl-table.tsx"],"names":[],"mappings":"AAAA,OAAO,E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SAAS,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,GACpH,CACH;gBACD,4DAAK,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBACtG,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACI,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, h, State } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-table',\n styleUrl: 'cpsl-table.scss',\n shadow: true,\n})\nexport class CpslTable {\n @Element() el!: HTMLCpslTableElement;\n\n @State() hasHorizontalScroll: boolean = false;\n @State() hasVerticalScroll: boolean = false;\n\n componentDidLoad() {\n this.resizeOb.observe(this.contentContainerEl);\n }\n\n private resizeOb = new ResizeObserver(entries => {\n // since we are observing only a single element, so we access the first element in entries array\n const rect = entries[0].contentRect;\n\n // current width & height\n const containerWidth = Math.round(rect.width);\n const containerHeight = Math.round(rect.height);\n const contentWidth = this.containerSlotEl.clientWidth;\n const contentHeight = this.containerSlotEl.clientHeight;\n\n if (contentWidth > containerWidth) {\n this.hasHorizontalScroll = true;\n } else {\n this.hasHorizontalScroll = false;\n }\n if (contentHeight > containerHeight) {\n this.hasVerticalScroll = true;\n } else {\n this.hasVerticalScroll = false;\n }\n });\n\n private get containerHeaderEl() {\n return this.el.querySelector('[slot=\"header\"]');\n }\n\n private get containerFooterEl() {\n return this.el.querySelector('[slot=\"footer\"]');\n }\n\n private get contentContainerEl() {\n return this.el.shadowRoot.getElementById('content-container');\n }\n\n private get headerEl() {\n return this.el.shadowRoot.getElementById('header-container');\n }\n\n private get containerSlotEl() {\n return this.el.querySelector('[slot=\"content\"]');\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('footer-container');\n }\n\n render() {\n return (\n <Host>\n <cpsl-card part=\"table-container\" style={{ position: 'relative' }}>\n <div id=\"header-container\" class={{ 'container-header': true, 'shown': Boolean(this.containerHeaderEl) }}>\n <slot name=\"header\"></slot>\n </div>\n <div id=\"content-container\" class={{ 'content': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll }} part=\"content\">\n <slot name=\"content\"></slot>\n </div>\n {this.headerEl && this.contentContainerEl && this.footerEl && (\n <div\n style={{ top: `${this.headerEl.clientHeight + 2}px`, height: `${this.contentContainerEl.clientHeight}px` }}\n class={{ 'overlay': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll }}\n />\n )}\n <div id=\"footer-container\" class={{ 'container-footer': true, 'shown': Boolean(this.containerFooterEl) }}>\n <slot name=\"footer\"></slot>\n </div>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-table.js","sourceRoot":"","sources":["../../../../src/components/cpsl-table/cpsl-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOnE,MAAM,OAAO,SAAS;;QAUZ,aAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;YAC9C,gGAAgG;YAChG,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;YAEpC,yBAAyB;YACzB,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC9C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChD,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;YACtD,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;YAExD,IAAI,YAAY,GAA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BAC/D,4DAAK,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBACtG,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB;gBACN,4DACE,EAAE,EAAC,mBAAmB,EACtB,KAAK,EAAE;wBACL,SAAS,EAAE,IAAI;wBACf,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;wBAC7C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;qBAC1C,EACD,IAAI,EAAC,SAAS;oBAEd,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB;gBACL,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,QAAQ,IAAI,CAC5D,4DACE,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,IAAI,EAAE,EAC1G,KAAK,EAAE;wBACL,SAAS,EAAE,IAAI;wBACf,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;wBAC7C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;qBAC1C,GACD,CACH;gBACD,4DAAK,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBACtG,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACI,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, h, State } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-table',\n styleUrl: 'cpsl-table.scss',\n shadow: true,\n})\nexport class CpslTable {\n @Element() el!: HTMLCpslTableElement;\n\n @State() hasHorizontalScroll: boolean = false;\n @State() hasVerticalScroll: boolean = false;\n\n componentDidLoad() {\n this.resizeOb.observe(this.contentContainerEl);\n }\n\n private resizeOb = new ResizeObserver(entries => {\n // since we are observing only a single element, so we access the first element in entries array\n const rect = entries[0].contentRect;\n\n // current width & height\n const containerWidth = Math.round(rect.width);\n const containerHeight = Math.round(rect.height);\n const contentWidth = this.containerSlotEl.clientWidth;\n const contentHeight = this.containerSlotEl.clientHeight;\n\n if (contentWidth > containerWidth) {\n this.hasHorizontalScroll = true;\n } else {\n this.hasHorizontalScroll = false;\n }\n if (contentHeight > containerHeight) {\n this.hasVerticalScroll = true;\n } else {\n this.hasVerticalScroll = false;\n }\n });\n\n private get containerHeaderEl() {\n return this.el.querySelector('[slot=\"header\"]');\n }\n\n private get containerFooterEl() {\n return this.el.querySelector('[slot=\"footer\"]');\n }\n\n private get contentContainerEl() {\n return this.el.shadowRoot.getElementById('content-container');\n }\n\n private get headerEl() {\n return this.el.shadowRoot.getElementById('header-container');\n }\n\n private get containerSlotEl() {\n return this.el.querySelector('[slot=\"content\"]');\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('footer-container');\n }\n\n render() {\n return (\n <Host>\n <cpsl-card part=\"table-container\" style={{ position: 'relative' }}>\n <div id=\"header-container\" class={{ 'container-header': true, 'shown': Boolean(this.containerHeaderEl) }}>\n <slot name=\"header\"></slot>\n </div>\n <div\n id=\"content-container\"\n class={{\n 'content': true,\n 'horizontal-scroll': this.hasHorizontalScroll,\n 'vertical-scroll': this.hasVerticalScroll,\n }}\n part=\"content\"\n >\n <slot name=\"content\"></slot>\n </div>\n {this.headerEl && this.contentContainerEl && this.footerEl && (\n <div\n style={{ top: `${this.headerEl.clientHeight + 2}px`, height: `${this.contentContainerEl.clientHeight}px` }}\n class={{\n 'overlay': true,\n 'horizontal-scroll': this.hasHorizontalScroll,\n 'vertical-scroll': this.hasVerticalScroll,\n }}\n />\n )}\n <div id=\"footer-container\" class={{ 'container-footer': true, 'shown': Boolean(this.containerFooterEl) }}>\n <slot name=\"footer\"></slot>\n </div>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
@@ -16,6 +16,7 @@ export class CpslTabs {
16
16
  this.selectedTab = undefined;
17
17
  }
18
18
  updateSlider() {
19
+ // Allow component to condense or expand before recalculating silder
19
20
  setTimeout(() => {
20
21
  this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();
21
22
  }, 50);
@@ -35,6 +36,7 @@ export class CpslTabs {
35
36
  componentDidLoad() {
36
37
  var _a, _b;
37
38
  this.selectedTabRect = (_b = (_a = getTab(this.tabs, this.selectedTab)) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) !== null && _b !== void 0 ? _b : { width: 0, x: 0 };
39
+ // Allow slider to be rendered with the correct initial style before the transition is added
38
40
  setTimeout(() => {
39
41
  this.loaded = true;
40
42
  }, 50);
@@ -44,9 +46,13 @@ export class CpslTabs {
44
46
  }
45
47
  render() {
46
48
  const tabsPosition = this.el.getBoundingClientRect();
49
+ // Get border width as a number
47
50
  const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);
48
51
  const selectedTabRect = this.selectedTabRect;
49
- return (h(Host, { key: 'daae41f6bae37f5901f7e294ee8c0b227c307274', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, h("div", { key: '7027de2da2d48015961d1e79dc642d57c1872ff4', class: "tabs-container" }, h("slot", { key: 'fe79fe70cf220643aecc6caadf7ac1ce743e37bf' }), h("div", { key: '9e01e2c7fb5c613c4bc75c1e75cc4db87168b5e2', class: { slider: true, loaded: this.loaded }, style: { width: `${selectedTabRect.width}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px` } }))));
52
+ return (h(Host, { key: 'dec4efb53895d711a0a5d30983f1776d357720d1', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, h("div", { key: 'cad62f297e6717cda3910884f58ba2e97ac2bfeb', class: "tabs-container" }, h("slot", { key: '9cef9327f6de5c19bcc0d023c673476dc11edc18' }), h("div", { key: '1ca0fd524bc1843a3b8bf1115e387d3889859bc8', class: { slider: true, loaded: this.loaded }, style: {
53
+ width: `${selectedTabRect.width}px`,
54
+ left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px`,
55
+ } }))));
50
56
  }
51
57
  static get is() { return "cpsl-tabs"; }
52
58
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-tabs.js","sourceRoot":"","sources":["../../../../src/components/cpsl-tabs/cpsl-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AASrG,MAAM,OAAO,QAAQ;;QA+DX,iBAAY,GAAG,CAAC,EAAoC,EAAE,EAAE;YAC9D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;YAE1B,IAAI,GAAG,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC7B,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,qBAAqB,EAAE,CAAC;gBAEtE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACxB,GAAG;iBACJ,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC;;sBArEyB,KAAK;;;;IAwBhC,YAAY;QAEV,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,qBAAqB,EAAE,CAAC;QACrF,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAGD,SAAS,CAAC,QAAiB,EAAE,QAAiB;QAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAA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OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,CAAC,YAAY;YACpF,4DAAK,KAAK,EAAC,gBAAgB;gBACzB,8DAAa;gBACb,4DACE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAC5C,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,KAAK,IAAI,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,GAAG,eAAe,GAAG,CAAC,IAAI,EAAE,GACrH,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,MAAM,MAAM,GAAG,CAAC,IAA0B,EAAE,GAAgC,EAAkC,EAAE;IAC9G,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAE5E,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import { Component, Host, Element, h, Event, Prop, EventEmitter, State, Watch } from '@stencil/core';\nimport { TabClickEventDetail } from '../cpsl-tab/tab-interface';\nimport { TabsChangedEventDetail } from './tabs-interface';\n\n@Component({\n tag: 'cpsl-tabs',\n styleUrl: 'cpsl-tabs.scss',\n shadow: true,\n})\nexport class CpslTabs {\n @Element() el!: HTMLCpslTabsElement;\n\n @State() selectedTabRect?: DOMRect;\n @State() loaded: boolean = false;\n\n /**\n * Whether or not the tabs take the full width of their container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * The selected tab component\n */\n @Prop() selectedTab?: string;\n\n /**\n * Emitted when a tab is changed\n */\n @Event() cpslTabsChanged!: EventEmitter<TabsChangedEventDetail>;\n\n /**\n * Emitted when tabs are initialized\n * @internal\n */\n @Event() cpslTabsInit!: EventEmitter<TabsChangedEventDetail>;\n\n @Watch('fullWidth')\n updateSlider() {\n // Allow component to condense or expand before recalculating silder\n setTimeout(() => {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }, 50);\n }\n\n @Watch('selectedTab')\n updateTab(newValue?: string, oldValue?: string) {\n if (Boolean(newValue) && !Boolean(oldValue)) {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }\n }\n\n componentWillLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n this.cpslTabsInit.emit({\n tab: this.selectedTab,\n });\n }\n\n componentDidLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n // Allow slider to be rendered with the correct initial style before the transition is added\n setTimeout(() => {\n this.loaded = true;\n }, 50);\n }\n\n private get tabs() {\n return Array.from(this.el.querySelectorAll('cpsl-tab'));\n }\n\n private onTabClicked = (ev: CustomEvent<TabClickEventDetail>) => {\n const { tab } = ev.detail;\n\n if (tab !== this.selectedTab) {\n this.selectedTabRect = getTab(this.tabs, tab).getBoundingClientRect();\n\n this.cpslTabsChanged.emit({\n tab,\n });\n }\n };\n\n render() {\n const tabsPosition = this.el.getBoundingClientRect();\n // Get border width as a number\n const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);\n const selectedTabRect = this.selectedTabRect;\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} onCpslTabButtonClick={this.onTabClicked}>\n <div class=\"tabs-container\">\n <slot></slot>\n <div\n class={{ slider: true, loaded: this.loaded }}\n style={{ width: `${selectedTabRect.width}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px` }}\n />\n </div>\n </Host>\n );\n }\n}\n\nconst getTab = (tabs: HTMLCpslTabElement[], tab: string | HTMLCpslTabElement): HTMLCpslTabElement | undefined => {\n const tabEl = typeof tab === 'string' ? tabs.find(t => t.tab === tab) : tab;\n\n return tabEl;\n};\n"]}
1
+ {"version":3,"file":"cpsl-tabs.js","sourceRoot":"","sources":["../../../../src/components/cpsl-tabs/cpsl-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AASrG,MAAM,OAAO,QAAQ;;QA+DX,iBAAY,GAAG,CAAC,EAAoC,EAAE,EAAE;YAC9D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;YAE1B,IAAI,GAAG,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC7B,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,qBAAqB,EAAE,CAAC;gBAEtE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACxB,GAAG;iBACJ,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC;;sBArEyB,KAAK;;;;IAwBhC,YAAY;QACV,oEAAoE;QACpE,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,qBAAqB,EAAE,CAAC;QACrF,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAGD,SAAS,CAAC,QAAiB,EAAE,QAAiB;QAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE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E7C,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,CAAC,YAAY;YACpF,4DAAK,KAAK,EAAC,gBAAgB;gBACzB,8DAAa;gBACb,4DACE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAC5C,KAAK,EAAE;wBACL,KAAK,EAAE,GAAG,eAAe,CAAC,KAAK,IAAI;wBACnC,IAAI,EAAE,GAAG,eAAe,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,GAAG,eAAe,GAAG,CAAC,IAAI;qBACtE,GACD,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,MAAM,MAAM,GAAG,CAAC,IAA0B,EAAE,GAAgC,EAAkC,EAAE;IAC9G,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAE5E,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import { Component, Host, Element, h, Event, Prop, EventEmitter, State, Watch } from '@stencil/core';\nimport { TabClickEventDetail } from '../cpsl-tab/tab-interface';\nimport { TabsChangedEventDetail } from './tabs-interface';\n\n@Component({\n tag: 'cpsl-tabs',\n styleUrl: 'cpsl-tabs.scss',\n shadow: true,\n})\nexport class CpslTabs {\n @Element() el!: HTMLCpslTabsElement;\n\n @State() selectedTabRect?: DOMRect;\n @State() loaded: boolean = false;\n\n /**\n * Whether or not the tabs take the full width of their container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * The selected tab component\n */\n @Prop() selectedTab?: string;\n\n /**\n * Emitted when a tab is changed\n */\n @Event() cpslTabsChanged!: EventEmitter<TabsChangedEventDetail>;\n\n /**\n * Emitted when tabs are initialized\n * @internal\n */\n @Event() cpslTabsInit!: EventEmitter<TabsChangedEventDetail>;\n\n @Watch('fullWidth')\n updateSlider() {\n // Allow component to condense or expand before recalculating silder\n setTimeout(() => {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }, 50);\n }\n\n @Watch('selectedTab')\n updateTab(newValue?: string, oldValue?: string) {\n if (Boolean(newValue) && !Boolean(oldValue)) {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }\n }\n\n componentWillLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n this.cpslTabsInit.emit({\n tab: this.selectedTab,\n });\n }\n\n componentDidLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n // Allow slider to be rendered with the correct initial style before the transition is added\n setTimeout(() => {\n this.loaded = true;\n }, 50);\n }\n\n private get tabs() {\n return Array.from(this.el.querySelectorAll('cpsl-tab'));\n }\n\n private onTabClicked = (ev: CustomEvent<TabClickEventDetail>) => {\n const { tab } = ev.detail;\n\n if (tab !== this.selectedTab) {\n this.selectedTabRect = getTab(this.tabs, tab).getBoundingClientRect();\n\n this.cpslTabsChanged.emit({\n tab,\n });\n }\n };\n\n render() {\n const tabsPosition = this.el.getBoundingClientRect();\n // Get border width as a number\n const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);\n const selectedTabRect = this.selectedTabRect;\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} onCpslTabButtonClick={this.onTabClicked}>\n <div class=\"tabs-container\">\n <slot></slot>\n <div\n class={{ slider: true, loaded: this.loaded }}\n style={{\n width: `${selectedTabRect.width}px`,\n left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px`,\n }}\n />\n </div>\n </Host>\n );\n }\n}\n\nconst getTab = (tabs: HTMLCpslTabElement[], tab: string | HTMLCpslTabElement): HTMLCpslTabElement | undefined => {\n const tabEl = typeof tab === 'string' ? tabs.find(t => t.tab === tab) : tab;\n\n return tabEl;\n};\n"]}
@@ -31,16 +31,19 @@ export class CpslText {
31
31
  }
32
32
  }
33
33
  render() {
34
- return (h(Host, { key: 'ba54020f7e8b3b817f0d948e3ac317855d7da407', class: {
34
+ return (h(Host, { key: 'f561a084160b4b5742fe58e3270837309123aedb', class: {
35
+ // COLORS
35
36
  'primary': this.color === 'primary',
36
37
  'secondary': this.color === 'secondary',
37
38
  'tertiary': this.color === 'tertiary',
38
39
  'subtle': this.color === 'subtle',
39
40
  'inverted': this.color === 'inverted',
40
41
  'error': this.color === 'error',
42
+ // WEIGHTS
41
43
  'medium': this.weight === 'medium',
42
44
  'semi-bold': this.weight === 'semiBold',
43
45
  'bold': this.weight === 'bold',
46
+ // SIZES
44
47
  'body-2xs': this.variant === 'body2XS',
45
48
  'body-xs': this.variant === 'bodyXS',
46
49
  'body-s': this.variant === 'bodyS',
@@ -91,7 +94,7 @@ export class CpslText {
91
94
  "type": "string",
92
95
  "mutable": false,
93
96
  "complexType": {
94
- "original": "'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL'",
97
+ "original": "| 'body2XS'\n | 'bodyXS'\n | 'bodyS'\n | 'bodyM'\n | 'bodyL'\n | 'bodyXL'\n | 'headingXS'\n | 'headingS'\n | 'headingM'\n | 'headingL'\n | 'headingXL'\n | 'heading2XL'",
95
98
  "resolved": "\"body2XS\" | \"bodyL\" | \"bodyM\" | \"bodyS\" | \"bodyXL\" | \"bodyXS\" | \"heading2XL\" | \"headingL\" | \"headingM\" | \"headingS\" | \"headingXL\" | \"headingXS\"",
96
99
  "references": {}
97
100
  },
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;;qBAMsE,SAAS;uBAOkE,OAAO;sBAO7G,SAAS;;IAEvE,IAAY,OAAO;QACjB,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,CACL;oBACE,eAAa,CACX,CACL,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBAEL,SAAS,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;gBACnC,WAAW,EAAE,IAAI,CAAC,KAAK,KAAK,WAAW;gBACvC,UAAU,EAAE,IAAI,CAAC,KAAK,KAAK,UAAU;gBACrC,QAAQ,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;gBACjC,UAAU,EAAE,IAAI,CAAC,KAAK,KAAK,UAAU;gBACrC,OAAO,EAAE,IAAI,CAAC,KAAK,KAAK,OAAO;gBAE/B,QAAQ,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAClC,WAAW,EAAE,IAAI,CAAC,MAAM,KAAK,UAAU;gBACvC,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;gBAE9B,UAAU,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACtC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;aAC7C,IAEA,IAAI,CAAC,OAAO,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?: 'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private get Content() {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p>\n <slot></slot>\n </p>\n );\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'tertiary': this.color === 'tertiary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n }}\n >\n {this.Content}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;;qBAMsE,SAAS;uBAmB/E,OAAO;sBAOoC,SAAS;;IAEvE,IAAY,OAAO;QACjB,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,OAAO,CACL;oBACE,eAAa,CACV,CACN,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,CACL;oBACE,eAAa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CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?:\n | 'body2XS'\n | 'bodyXS'\n | 'bodyS'\n | 'bodyM'\n | 'bodyL'\n | 'bodyXL'\n | 'headingXS'\n | 'headingS'\n | 'headingM'\n | 'headingL'\n | 'headingXL'\n | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private get Content() {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p>\n <slot></slot>\n </p>\n );\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'tertiary': this.color === 'tertiary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n }}\n >\n {this.Content}\n </Host>\n );\n }\n}\n"]}
@@ -5,7 +5,7 @@ export class CpslTileButton {
5
5
  this.icon = undefined;
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '587cb8fe894f45ab668c8dfda82d979e37906464' }, h("button", { key: 'ebcaee33d3f842063503c7152779d9c489be8a59', class: "button-native" }, h("cpsl-icon", { key: '4e456aab6fe534a3728c11f2a7ec868db4c2837f', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: 'e529e2716796a3a8c979e04a855b2e7d30d7428c' }))));
8
+ return (h(Host, { key: 'b7efccced9e21362a8886affca5f1e5d76561128' }, h("button", { key: 'f4507790f04e74551830475b01e28c346776b21d', class: "button-native" }, h("cpsl-icon", { key: '0709e96b514f503171f5e3c5c1982ad75e1fd722', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: 'f0107493204c5d605a37f994360171507b1004de' }))));
9
9
  }
10
10
  static get is() { return "cpsl-tile-button"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -43,7 +43,7 @@ export class CpslTileButton {
43
43
  "mutable": false,
44
44
  "complexType": {
45
45
  "original": "IconType",
46
- "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"doubleArc\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"singleArc\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
46
+ "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
47
47
  "references": {
48
48
  "IconType": {
49
49
  "location": "import",
@@ -1 +1 @@
1
- {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\nimport { Images } from './assets/images';\n\nexport type PredefinedColors = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type AutocompleteTypes =\n | 'on'\n | 'off'\n | 'name'\n | 'honorific-prefix'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n | 'honorific-suffix'\n | 'nickname'\n | 'email'\n | 'username'\n | 'new-password'\n | 'current-password'\n | 'one-time-code'\n | 'organization-title'\n | 'organization'\n | 'street-address'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'address-level4'\n | 'address-level3'\n | 'address-level2'\n | 'address-level1'\n | 'country'\n | 'country-name'\n | 'postal-code'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-additional-name'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-number'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-csc'\n | 'cc-type'\n | 'transaction-currency'\n | 'transaction-amount'\n | 'language'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'sex'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-area-code'\n | 'tel-local'\n | 'tel-extension'\n | 'impp'\n | 'url'\n | 'photo';\n\nexport type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local';\n\nexport type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);\n\nexport type Color = LiteralUnion<PredefinedColors, string>;\n\nexport type CssClassMap = { [className: string]: boolean };\n\nexport type IconType = keyof typeof Icons;\nexport type ImageType = keyof typeof Images;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n customFontSizes?: CustomFontSizes;\n customBorderRadii?: CustomBorderRadii;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nexport interface CustomBorderRadii {\n input?: string;\n select?: string;\n fileSelect?: string;\n alert?: string;\n tabs?: string;\n primaryButton?: string;\n secondaryButton?: string;\n destructiveButton?: string;\n tileButton?: string;\n modal?: string;\n pill?: string;\n qrCode?: string;\n infoBox?: string;\n tableContainer?: string;\n switch?: string;\n checkbox?: string;\n radio?: string;\n avatar?: string;\n card?: string;\n buttonGroup?: string;\n}\nexport interface CustomFontSizes {\n body2XS?: string;\n bodyXS?: string;\n bodyS?: string;\n bodyM?: string;\n bodyL?: string;\n bodyXL?: string;\n headingXS?: string;\n headingS?: string;\n headingM?: string;\n headingL?: string;\n headingXL?: string;\n heading2XL?: string;\n}\n\nexport interface CustomPalette {\n text?: {\n primary?: string;\n secondary?: string;\n subtle?: string;\n inverted?: string;\n error?: string;\n };\n modal?: {\n surface?: {\n main?: string;\n footer?: string;\n };\n border?: string;\n };\n input?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n };\n select?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n dropdown?: {\n border?: string;\n };\n };\n file?: {\n surface?: {\n disabled?: string;\n default?: string;\n drag?: string;\n };\n border?: {\n placeholder?: string;\n error?: string;\n };\n };\n tileButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n };\n border?: string;\n };\n primaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n secondaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n destructiveButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n divider?: string;\n spinner?: {\n path?: string;\n circle?: string;\n };\n pill?: {\n text?: string;\n container?: {\n background?: string;\n border?: string;\n };\n };\n progressIndicator?: {\n active?: string;\n next?: string;\n previous?: string;\n };\n qr?: {\n fill?: string;\n background?: string;\n border?: string;\n };\n slideButton?: {\n slider?: {\n background?: string;\n border?: string;\n text?: string;\n container?: {\n start?: {\n background?: string;\n border?: string;\n };\n end?: {\n background?: string;\n border?: string;\n };\n };\n };\n start?: {\n text?: string;\n };\n end?: {\n text?: string;\n };\n };\n alert?: {\n surface?: {\n error?: string;\n };\n border?: {\n error?: string;\n };\n };\n switch?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n thumb?: {\n default?: string;\n checked?: string;\n };\n };\n checkbox?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n icon?: string;\n };\n radio?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n };\n card?: {\n surface?: string;\n border?: string;\n };\n}\n\nexport interface InteractionCallback {\n eventName: string;\n callback: (ev: any) => void;\n}\n"]}
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\nimport { Images } from './assets/images';\n\nexport type PredefinedColors =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'light'\n | 'medium'\n | 'dark';\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type AutocompleteTypes =\n | 'on'\n | 'off'\n | 'name'\n | 'honorific-prefix'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n | 'honorific-suffix'\n | 'nickname'\n | 'email'\n | 'username'\n | 'new-password'\n | 'current-password'\n | 'one-time-code'\n | 'organization-title'\n | 'organization'\n | 'street-address'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'address-level4'\n | 'address-level3'\n | 'address-level2'\n | 'address-level1'\n | 'country'\n | 'country-name'\n | 'postal-code'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-additional-name'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-number'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-csc'\n | 'cc-type'\n | 'transaction-currency'\n | 'transaction-amount'\n | 'language'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'sex'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-area-code'\n | 'tel-local'\n | 'tel-extension'\n | 'impp'\n | 'url'\n | 'photo';\n\nexport type TextFieldTypes =\n | 'date'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'url'\n | 'time'\n | 'week'\n | 'month'\n | 'datetime-local';\n\nexport type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);\n\nexport type Color = LiteralUnion<PredefinedColors, string>;\n\nexport type CssClassMap = { [className: string]: boolean };\n\nexport type IconType = keyof typeof Icons;\n\nexport type ImageType = keyof typeof Images;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n customFontSizes?: CustomFontSizes;\n customBorderRadii?: CustomBorderRadii;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nexport interface CustomBorderRadii {\n input?: string;\n select?: string;\n fileSelect?: string;\n alert?: string;\n tabs?: string;\n primaryButton?: string;\n secondaryButton?: string;\n destructiveButton?: string;\n tileButton?: string;\n modal?: string;\n pill?: string;\n qrCode?: string;\n infoBox?: string;\n tableContainer?: string;\n switch?: string;\n checkbox?: string;\n radio?: string;\n avatar?: string;\n card?: string;\n buttonGroup?: string;\n}\nexport interface CustomFontSizes {\n body2XS?: string;\n bodyXS?: string;\n bodyS?: string;\n bodyM?: string;\n bodyL?: string;\n bodyXL?: string;\n headingXS?: string;\n headingS?: string;\n headingM?: string;\n headingL?: string;\n headingXL?: string;\n heading2XL?: string;\n}\n\nexport interface CustomPalette {\n text?: {\n primary?: string;\n secondary?: string;\n subtle?: string;\n inverted?: string;\n error?: string;\n };\n modal?: {\n surface?: {\n main?: string;\n footer?: string;\n };\n border?: string;\n };\n input?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n };\n select?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n dropdown?: {\n border?: string;\n };\n };\n file?: {\n surface?: {\n disabled?: string;\n default?: string;\n drag?: string;\n };\n border?: {\n placeholder?: string;\n error?: string;\n };\n };\n tileButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n };\n border?: string;\n };\n primaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n secondaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n destructiveButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n divider?: string;\n spinner?: {\n path?: string;\n circle?: string;\n };\n pill?: {\n text?: string;\n container?: {\n background?: string;\n border?: string;\n };\n };\n progressIndicator?: {\n active?: string;\n next?: string;\n previous?: string;\n };\n qr?: {\n fill?: string;\n background?: string;\n border?: string;\n };\n slideButton?: {\n slider?: {\n background?: string;\n border?: string;\n text?: string;\n container?: {\n start?: {\n background?: string;\n border?: string;\n };\n end?: {\n background?: string;\n border?: string;\n };\n };\n };\n start?: {\n text?: string;\n };\n end?: {\n text?: string;\n };\n };\n alert?: {\n surface?: {\n error?: string;\n };\n border?: {\n error?: string;\n };\n };\n switch?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n thumb?: {\n default?: string;\n checked?: string;\n };\n };\n checkbox?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n icon?: string;\n };\n radio?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n };\n card?: {\n surface?: string;\n border?: string;\n };\n}\n\nexport interface InteractionCallback {\n eventName: string;\n callback: (ev: any) => void;\n}\n"]}
@@ -5,6 +5,9 @@ export const SIZE_TO_MEDIA = {
5
5
  lg: '(min-width: 992px)',
6
6
  xl: '(min-width: 1200px)',
7
7
  };
8
+ // Check if the window matches the media query
9
+ // at the breakpoint passed
10
+ // e.g. matchBreakpoint('sm') => true if screen width exceeds 576px
8
11
  export const matchBreakpoint = (breakpoint) => {
9
12
  if (breakpoint === undefined || breakpoint === '') {
10
13
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../../../src/utils/media.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAQ;IAChC,EAAE,EAAE,kBAAkB;IACtB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;CAC1B,CAAC;AAKF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAA8B,EAAE,EAAE;IAChE,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAK,MAAc,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["export const SIZE_TO_MEDIA: any = {\n xs: '(min-width: 0px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n};\n\n// Check if the window matches the media query\n// at the breakpoint passed\n// e.g. matchBreakpoint('sm') => true if screen width exceeds 576px\nexport const matchBreakpoint = (breakpoint: string | undefined) => {\n if (breakpoint === undefined || breakpoint === '') {\n return true;\n }\n if ((window as any).matchMedia) {\n const mediaQuery = SIZE_TO_MEDIA[breakpoint];\n return window.matchMedia(mediaQuery).matches;\n }\n return false;\n};\n"]}
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../../../src/utils/media.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAQ;IAChC,EAAE,EAAE,kBAAkB;IACtB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;CAC1B,CAAC;AAEF,8CAA8C;AAC9C,2BAA2B;AAC3B,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAA8B,EAAE,EAAE;IAChE,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAK,MAAc,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["export const SIZE_TO_MEDIA: any = {\n xs: '(min-width: 0px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n};\n\n// Check if the window matches the media query\n// at the breakpoint passed\n// e.g. matchBreakpoint('sm') => true if screen width exceeds 576px\nexport const matchBreakpoint = (breakpoint: string | undefined) => {\n if (breakpoint === undefined || breakpoint === '') {\n return true;\n }\n if ((window as any).matchMedia) {\n const mediaQuery = SIZE_TO_MEDIA[breakpoint];\n return window.matchMedia(mediaQuery).matches;\n }\n return false;\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { getCssBorderRadii } from "./utils";
2
- export const generateBorderRadii = ({ borderRadius, customBorderRadii }) => {
2
+ export const generateBorderRadii = ({ borderRadius, customBorderRadii, }) => {
3
3
  let mediumRadius, largeRadius, checkboxRadius = 4;
4
4
  const fullRadius = 1000;
5
5
  let isFull = false;