@usecapsule/core-components 2.0.10 → 3.0.1-dev.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. package/css/capsule-core.css +134 -30
  2. package/css/capsule-core.css.map +1 -1
  3. package/dist/capsule/capsule.esm.js +1 -1
  4. package/dist/capsule/capsule.esm.js.map +1 -1
  5. package/dist/capsule/index.esm.js +1 -1
  6. package/dist/capsule/index.esm.js.map +1 -1
  7. package/dist/capsule/{p-415384b7.entry.js → p-127ac658.entry.js} +2 -2
  8. package/dist/capsule/{p-415384b7.entry.js.map → p-127ac658.entry.js.map} +1 -1
  9. package/dist/capsule/p-39584a7b.entry.js +2 -0
  10. package/dist/capsule/p-39584a7b.entry.js.map +1 -0
  11. package/dist/capsule/{p-b76350fd.entry.js → p-69756614.entry.js} +2 -2
  12. package/dist/capsule/{p-b76350fd.entry.js.map → p-69756614.entry.js.map} +1 -1
  13. package/dist/capsule/p-73398222.entry.js +2 -0
  14. package/dist/capsule/{p-fa4e3c14.entry.js.map → p-73398222.entry.js.map} +1 -1
  15. package/dist/capsule/p-8de15b15.entry.js +29 -0
  16. package/dist/capsule/p-8de15b15.entry.js.map +1 -0
  17. package/dist/capsule/p-97c33636.js +3 -0
  18. package/dist/capsule/p-97c33636.js.map +1 -0
  19. package/dist/capsule/p-f2393be6.js +2 -0
  20. package/dist/capsule/p-f2393be6.js.map +1 -0
  21. package/dist/capsule/p-f72482c3.entry.js +2 -0
  22. package/dist/capsule/{p-6b02ea8d.entry.js.map → p-f72482c3.entry.js.map} +1 -1
  23. package/dist/capsule/{p-4d957466.entry.js → p-fd26ce6e.entry.js} +2 -2
  24. package/dist/capsule/{p-4d957466.entry.js.map → p-fd26ce6e.entry.js.map} +1 -1
  25. package/dist/cjs/capsule.cjs.js +10 -10
  26. package/dist/cjs/capsule.cjs.js.map +1 -1
  27. package/dist/cjs/constants-9b1b01bb.js +29 -0
  28. package/dist/cjs/constants-9b1b01bb.js.map +1 -0
  29. package/dist/cjs/{cpsl-alert_18.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +1136 -232
  30. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-animation.cjs.entry.js +1 -1
  32. package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
  33. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  34. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  35. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  36. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +55 -0
  37. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  39. package/dist/cjs/index-5293d431.js +1414 -0
  40. package/dist/cjs/index-5293d431.js.map +1 -0
  41. package/dist/cjs/index.cjs.js +65 -24
  42. package/dist/cjs/index.cjs.js.map +1 -1
  43. package/dist/cjs/loader.cjs.js +2 -2
  44. package/dist/collection/assets/icons/brush.svg +3 -0
  45. package/dist/collection/assets/icons/check-circle.svg +3 -0
  46. package/dist/collection/assets/icons/chevron-up.svg +2 -2
  47. package/dist/collection/assets/icons/close.svg +3 -4
  48. package/dist/collection/assets/icons/cube.svg +3 -0
  49. package/dist/collection/assets/icons/file.svg +3 -0
  50. package/dist/collection/assets/icons/home.svg +3 -0
  51. package/dist/collection/assets/icons/image.svg +3 -0
  52. package/dist/collection/assets/icons/index.js +13 -3
  53. package/dist/collection/assets/icons/index.js.map +1 -1
  54. package/dist/collection/assets/icons/lightning-01.svg +3 -0
  55. package/dist/collection/assets/icons/lightning.svg +2 -2
  56. package/dist/collection/assets/icons/menu.svg +3 -0
  57. package/dist/collection/assets/icons/refresh.svg +3 -0
  58. package/dist/collection/assets/icons/settings.svg +4 -0
  59. package/dist/collection/assets/icons/stars.svg +4 -0
  60. package/dist/collection/assets/icons/x.svg +3 -0
  61. package/dist/collection/collection-manifest.json +18 -2
  62. package/dist/collection/components/cpsl-alert/cpsl-alert.css +21 -11
  63. package/dist/collection/components/cpsl-alert/cpsl-alert.js +34 -26
  64. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  65. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.css +67 -0
  66. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +85 -0
  67. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -0
  68. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js +29 -0
  69. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js.map +1 -0
  70. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js +37 -0
  71. package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js.map +1 -0
  72. package/dist/collection/components/cpsl-avatar/cpsl-avatar.css +31 -0
  73. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +81 -0
  74. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js.map +1 -0
  75. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js +29 -0
  76. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js.map +1 -0
  77. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js +37 -0
  78. package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js.map +1 -0
  79. package/dist/collection/components/cpsl-button/cpsl-button.css +276 -56
  80. package/dist/collection/components/cpsl-button/cpsl-button.js +104 -7
  81. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  82. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +89 -0
  83. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +78 -0
  84. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js.map +1 -0
  85. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js +29 -0
  86. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js.map +1 -0
  87. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js +37 -0
  88. package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js.map +1 -0
  89. package/dist/collection/components/cpsl-card/cpsl-card.css +81 -0
  90. package/dist/collection/components/cpsl-card/cpsl-card.js +19 -0
  91. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -0
  92. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js +29 -0
  93. package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js.map +1 -0
  94. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js +37 -0
  95. package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js.map +1 -0
  96. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +110 -0
  97. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +64 -0
  98. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js.map +1 -0
  99. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js +29 -0
  100. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js.map +1 -0
  101. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js +37 -0
  102. package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js.map +1 -0
  103. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  104. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
  105. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  106. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  107. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  108. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  109. package/dist/collection/components/cpsl-drawer/cpsl-drawer.css +90 -0
  110. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +222 -0
  111. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -0
  112. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js +29 -0
  113. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js.map +1 -0
  114. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js +37 -0
  115. package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js.map +1 -0
  116. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  117. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  118. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +210 -0
  119. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  120. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  121. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  122. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  123. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  124. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  125. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  126. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  127. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  128. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  129. package/dist/collection/components/cpsl-input/cpsl-input.css +39 -22
  130. package/dist/collection/components/cpsl-input/cpsl-input.js +47 -11
  131. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  132. package/dist/collection/components/cpsl-modal/cpsl-modal.css +16 -6
  133. package/dist/collection/components/cpsl-modal/cpsl-modal.js +21 -2
  134. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  135. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  136. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  137. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  138. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  139. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  140. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  141. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  142. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.css +50 -0
  143. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +78 -0
  144. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -0
  145. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js +29 -0
  146. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js.map +1 -0
  147. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js +37 -0
  148. package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js.map +1 -0
  149. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +62 -4
  150. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +35 -17
  151. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
  152. package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +67 -0
  153. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +174 -0
  154. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -0
  155. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js +29 -0
  156. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js.map +1 -0
  157. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js +37 -0
  158. package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js.map +1 -0
  159. package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
  160. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  161. package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
  162. package/dist/collection/components/cpsl-popover/cpsl-popover.js +470 -0
  163. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -0
  164. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +29 -0
  165. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +1 -0
  166. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +37 -0
  167. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +1 -0
  168. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  169. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +1 -1
  170. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  171. package/dist/collection/components/cpsl-radio/cpsl-radio.css +97 -0
  172. package/dist/collection/components/cpsl-radio/cpsl-radio.js +66 -0
  173. package/dist/collection/components/cpsl-radio/cpsl-radio.js.map +1 -0
  174. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js +29 -0
  175. package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js.map +1 -0
  176. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js +37 -0
  177. package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js.map +1 -0
  178. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  179. package/dist/collection/components/cpsl-select/cpsl-select.css +227 -0
  180. package/dist/collection/components/cpsl-select/cpsl-select.js +393 -0
  181. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -0
  182. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +29 -0
  183. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +1 -0
  184. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +37 -0
  185. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +1 -0
  186. package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +104 -0
  187. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +85 -0
  188. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -0
  189. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +29 -0
  190. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +1 -0
  191. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +37 -0
  192. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +1 -0
  193. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +3 -3
  194. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  195. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  196. package/dist/collection/components/cpsl-switch/cpsl-switch.css +115 -0
  197. package/dist/collection/components/cpsl-switch/cpsl-switch.js +64 -0
  198. package/dist/collection/components/cpsl-switch/cpsl-switch.js.map +1 -0
  199. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js +29 -0
  200. package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js.map +1 -0
  201. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js +37 -0
  202. package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js.map +1 -0
  203. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  204. package/dist/collection/components/cpsl-table/cpsl-table.css +140 -0
  205. package/dist/collection/components/cpsl-table/cpsl-table.js +26 -0
  206. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -0
  207. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js +29 -0
  208. package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js.map +1 -0
  209. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js +37 -0
  210. package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js.map +1 -0
  211. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
  212. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  213. package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
  214. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
  215. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  216. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
  217. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  218. package/dist/collection/constants.js +14 -0
  219. package/dist/collection/constants.js.map +1 -1
  220. package/dist/collection/index.js.map +1 -1
  221. package/dist/collection/interface.js.map +1 -1
  222. package/dist/collection/utils/theme/generateBorderRadii.js +28 -7
  223. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  224. package/dist/collection/utils/theme/generatePalette.js +30 -18
  225. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  226. package/dist/collection/utils/theme/utils.js +8 -0
  227. package/dist/collection/utils/theme/utils.js.map +1 -1
  228. package/dist/esm/capsule.js +11 -11
  229. package/dist/esm/capsule.js.map +1 -1
  230. package/dist/esm/constants-fce138fa.js +23 -0
  231. package/dist/esm/constants-fce138fa.js.map +1 -0
  232. package/dist/esm/{cpsl-alert_18.entry.js → cpsl-alert_33.entry.js} +1122 -233
  233. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  234. package/dist/esm/cpsl-animation.entry.js +1 -1
  235. package/dist/esm/cpsl-col.entry.js +2 -2
  236. package/dist/esm/cpsl-grid.entry.js +3 -3
  237. package/dist/esm/cpsl-info-box.entry.js +3 -3
  238. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  239. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  240. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  241. package/dist/esm/cpsl-row.entry.js +2 -2
  242. package/dist/esm/index-97ed6ec1.js +1383 -0
  243. package/dist/esm/index-97ed6ec1.js.map +1 -0
  244. package/dist/esm/index.js +65 -24
  245. package/dist/esm/index.js.map +1 -1
  246. package/dist/esm/loader.js +3 -3
  247. package/dist/loader/cdn.js +1 -3
  248. package/dist/loader/index.cjs.js +1 -3
  249. package/dist/loader/index.es2017.js +1 -3
  250. package/dist/loader/index.js +1 -3
  251. package/dist/types/assets/icons/index.d.ts +12 -2
  252. package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +2 -2
  253. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +6 -0
  254. package/dist/types/components/cpsl-avatar/cpsl-avatar.d.ts +6 -0
  255. package/dist/types/components/cpsl-button/cpsl-button.d.ts +6 -1
  256. package/dist/types/components/cpsl-button-group/cpsl-button-group.d.ts +9 -0
  257. package/dist/types/components/cpsl-card/cpsl-card.d.ts +3 -0
  258. package/dist/types/components/cpsl-checkbox/cpsl-checkbox.d.ts +7 -0
  259. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +18 -0
  260. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  261. package/dist/types/components/cpsl-input/cpsl-input.d.ts +5 -1
  262. package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +1 -0
  263. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  264. package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +9 -0
  265. package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -1
  266. package/dist/types/components/cpsl-pagination/cpsl-pagination.d.ts +14 -0
  267. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +33 -0
  268. package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +7 -0
  269. package/dist/types/components/cpsl-select/cpsl-select.d.ts +35 -0
  270. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  271. package/dist/types/components/cpsl-switch/cpsl-switch.d.ts +7 -0
  272. package/dist/types/components/cpsl-table/cpsl-table.d.ts +6 -0
  273. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  274. package/dist/types/components.d.ts +993 -12
  275. package/dist/types/constants.d.ts +14 -0
  276. package/dist/types/index.d.ts +1 -1
  277. package/dist/types/interface.d.ts +79 -0
  278. package/dist/types/stencil-public-runtime.d.ts +3 -8
  279. package/dist/types/utils/theme/utils.d.ts +1 -0
  280. package/package.json +3 -3
  281. package/dist/capsule/p-6b02ea8d.entry.js +0 -2
  282. package/dist/capsule/p-92b0d902.entry.js +0 -29
  283. package/dist/capsule/p-92b0d902.entry.js.map +0 -1
  284. package/dist/capsule/p-b2997f3c.js +0 -3
  285. package/dist/capsule/p-b2997f3c.js.map +0 -1
  286. package/dist/capsule/p-c2bf050b.js +0 -2
  287. package/dist/capsule/p-c2bf050b.js.map +0 -1
  288. package/dist/capsule/p-fa4e3c14.entry.js +0 -2
  289. package/dist/cjs/constants-4bb85cc5.js +0 -12
  290. package/dist/cjs/constants-4bb85cc5.js.map +0 -1
  291. package/dist/cjs/cpsl-alert_18.cjs.entry.js.map +0 -1
  292. package/dist/cjs/index-87ba56f9.js +0 -2017
  293. package/dist/cjs/index-87ba56f9.js.map +0 -1
  294. package/dist/collection/assets/icons/farcaster-brand.svg +0 -10
  295. package/dist/collection/assets/icons/farcaster.svg +0 -10
  296. package/dist/esm/constants-7b49abd5.js +0 -9
  297. package/dist/esm/constants-7b49abd5.js.map +0 -1
  298. package/dist/esm/cpsl-alert_18.entry.js.map +0 -1
  299. package/dist/esm/index-fd970ca2.js +0 -1987
  300. package/dist/esm/index-fd970ca2.js.map +0 -1
  301. package/dist/esm/polyfills/core-js.js +0 -11
  302. package/dist/esm/polyfills/dom.js +0 -79
  303. package/dist/esm/polyfills/es5-html-element.js +0 -1
  304. package/dist/esm/polyfills/index.js +0 -34
  305. package/dist/esm/polyfills/system.js +0 -6
  306. /package/dist/types/Users/{vinay → taylorbosch}/Documents/GitHub/Capsule/component-library/core/.stencil/scripts/buildIconLibrary.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-modal.js","sourceRoot":"","sources":["../../../../src/components/cpsl-modal/cpsl-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI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E,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,IAAI,EAAC,uBAAuB;oBACjI,YAAM,IAAI,EAAC,sBAAsB,GAAQ,CACrC,CACF;YACN,WAAK,EAAE,EAAC,cAAc,EAAC,IAAI,EAAC,cAAc;gBACxC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB;YACN,WAAK,EAAE,EAAC,uBAAuB,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,IAAI,EAAC,uBAAuB;gBAC3G,YAAM,IAAI,EAAC,sBAAsB,GAAQ,CACrC,CACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,EAAC,IAAI,QAAE,IAAI,CAAC,KAAK,CAAQ,CAAC;QACnC,CAAC;QAED,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,wBAAwB,EAAE,IAAI,EAAE;YAC7C,oBAAc,EAAE,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GAAI;YAC1J,WAAK,EAAE,EAAC,eAAe,EAAC,KAAK,EAAC,eAAe,IAC1C,IAAI,CAAC,KAAK,CACP,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport gsap from 'gsap';\nimport Draggable from 'gsap/Draggable';\nimport { MOBILE_SIZE } from '../../constants';\n\ngsap.registerPlugin(Draggable);\nconst mm = gsap.matchMedia();\n@Component({\n tag: 'cpsl-modal',\n styleUrl: 'cpsl-modal.scss',\n shadow: true,\n})\nexport class CpslModal {\n private draggable: Draggable;\n private expandFooterTl: gsap.core.Timeline;\n private hasAnimatedIn: boolean;\n\n @Element() el!: HTMLCpslModalElement;\n\n @State() hasFooter: boolean;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show `footerExpandedFooter` and `footerExpandedHeader` slots.\n */\n @Prop() footerExpanded?: boolean;\n\n /**\n * Duration in seconds of the footer expansion animation.\n * Default is 0.15.\n */\n @Prop() footerTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalRequestClose!: EventEmitter<null>;\n\n @Watch('footerExpanded')\n toggleHeight() {\n this.footerExpanded ? this.expandFooterTl.play() : this.expandFooterTl.reverse();\n }\n\n @Watch('open')\n toggleModal() {\n if (this.hasAnimatedIn) {\n this.handleAnimation();\n }\n }\n\n componentDidLoad() {\n this.handleAnimation();\n this.hasAnimatedIn = true;\n\n mm.add(`(min-width: ${MOBILE_SIZE + 1}px)`, () => {\n this.draggable?.disable();\n gsap.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });\n });\n mm.add(`(max-width: ${MOBILE_SIZE}px)`, () => {\n this.initDraggable();\n gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });\n });\n\n this.footerSlotEl.addEventListener('slotchange', () => {\n if (this.footerSlotEl.assignedNodes().length >= 1) {\n this.hasFooter = true;\n } else {\n this.hasFooter = false;\n }\n });\n }\n\n private handleAnimation() {\n if (this.open) {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.addExpandAnim();\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', yPercent: 0 })\n .to(this.modalWrapperEl, {\n scale: 1,\n opacity: 1,\n duration: this.enterTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.addExpandAnim();\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', scale: 1, opacity: 1 })\n .to(this.modalWrapperEl, {\n yPercent: -100,\n duration: this.enterTransitionDuration,\n });\n }\n } else {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n scale: 0.8,\n opacity: 0,\n duration: this.exitTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n yPercent: 0,\n duration: this.exitTransitionDuration,\n })\n .set(this.modalContainerEl, { y: 0 });\n }\n }\n }\n\n private addExpandAnim() {\n setTimeout(() => {\n this.expandFooterTl = gsap\n .timeline({\n reversed: true,\n paused: true,\n onReverseComplete: () => {\n this.contentEl.style.setProperty('height', 'auto');\n },\n defaults: {\n duration: this.footerTransitionDuration,\n },\n })\n .set(this.footerExpandedEl, { overflow: 'auto', display: 'block' })\n .set(this.headerExpandedEl, { display: 'block' })\n .to(this.innerContainerEl, { paddingBottom: '8px' })\n .to(this.contentEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')\n .to(this.footerEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')\n .to(this.footerExpandedEl, { height: 'auto', opacity: 1 }, '<')\n .to(this.headerExpandedEl, { height: 'auto', opacity: 1 }, '<');\n }, 10);\n }\n\n private getDraggableHeight = () => {\n return this.innerContainerEl.clientHeight;\n };\n\n private initDraggable() {\n this.draggable = Draggable.create(this.modalContainerEl, {\n trigger: this.headerEl,\n dragClickables: false,\n type: 'y',\n edgeResistance: 0.2,\n liveSnap: {\n y: function (y) {\n if (y < 0) return 0; // Restricts dragging to down\n return y;\n },\n },\n onDrag: () => {\n const y = gsap.utils.mapRange(0, this.getDraggableHeight(), 1, 0, this.draggable.y);\n gsap.set(this.overlayEl, { opacity: y });\n },\n onDragEnd: () => {\n if (this.draggable.y > 60) {\n this.cpslModalRequestClose.emit();\n } else {\n gsap.set(this.overlayEl, { opacity: 1 });\n gsap.set(this.modalWrapperEl, { yPercent: -100 });\n gsap.set(this.modalContainerEl, { y: 0 });\n }\n },\n })[0];\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('modal-footer');\n }\n\n private get footerExpandedEl() {\n return this.el.shadowRoot.getElementById('modal-footer-expanded');\n }\n\n private get headerExpandedEl() {\n return this.el.shadowRoot.getElementById('modal-header-expanded');\n }\n\n private get innerContainerEl() {\n return this.el.shadowRoot.getElementById('modal-inner-container');\n }\n\n private get contentEl() {\n return this.el.shadowRoot.getElementById('modal-content');\n }\n\n private get modalWrapperEl() {\n return this.el.shadowRoot.getElementById('modal-wrapper');\n }\n\n private get modalContainerEl() {\n return this.el.shadowRoot.getElementById('modal-container');\n }\n\n private get overlayEl() {\n return this.el.shadowRoot.getElementById('overlay');\n }\n\n private get footerSlotEl() {\n return this.footerEl.querySelectorAll('slot')[0];\n }\n\n private get headerEl() {\n return this.el.shadowRoot.getElementById('modal-header');\n }\n\n private get Modal() {\n return (\n <div class={{ 'modal-container': true, 'no-footer': !this.hasFooter }} part=\"modal-container\" id=\"modal-container\">\n <slot></slot>\n <div id=\"modal-inner-container\" class={{ 'modal-inner-container': true, 'no-footer': !this.hasFooter }} part=\"modal-inner-container\">\n <div id=\"modal-content\" part=\"modal-content\">\n <div id=\"modal-header\" class=\"modal-header\" part=\"modal-header\">\n <slot name=\"header\"></slot>\n </div>\n <div id=\"modal-body\" class=\"modal-body\" part=\"modal-body\">\n <slot name=\"body\"></slot>\n </div>\n </div>\n <div id=\"modal-header-expanded\" class={{ 'modal-header': true, 'expanded': true, 'no-opacity': true }} part=\"modal-header-expanded\">\n <slot name=\"footerExpandedHeader\"></slot>\n </div>\n </div>\n <div id=\"modal-footer\" part=\"modal-footer\">\n <slot name=\"footer\"></slot>\n </div>\n <div id=\"modal-footer-expanded\" class={{ 'expanded': true, 'no-opacity': true }} part=\"modal-footer-expanded\">\n <slot name=\"footerExpandedFooter\"></slot>\n </div>\n </div>\n );\n }\n\n render() {\n if (this.noOverlay) {\n return <Host>{this.Modal}</Host>;\n }\n\n return (\n <Host class={{ 'include-mobile-styling': true }}>\n <cpsl-overlay id=\"overlay\" open={this.open} enterTransitionDuration={this.enterTransitionDuration} exitTransitionDuration={this.exitTransitionDuration} />\n <div id=\"modal-wrapper\" class=\"modal-wrapper\">\n {this.Modal}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-modal.js","sourceRoot":"","sources":["../../../../src/components/cpsl-modal/cpsl-modal.tsx"],"names":[],"mappings":"AAAA,OAAO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E,EAAE,EAAC,SAAS,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EACrD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD;YACF,WAAK,EAAE,EAAC,eAAe,EAAC,KAAK,EAAC,eAAe,IAC1C,IAAI,CAAC,KAAK,CACP,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport gsap from 'gsap';\nimport Draggable from 'gsap/Draggable';\nimport { MOBILE_SIZE } from '../../constants';\n\ngsap.registerPlugin(Draggable);\nconst mm = gsap.matchMedia();\n@Component({\n tag: 'cpsl-modal',\n styleUrl: 'cpsl-modal.scss',\n shadow: true,\n})\nexport class CpslModal {\n private draggable: Draggable;\n private expandFooterTl: gsap.core.Timeline;\n private hasAnimatedIn: boolean;\n\n @Element() el!: HTMLCpslModalElement;\n\n @State() hasFooter: boolean;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show `footerExpandedFooter` and `footerExpandedHeader` slots.\n */\n @Prop() footerExpanded?: boolean;\n\n /**\n * Duration in seconds of the footer expansion animation.\n * Default is 0.15.\n */\n @Prop() footerTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalRequestClose!: EventEmitter<null>;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('footerExpanded')\n toggleHeight() {\n this.footerExpanded ? this.expandFooterTl.play() : this.expandFooterTl.reverse();\n }\n\n @Watch('open')\n toggleModal() {\n if (this.hasAnimatedIn) {\n this.handleAnimation();\n }\n }\n\n componentDidLoad() {\n this.handleAnimation();\n this.hasAnimatedIn = true;\n\n mm.add(`(min-width: ${MOBILE_SIZE + 1}px)`, () => {\n this.draggable?.disable();\n gsap.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });\n });\n mm.add(`(max-width: ${MOBILE_SIZE}px)`, () => {\n this.initDraggable();\n gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });\n });\n\n this.hasFooter = this.footerSlotEl.assignedNodes().length >= 1;\n this.footerSlotEl.addEventListener('slotchange', () => {\n if (this.footerSlotEl.assignedNodes().length >= 1) {\n this.hasFooter = true;\n } else {\n this.hasFooter = false;\n }\n });\n }\n\n private handleAnimation() {\n if (this.open) {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.addExpandAnim();\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', yPercent: 0 })\n .to(this.modalWrapperEl, {\n scale: 1,\n opacity: 1,\n duration: this.enterTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.addExpandAnim();\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', scale: 1, opacity: 1 })\n .to(this.modalWrapperEl, {\n yPercent: -100,\n duration: this.enterTransitionDuration,\n });\n }\n } else {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n scale: 0.8,\n opacity: 0,\n duration: this.exitTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n yPercent: 0,\n duration: this.exitTransitionDuration,\n })\n .set(this.modalContainerEl, { y: 0 });\n }\n }\n }\n\n private addExpandAnim() {\n setTimeout(() => {\n this.expandFooterTl = gsap\n .timeline({\n reversed: true,\n paused: true,\n onReverseComplete: () => {\n this.contentEl.style.setProperty('height', 'auto');\n },\n defaults: {\n duration: this.footerTransitionDuration,\n },\n })\n .set(this.footerExpandedEl, { overflow: 'auto', display: 'block' })\n .set(this.headerExpandedEl, { display: 'block' })\n .to(this.innerContainerEl, { paddingBottom: '8px' })\n .to(this.contentEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')\n .to(this.footerEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')\n .to(this.footerExpandedEl, { height: 'auto', opacity: 1 }, '<')\n .to(this.headerExpandedEl, { height: 'auto', opacity: 1 }, '<');\n }, 10);\n }\n\n private getDraggableHeight = () => {\n return this.innerContainerEl.clientHeight;\n };\n\n private initDraggable() {\n this.draggable = Draggable.create(this.modalContainerEl, {\n trigger: this.headerEl,\n dragClickables: false,\n type: 'y',\n edgeResistance: 0.2,\n liveSnap: {\n y: function (y) {\n if (y < 0) return 0; // Restricts dragging to down\n return y;\n },\n },\n onDrag: () => {\n const y = gsap.utils.mapRange(0, this.getDraggableHeight(), 1, 0, this.draggable.y);\n gsap.set(this.overlayEl, { opacity: y });\n },\n onDragEnd: () => {\n if (this.draggable.y > 60) {\n this.cpslModalRequestClose.emit();\n } else {\n gsap.set(this.overlayEl, { opacity: 1 });\n gsap.set(this.modalWrapperEl, { yPercent: -100 });\n gsap.set(this.modalContainerEl, { y: 0 });\n }\n },\n })[0];\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('modal-footer');\n }\n\n private get footerExpandedEl() {\n return this.el.shadowRoot.getElementById('modal-footer-expanded');\n }\n\n private get headerExpandedEl() {\n return this.el.shadowRoot.getElementById('modal-header-expanded');\n }\n\n private get innerContainerEl() {\n return this.el.shadowRoot.getElementById('modal-inner-container');\n }\n\n private get contentEl() {\n return this.el.shadowRoot.getElementById('modal-content');\n }\n\n private get modalWrapperEl() {\n return this.el.shadowRoot.getElementById('modal-wrapper');\n }\n\n private get modalContainerEl() {\n return this.el.shadowRoot.getElementById('modal-container');\n }\n\n private get overlayEl() {\n return this.el.shadowRoot.getElementById('overlay');\n }\n\n private get footerSlotEl() {\n return this.footerEl.querySelectorAll('slot')[0];\n }\n\n private get headerEl() {\n return this.el.shadowRoot.getElementById('modal-header');\n }\n\n private get Modal() {\n return (\n <div class={{ 'modal-container': true, 'no-footer': !this.hasFooter }} part=\"modal-container\" id=\"modal-container\">\n <slot></slot>\n <div id=\"modal-inner-container\" class={{ 'modal-inner-container': true, 'no-footer': !this.hasFooter }} part=\"modal-inner-container\">\n <div id=\"modal-content\" part=\"modal-content\">\n <div id=\"modal-header\" class=\"modal-header\" part=\"modal-header\">\n <slot name=\"header\"></slot>\n </div>\n <div id=\"modal-body\" class=\"modal-body\" part=\"modal-body\">\n <slot name=\"body\"></slot>\n </div>\n </div>\n <div id=\"modal-header-expanded\" class={{ 'modal-header': true, 'expanded': true, 'no-opacity': true }} part=\"modal-header-expanded\">\n <slot name=\"footerExpandedHeader\"></slot>\n </div>\n </div>\n <div id=\"modal-footer\" part=\"modal-footer\">\n <slot name=\"footer\"></slot>\n </div>\n <div id=\"modal-footer-expanded\" class={{ 'expanded': true, 'no-opacity': true }} part=\"modal-footer-expanded\">\n <slot name=\"footerExpandedFooter\"></slot>\n </div>\n </div>\n );\n }\n\n render() {\n if (this.noOverlay) {\n return (\n <Host style={Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}} class=\"no-overlay\">\n {this.Modal}\n </Host>\n );\n }\n\n return (\n <Host style={Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}} class={{ 'include-mobile-styling': true }}>\n <cpsl-overlay\n zIndexOverride={Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n <div id=\"modal-wrapper\" class=\"modal-wrapper\">\n {this.Modal}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Convert a font size to a dynamic font size.
3
+ * Fonts that participate in Dynamic Type should use
4
+ * dynamic font sizes.
5
+ * @param size - The initial font size including the unit (i.e. px or pt)
6
+ * @param unit (optional) - The unit to convert to. Use this if you want to
7
+ * convert to a unit other than $baselineUnit.
8
+ */
9
+ /**
10
+ * Convert a font size to a dynamic font size but impose
11
+ * a maximum font size.
12
+ * @param size - The initial font size including the unit (i.e. px or pt)
13
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
14
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
15
+ * convert to a unit other than $baselineUnit.
16
+ */
17
+ /**
18
+ * Convert a font size to a dynamic font size but impose
19
+ * a minimum font size.
20
+ * @param size - The initial font size including the unit (i.e. px or pt)
21
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
22
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
23
+ * convert to a unit other than $baselineUnit.
24
+ */
25
+ /**
26
+ * Convert a font size to a dynamic font size but impose
27
+ * maximum and minimum font sizes.
28
+ * @param size - The initial font size including the unit (i.e. px or pt)
29
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
30
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
31
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
32
+ * convert to a unit other than $baselineUnit.
33
+ */
34
+ /**
35
+ * A heuristic that applies CSS to tablet
36
+ * viewports.
37
+ *
38
+ * Usage:
39
+ * @include tablet-viewport() {
40
+ * :host {
41
+ * background-color: green;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * A heuristic that applies CSS to mobile
47
+ * viewports (i.e. phones, not tablets).
48
+ *
49
+ * Usage:
50
+ * @include mobile-viewport() {
51
+ * :host {
52
+ * background-color: blue;
53
+ * }
54
+ * }
55
+ */
56
+ :host {
57
+ display: none;
58
+ position: absolute;
59
+ top: 0;
60
+ left: 0;
61
+ width: 100vw;
62
+ height: 100vh;
63
+ justify-content: center;
64
+ align-items: center;
65
+ z-index: 10005;
66
+ }
67
+ :host .card {
68
+ z-index: 10005;
69
+ opacity: 0;
70
+ position: relative;
71
+ transition: all;
72
+ }
73
+
74
+ :host(.no-overlay) {
75
+ position: relative;
76
+ top: unset;
77
+ left: unset;
78
+ width: 100%;
79
+ height: auto;
80
+ }
81
+
82
+ :host(.open) .card {
83
+ opacity: 1;
84
+ }
85
+
86
+ :host(.elevated) .card {
87
+ --card-border-width: 0px;
88
+ }
89
+ :host(.elevated) .card::part(card-container) {
90
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.12);
91
+ }
@@ -0,0 +1,224 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CpslModalV2 {
3
+ constructor() {
4
+ this.enterTransitionDuration = 0.15;
5
+ this.exitTransitionDuration = 0.15;
6
+ this.elevated = undefined;
7
+ this.noOverlay = undefined;
8
+ this.open = undefined;
9
+ this.zIndexOverride = undefined;
10
+ }
11
+ toggleHeight() {
12
+ if (!this.open) {
13
+ this.cpslModalExiting.emit();
14
+ setTimeout(() => {
15
+ this.el.style.display = 'none';
16
+ this.cpslModalExited.emit();
17
+ }, this.exitTransitionDuration * 1000);
18
+ }
19
+ else {
20
+ this.cpslModalEntering.emit();
21
+ this.el.style.display = 'flex';
22
+ setTimeout(() => {
23
+ this.cpslModalEntered.emit();
24
+ }, this.enterTransitionDuration * 1000);
25
+ }
26
+ }
27
+ componentDidLoad() {
28
+ this.toggleHeight();
29
+ }
30
+ render() {
31
+ return (h(Host, { key: '916ab0ce5ec3ce2a33103e67773b5420dd44241d', class: { 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay } }, !this.noOverlay && (h("cpsl-overlay", { key: 'de5a3d5d1784fb4b2e07530ba0edcecc4c4c0e04', zIndexOverride: Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration })), h("cpsl-card", { key: '8cbdc7a258583092b89c52e1167fb4094a4cc5b3', class: "card", style: { transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` } }, h("slot", { key: '5382dc704ac6fdb1f159139bac1bddd544749b32' }))));
32
+ }
33
+ static get is() { return "cpsl-modal-v2"; }
34
+ static get encapsulation() { return "shadow"; }
35
+ static get originalStyleUrls() {
36
+ return {
37
+ "$": ["cpsl-modal-v2.scss"]
38
+ };
39
+ }
40
+ static get styleUrls() {
41
+ return {
42
+ "$": ["cpsl-modal-v2.css"]
43
+ };
44
+ }
45
+ static get properties() {
46
+ return {
47
+ "enterTransitionDuration": {
48
+ "type": "number",
49
+ "mutable": false,
50
+ "complexType": {
51
+ "original": "number",
52
+ "resolved": "number",
53
+ "references": {}
54
+ },
55
+ "required": false,
56
+ "optional": true,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": "Duration in seconds of the modal entering.\nDefault is .15."
60
+ },
61
+ "attribute": "enter-transition-duration",
62
+ "reflect": false,
63
+ "defaultValue": "0.15"
64
+ },
65
+ "exitTransitionDuration": {
66
+ "type": "number",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "number",
70
+ "resolved": "number",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": true,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "Duration in seconds of the modal exiting.\nDefault is .15."
78
+ },
79
+ "attribute": "exit-transition-duration",
80
+ "reflect": false,
81
+ "defaultValue": "0.15"
82
+ },
83
+ "elevated": {
84
+ "type": "boolean",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "boolean",
88
+ "resolved": "boolean",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Whether or not to show the modal with a box shadow."
96
+ },
97
+ "attribute": "elevated",
98
+ "reflect": false
99
+ },
100
+ "noOverlay": {
101
+ "type": "boolean",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "boolean",
105
+ "resolved": "boolean",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "Whether or not to show the overlay."
113
+ },
114
+ "attribute": "no-overlay",
115
+ "reflect": false
116
+ },
117
+ "open": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Whether or not to show the modal."
130
+ },
131
+ "attribute": "open",
132
+ "reflect": false
133
+ },
134
+ "zIndexOverride": {
135
+ "type": "number",
136
+ "mutable": false,
137
+ "complexType": {
138
+ "original": "number",
139
+ "resolved": "number",
140
+ "references": {}
141
+ },
142
+ "required": false,
143
+ "optional": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": "Override z-index."
147
+ },
148
+ "attribute": "z-index-override",
149
+ "reflect": false
150
+ }
151
+ };
152
+ }
153
+ static get events() {
154
+ return [{
155
+ "method": "cpslModalEntering",
156
+ "name": "cpslModalEntering",
157
+ "bubbles": true,
158
+ "cancelable": true,
159
+ "composed": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "Emitted when enter animation starts."
163
+ },
164
+ "complexType": {
165
+ "original": "null",
166
+ "resolved": "null",
167
+ "references": {}
168
+ }
169
+ }, {
170
+ "method": "cpslModalEntered",
171
+ "name": "cpslModalEntered",
172
+ "bubbles": true,
173
+ "cancelable": true,
174
+ "composed": true,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": "Emitted when enter animation finishes."
178
+ },
179
+ "complexType": {
180
+ "original": "null",
181
+ "resolved": "null",
182
+ "references": {}
183
+ }
184
+ }, {
185
+ "method": "cpslModalExiting",
186
+ "name": "cpslModalExiting",
187
+ "bubbles": true,
188
+ "cancelable": true,
189
+ "composed": true,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": "Emitted when exit animation starts."
193
+ },
194
+ "complexType": {
195
+ "original": "null",
196
+ "resolved": "null",
197
+ "references": {}
198
+ }
199
+ }, {
200
+ "method": "cpslModalExited",
201
+ "name": "cpslModalExited",
202
+ "bubbles": true,
203
+ "cancelable": true,
204
+ "composed": true,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Emitted when exit animation finishes."
208
+ },
209
+ "complexType": {
210
+ "original": "null",
211
+ "resolved": "null",
212
+ "references": {}
213
+ }
214
+ }];
215
+ }
216
+ static get elementRef() { return "el"; }
217
+ static get watchers() {
218
+ return [{
219
+ "propName": "open",
220
+ "methodName": "toggleHeight"
221
+ }];
222
+ }
223
+ }
224
+ //# s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CAClB,qEACE,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC9E,EAAE,EAAC,SAAS,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EACrD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH;YACD,kEAAW,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,GAAG,EAAE;gBACvI,8DAAa,CACH,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Watch, Element, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-modal-v2',\n styleUrl: 'cpsl-modal-v2.scss',\n shadow: true,\n})\nexport class CpslModalV2 {\n @Element() el!: HTMLCpslModalV2Element;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the modal with a box shadow.\n */\n @Prop() elevated: boolean;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() noOverlay: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n @Watch('open')\n toggleHeight() {\n if (!this.open) {\n this.cpslModalExiting.emit();\n // Animate out before setting display to none\n setTimeout(() => {\n this.el.style.display = 'none';\n this.cpslModalExited.emit();\n }, this.exitTransitionDuration * 1000);\n } else {\n this.cpslModalEntering.emit();\n this.el.style.display = 'flex';\n setTimeout(() => {\n this.cpslModalEntered.emit();\n }, this.enterTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n this.toggleHeight();\n }\n\n render() {\n return (\n <Host class={{ 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay }}>\n {!this.noOverlay && (\n <cpsl-overlay\n zIndexOverride={Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n )}\n <cpsl-card class=\"card\" style={{ transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` }}>\n <slot></slot>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,29 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try {
5
+ step(generator.next(value));
6
+ }
7
+ catch (e) {
8
+ reject(e);
9
+ } }
10
+ function rejected(value) { try {
11
+ step(generator["throw"](value));
12
+ }
13
+ catch (e) {
14
+ reject(e);
15
+ } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ import { newE2EPage } from "@stencil/core/testing";
21
+ describe('cpsl-modal-v2', () => {
22
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const page = yield newE2EPage();
24
+ yield page.setContent('<cpsl-modal-v2></cpsl-modal-v2>');
25
+ const element = yield page.find('cpsl-modal-v2');
26
+ expect(element).toHaveClass('hydrated');
27
+ }));
28
+ });
29
+ //# sourceMappingURL=cpsl-modal-v2.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v2.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cpsl-modal-v2', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-modal-v2></cpsl-modal-v2>');\n\n const element = await page.find('cpsl-modal-v2');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
@@ -0,0 +1,37 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try {
5
+ step(generator.next(value));
6
+ }
7
+ catch (e) {
8
+ reject(e);
9
+ } }
10
+ function rejected(value) { try {
11
+ step(generator["throw"](value));
12
+ }
13
+ catch (e) {
14
+ reject(e);
15
+ } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ import { newSpecPage } from "@stencil/core/testing";
21
+ import { CpslModalV2 } from "../cpsl-modal-v2";
22
+ describe('cpsl-modal-v2', () => {
23
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
24
+ const page = yield newSpecPage({
25
+ components: [CpslModalV2],
26
+ html: `<cpsl-modal-v2></cpsl-modal-v2>`,
27
+ });
28
+ expect(page.root).toEqualHtml(`
29
+ <cpsl-modal-v2>
30
+ <mock:shadow-root>
31
+ <slot></slot>
32
+ </mock:shadow-root>
33
+ </cpsl-modal-v2>
34
+ `);
35
+ }));
36
+ });
37
+ //# sourceMappingURL=cpsl-modal-v2.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v2.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,IAAI,EAAE,iCAAiC;SACxC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CpslModalV2 } from '../cpsl-modal-v2';\n\ndescribe('cpsl-modal-v2', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslModalV2],\n html: `<cpsl-modal-v2></cpsl-modal-v2>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-modal-v2>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-modal-v2>\n `);\n });\n});\n"]}
@@ -0,0 +1,50 @@
1
+ :host {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 8px;
5
+ padding: 0px 16px;
6
+ box-sizing: border-box;
7
+ width: 100%;
8
+ }
9
+
10
+ :host ::slotted(cpsl-button) {
11
+ --button-padding-start: 8px;
12
+ --button-padding-end: 8px;
13
+ --button-padding-top: 8px;
14
+ --button-padding-bottom: 8px;
15
+ --button-justify-content: start;
16
+ --button-primary-color: var(--cpsl-color-background-48);
17
+ --button-primary-background-color: var(--cpsl-color-background-0);
18
+ --button-primary-border-color: var(--cpsl-color-background-0);
19
+ --button-primary-icon-color: var(--cpsl-color-background-48);
20
+ --button-primary-disabled-color: var(--cpsl-color-background-48);
21
+ --button-primary-disabled-background-color: var(--cpsl-color-background-0);
22
+ --button-primary-disabled-border-color: var(--cpsl-color-background-0);
23
+ --button-primary-disabled-icon-color: var(--cpsl-color-background-48);
24
+ --button-primary-hover-color: var(--cpsl-color-background-48);
25
+ --button-primary-hover-background-color: var(--cpsl-color-background-4);
26
+ --button-primary-hover-border-color: var(--cpsl-color-background-4);
27
+ --button-primary-hover-icon-color: var(--cpsl-color-background-48);
28
+ --button-primary-active-color: var(--cpsl-color-background-48);
29
+ --button-primary-active-background-color: var(--cpsl-color-background-4);
30
+ --button-primary-active-border-color: var(--cpsl-color-background-4);
31
+ --button-primary-active-icon-color: var(--cpsl-color-background-48);
32
+ }
33
+ :host ::slotted(cpsl-button.selected) {
34
+ --button-primary-color: var(--cpsl-color-text-primary);
35
+ --button-primary-background-color: var(--cpsl-color-background-4);
36
+ --button-primary-border-color: var(--cpsl-color-background-4);
37
+ --button-primary-icon-color: var(--cpsl-color-text-primary);
38
+ --button-primary-disabled-color: var(--cpsl-color-text-primary);
39
+ --button-primary-disabled-background-color: var(--cpsl-color-background-4);
40
+ --button-primary-disabled-border-color: var(--cpsl-color-background-4);
41
+ --button-primary-disabled-icon-color: var(--cpsl-color-text-primary);
42
+ --button-primary-hover-color: var(--cpsl-color-text-primary);
43
+ --button-primary-hover-background-color: var(--cpsl-color-background-4);
44
+ --button-primary-hover-border-color: var(--cpsl-color-background-4);
45
+ --button-primary-hover-icon-color: var(--cpsl-color-text-primary);
46
+ --button-primary-active-color: var(--cpsl-color-text-primary);
47
+ --button-primary-active-background-color: var(--cpsl-color-background-4);
48
+ --button-primary-active-border-color: var(--cpsl-color-background-4);
49
+ --button-primary-active-icon-color: var(--cpsl-color-text-primary);
50
+ }
@@ -0,0 +1,78 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CpslNavButtonGroup {
3
+ constructor() {
4
+ this.selectedId = undefined;
5
+ }
6
+ selectItem() {
7
+ this.buttonSlots.forEach(item => {
8
+ if (item.id === this.selectedId) {
9
+ item.classList.add('selected');
10
+ }
11
+ else {
12
+ item.classList.remove('selected');
13
+ }
14
+ });
15
+ }
16
+ componentWillRender() {
17
+ var _a;
18
+ this.buttonSlots.forEach(item => {
19
+ item.setAttribute('variant', 'primary');
20
+ item.setAttribute('full-width', 'true');
21
+ this.selectItem();
22
+ });
23
+ if (Boolean((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length)) {
24
+ console.error('cpsl-button is the only valid child of cpsl-nav-button-group');
25
+ this.otherSlots.forEach(item => item.remove());
26
+ }
27
+ }
28
+ get buttonSlots() {
29
+ return this.el.querySelectorAll('cpsl-button');
30
+ }
31
+ get otherSlots() {
32
+ return this.el.querySelectorAll('&> *:not(cpsl-button)');
33
+ }
34
+ render() {
35
+ return (h(Host, { key: 'e677688e630bcbfa89cd8cff36fd84a4bdc1a627' }, h("slot", { key: 'd0c04a917b6818e7b40cdae32fe19e158da2f38d' })));
36
+ }
37
+ static get is() { return "cpsl-nav-button-group"; }
38
+ static get encapsulation() { return "shadow"; }
39
+ static get originalStyleUrls() {
40
+ return {
41
+ "$": ["cpsl-nav-button-group.scss"]
42
+ };
43
+ }
44
+ static get styleUrls() {
45
+ return {
46
+ "$": ["cpsl-nav-button-group.css"]
47
+ };
48
+ }
49
+ static get properties() {
50
+ return {
51
+ "selectedId": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "string",
56
+ "resolved": "string",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": true,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": "The id of the selected button."
64
+ },
65
+ "attribute": "selected-id",
66
+ "reflect": false
67
+ }
68
+ };
69
+ }
70
+ static get elementRef() { return "el"; }
71
+ static get watchers() {
72
+ return [{
73
+ "propName": "selectedId",
74
+ "methodName": "selectItem"
75
+ }];
76
+ }
77
+ }
78
+ //# sourceMappingURL=cpsl-nav-button-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-nav-button-group.js","sourceRoot":"","sources":["../../../../src/components/cpsl-nav-button-group/cpsl-nav-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,kBAAkB;;;;IAS7B,UAAU;QACR,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;;QACjB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACxC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,CAAC,EAAE,CAAC;YACrC,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAC9E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, Prop, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-nav-button-group',\n styleUrl: 'cpsl-nav-button-group.scss',\n shadow: true,\n})\nexport class CpslNavButtonGroup {\n @Element() el!: HTMLCpslNavButtonGroupElement;\n\n /**\n * The id of the selected button.\n */\n @Prop() selectedId?: string;\n\n @Watch('selectedId')\n selectItem() {\n this.buttonSlots.forEach(item => {\n if (item.id === this.selectedId) {\n item.classList.add('selected');\n } else {\n item.classList.remove('selected');\n }\n });\n }\n\n componentWillRender() {\n this.buttonSlots.forEach(item => {\n item.setAttribute('variant', 'primary');\n item.setAttribute('full-width', 'true');\n this.selectItem();\n });\n\n if (Boolean(this.otherSlots?.length)) {\n console.error('cpsl-button is the only valid child of cpsl-nav-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get buttonSlots() {\n return this.el.querySelectorAll('cpsl-button');\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-button)');\n }\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}