@usecapsule/core-components 2.0.2 → 2.0.4-dev.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (406) hide show
  1. package/dist/capsule/capsule.esm.js +1 -52
  2. package/dist/capsule/capsule.esm.js.map +1 -1
  3. package/dist/capsule/index.esm.js +1 -572
  4. package/dist/capsule/index.esm.js.map +1 -1
  5. package/dist/capsule/p-0462f723.js +2 -0
  6. package/dist/capsule/p-0462f723.js.map +1 -0
  7. package/dist/capsule/p-68c73705.entry.js +2 -0
  8. package/dist/capsule/p-68c73705.entry.js.map +1 -0
  9. package/dist/capsule/p-6fb7c4d1.js +3 -0
  10. package/dist/capsule/p-6fb7c4d1.js.map +1 -0
  11. package/dist/capsule/p-91412151.entry.js +2 -0
  12. package/dist/capsule/p-91412151.entry.js.map +1 -0
  13. package/dist/capsule/p-a95ec4df.entry.js +2 -0
  14. package/dist/capsule/p-a95ec4df.entry.js.map +1 -0
  15. package/dist/capsule/p-c2bf050b.js +2 -0
  16. package/dist/capsule/p-c2bf050b.js.map +1 -0
  17. package/dist/capsule/p-cacdef26.entry.js +29 -0
  18. package/dist/capsule/p-cacdef26.entry.js.map +1 -0
  19. package/dist/capsule/p-d7be092d.entry.js +10 -0
  20. package/dist/capsule/p-d7be092d.entry.js.map +1 -0
  21. package/dist/capsule/p-e1255160.js +2 -0
  22. package/dist/capsule/p-e1255160.js.map +1 -0
  23. package/dist/capsule/p-f604b591.entry.js +2 -0
  24. package/dist/capsule/p-f604b591.entry.js.map +1 -0
  25. package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
  26. package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  27. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  28. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  29. package/dist/cjs/capsule.cjs.js +27 -0
  30. package/dist/cjs/capsule.cjs.js.map +1 -0
  31. package/dist/cjs/constants-4bb85cc5.js +12 -0
  32. package/dist/cjs/constants-4bb85cc5.js.map +1 -0
  33. package/dist/cjs/cpsl-alert_17.cjs.entry.js +10737 -0
  34. package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +1 -0
  35. package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
  36. package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
  37. package/dist/cjs/cpsl-col.cjs.entry.js +125 -0
  38. package/dist/cjs/cpsl-col.cjs.entry.js.map +1 -0
  39. package/dist/cjs/cpsl-grid.cjs.entry.js +25 -0
  40. package/dist/cjs/cpsl-grid.cjs.entry.js.map +1 -0
  41. package/dist/cjs/cpsl-info-box.cjs.entry.js +22 -0
  42. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -0
  43. package/dist/cjs/cpsl-row.cjs.entry.js +22 -0
  44. package/dist/cjs/cpsl-row.cjs.entry.js.map +1 -0
  45. package/dist/cjs/index-3fccb5b4.js +2012 -0
  46. package/dist/cjs/index-3fccb5b4.js.map +1 -0
  47. package/dist/cjs/index.cjs.js +342 -0
  48. package/dist/cjs/index.cjs.js.map +1 -0
  49. package/dist/cjs/loader.cjs.js +17 -0
  50. package/dist/cjs/loader.cjs.js.map +1 -0
  51. package/dist/collection/assets/icons/alert-circle.svg +3 -0
  52. package/dist/collection/assets/icons/angel-list-brand.svg +3 -0
  53. package/dist/collection/assets/icons/angel-list.svg +3 -0
  54. package/dist/collection/assets/icons/apple-brand.svg +3 -0
  55. package/dist/collection/assets/icons/apple.svg +3 -0
  56. package/dist/collection/assets/icons/arrow-narrow.svg +3 -0
  57. package/dist/collection/assets/icons/arrow.svg +3 -0
  58. package/dist/collection/assets/icons/backup-kit.svg +4 -0
  59. package/dist/collection/assets/icons/capsule-logo.svg +18 -0
  60. package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
  61. package/dist/collection/assets/icons/capsule-rings.svg +34 -0
  62. package/dist/collection/assets/icons/capsule.svg +4 -0
  63. package/dist/collection/assets/icons/check.svg +3 -0
  64. package/dist/collection/assets/icons/clock.svg +3 -0
  65. package/dist/collection/assets/icons/close.svg +4 -0
  66. package/dist/collection/assets/icons/clubhouse-brand.svg +4 -0
  67. package/dist/collection/assets/icons/clubhouse.svg +4 -0
  68. package/dist/collection/assets/icons/copy.svg +3 -0
  69. package/dist/collection/assets/icons/decent-brand.svg +3 -0
  70. package/dist/collection/assets/icons/decent.svg +3 -0
  71. package/dist/collection/assets/icons/discord-brand.svg +4 -0
  72. package/dist/collection/assets/icons/discord.svg +4 -0
  73. package/dist/collection/assets/icons/download-cloud.svg +3 -0
  74. package/dist/collection/assets/icons/dribbble-brand.svg +4 -0
  75. package/dist/collection/assets/icons/dribbble.svg +3 -0
  76. package/dist/collection/assets/icons/eye-off.svg +3 -0
  77. package/dist/collection/assets/icons/eye.svg +4 -0
  78. package/dist/collection/assets/icons/facebook-brand.svg +11 -0
  79. package/dist/collection/assets/icons/facebook.svg +10 -0
  80. package/dist/collection/assets/icons/figma-brand.svg +14 -0
  81. package/dist/collection/assets/icons/figma.svg +3 -0
  82. package/dist/collection/assets/icons/github-brand.svg +10 -0
  83. package/dist/collection/assets/icons/github.svg +10 -0
  84. package/dist/collection/assets/icons/google-brand.svg +13 -0
  85. package/dist/collection/assets/icons/google.svg +10 -0
  86. package/dist/collection/assets/icons/help-circle.svg +3 -0
  87. package/dist/collection/assets/icons/hero-email.svg +12 -0
  88. package/dist/collection/assets/icons/hero-lock.svg +4 -0
  89. package/dist/collection/assets/icons/hero-passkey.svg +12 -0
  90. package/dist/collection/assets/icons/hero-phone.svg +4 -0
  91. package/dist/collection/assets/icons/hero-wallet.svg +5 -0
  92. package/dist/collection/assets/icons/index.js +75 -0
  93. package/dist/collection/assets/icons/index.js.map +1 -0
  94. package/dist/collection/assets/icons/info-circle.svg +3 -0
  95. package/dist/collection/assets/icons/instagram-brand.svg +12 -0
  96. package/dist/collection/assets/icons/instagram.svg +12 -0
  97. package/dist/collection/assets/icons/key.svg +3 -0
  98. package/dist/collection/assets/icons/lightning.svg +3 -0
  99. package/dist/collection/assets/icons/linkedin-brand.svg +10 -0
  100. package/dist/collection/assets/icons/linkedin.svg +10 -0
  101. package/dist/collection/assets/icons/mail.svg +3 -0
  102. package/dist/collection/assets/icons/more-login-options.svg +13 -0
  103. package/dist/collection/assets/icons/phone.svg +3 -0
  104. package/dist/collection/assets/icons/pintrest-brand.svg +11 -0
  105. package/dist/collection/assets/icons/pintrest.svg +10 -0
  106. package/dist/collection/assets/icons/plus-circle.svg +5 -0
  107. package/dist/collection/assets/icons/ramp-network-brand.svg +3 -0
  108. package/dist/collection/assets/icons/ramp-network.svg +3 -0
  109. package/dist/collection/assets/icons/reddit-brand.svg +11 -0
  110. package/dist/collection/assets/icons/reddit.svg +3 -0
  111. package/dist/collection/assets/icons/signal-brand.svg +3 -0
  112. package/dist/collection/assets/icons/signal.svg +3 -0
  113. package/dist/collection/assets/icons/snapchat-brand.svg +4 -0
  114. package/dist/collection/assets/icons/snapchat.svg +3 -0
  115. package/dist/collection/assets/icons/telegram-brand.svg +15 -0
  116. package/dist/collection/assets/icons/telegram.svg +10 -0
  117. package/dist/collection/assets/icons/tik-tok-brand.svg +5 -0
  118. package/dist/collection/assets/icons/tik-tok.svg +3 -0
  119. package/dist/collection/assets/icons/tumblr-brand.svg +10 -0
  120. package/dist/collection/assets/icons/tumblr.svg +10 -0
  121. package/dist/collection/assets/icons/twitter-brand.svg +3 -0
  122. package/dist/collection/assets/icons/twitter.svg +3 -0
  123. package/dist/collection/assets/icons/wallet.svg +5 -0
  124. package/dist/collection/assets/icons/youtube-brand.svg +11 -0
  125. package/dist/collection/assets/icons/youtube.svg +3 -0
  126. package/dist/collection/collection-manifest.json +33 -0
  127. package/dist/collection/components/cpsl-alert/cpsl-alert.css +98 -0
  128. package/dist/collection/components/cpsl-alert/cpsl-alert.js +80 -0
  129. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -0
  130. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +29 -0
  131. package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +1 -0
  132. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +37 -0
  133. package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +1 -0
  134. package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
  135. package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
  136. package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
  137. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
  138. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
  139. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
  140. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
  141. package/dist/collection/components/cpsl-button/cpsl-button.css +162 -0
  142. package/dist/collection/components/cpsl-button/cpsl-button.js +68 -0
  143. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -0
  144. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +29 -0
  145. package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +1 -0
  146. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +37 -0
  147. package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +1 -0
  148. package/dist/collection/components/cpsl-code-input/code-change-interface.js +2 -0
  149. package/dist/collection/components/cpsl-code-input/code-change-interface.js.map +1 -0
  150. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +134 -0
  151. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +223 -0
  152. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -0
  153. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +29 -0
  154. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +1 -0
  155. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +37 -0
  156. package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +1 -0
  157. package/dist/collection/components/cpsl-col/cpsl-col.css +200 -0
  158. package/dist/collection/components/cpsl-col/cpsl-col.js +528 -0
  159. package/dist/collection/components/cpsl-col/cpsl-col.js.map +1 -0
  160. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +29 -0
  161. package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +1 -0
  162. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +37 -0
  163. package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +1 -0
  164. package/dist/collection/components/cpsl-divider/cpsl-divider.css +73 -0
  165. package/dist/collection/components/cpsl-divider/cpsl-divider.js +19 -0
  166. package/dist/collection/components/cpsl-divider/cpsl-divider.js.map +1 -0
  167. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +29 -0
  168. package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +1 -0
  169. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +37 -0
  170. package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +1 -0
  171. package/dist/collection/components/cpsl-grid/cpsl-grid.css +235 -0
  172. package/dist/collection/components/cpsl-grid/cpsl-grid.js +46 -0
  173. package/dist/collection/components/cpsl-grid/cpsl-grid.js.map +1 -0
  174. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +29 -0
  175. package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +1 -0
  176. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +37 -0
  177. package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +1 -0
  178. package/dist/collection/components/cpsl-icon/cpsl-icon.css +95 -0
  179. package/dist/collection/components/cpsl-icon/cpsl-icon.js +68 -0
  180. package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -0
  181. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +29 -0
  182. package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +1 -0
  183. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +37 -0
  184. package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +1 -0
  185. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +77 -0
  186. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +19 -0
  187. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js.map +1 -0
  188. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +29 -0
  189. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +1 -0
  190. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +37 -0
  191. package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +1 -0
  192. package/dist/collection/components/cpsl-input/cpsl-input.css +194 -0
  193. package/dist/collection/components/cpsl-input/cpsl-input.js +708 -0
  194. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -0
  195. package/dist/collection/components/cpsl-input/input-interface.js +2 -0
  196. package/dist/collection/components/cpsl-input/input-interface.js.map +1 -0
  197. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +29 -0
  198. package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +1 -0
  199. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +37 -0
  200. package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +1 -0
  201. package/dist/collection/components/cpsl-modal/cpsl-modal.css +172 -0
  202. package/dist/collection/components/cpsl-modal/cpsl-modal.js +431 -0
  203. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -0
  204. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +29 -0
  205. package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +1 -0
  206. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +37 -0
  207. package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +1 -0
  208. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +11 -0
  209. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +108 -0
  210. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -0
  211. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +29 -0
  212. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +1 -0
  213. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +37 -0
  214. package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +1 -0
  215. package/dist/collection/components/cpsl-pill/cpsl-pill.css +92 -0
  216. package/dist/collection/components/cpsl-pill/cpsl-pill.js +43 -0
  217. package/dist/collection/components/cpsl-pill/cpsl-pill.js.map +1 -0
  218. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +29 -0
  219. package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +1 -0
  220. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +37 -0
  221. package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +1 -0
  222. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +82 -0
  223. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js +71 -0
  224. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js.map +1 -0
  225. package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js +2 -0
  226. package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js.map +1 -0
  227. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +29 -0
  228. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +1 -0
  229. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +37 -0
  230. package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +1 -0
  231. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +81 -0
  232. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +107 -0
  233. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js.map +1 -0
  234. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +29 -0
  235. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +1 -0
  236. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +37 -0
  237. package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +1 -0
  238. package/dist/collection/components/cpsl-row/cpsl-row.css +136 -0
  239. package/dist/collection/components/cpsl-row/cpsl-row.js +19 -0
  240. package/dist/collection/components/cpsl-row/cpsl-row.js.map +1 -0
  241. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +29 -0
  242. package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +1 -0
  243. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +37 -0
  244. package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +1 -0
  245. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +175 -0
  246. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +252 -0
  247. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -0
  248. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +29 -0
  249. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +1 -0
  250. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +37 -0
  251. package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +1 -0
  252. package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +68 -0
  253. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +69 -0
  254. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js.map +1 -0
  255. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +29 -0
  256. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +1 -0
  257. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +37 -0
  258. package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +1 -0
  259. package/dist/collection/components/cpsl-tab/cpsl-tab.css +23 -0
  260. package/dist/collection/components/cpsl-tab/cpsl-tab.js +121 -0
  261. package/dist/collection/components/cpsl-tab/cpsl-tab.js.map +1 -0
  262. package/dist/collection/components/cpsl-tab/tab-interface.js +2 -0
  263. package/dist/collection/components/cpsl-tab/tab-interface.js.map +1 -0
  264. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +29 -0
  265. package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +1 -0
  266. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +37 -0
  267. package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +1 -0
  268. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +111 -0
  269. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +170 -0
  270. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -0
  271. package/dist/collection/components/cpsl-tabs/tabs-interface.js +2 -0
  272. package/dist/collection/components/cpsl-tabs/tabs-interface.js.map +1 -0
  273. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +29 -0
  274. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +1 -0
  275. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +37 -0
  276. package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +1 -0
  277. package/dist/collection/components/cpsl-text/cpsl-text.css +59 -0
  278. package/dist/collection/components/cpsl-text/cpsl-text.js +19 -0
  279. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -0
  280. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +29 -0
  281. package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +1 -0
  282. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +37 -0
  283. package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +1 -0
  284. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +97 -0
  285. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +67 -0
  286. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js.map +1 -0
  287. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +29 -0
  288. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +1 -0
  289. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +37 -0
  290. package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +1 -0
  291. package/dist/collection/constants.js +6 -0
  292. package/dist/collection/constants.js.map +1 -0
  293. package/dist/collection/index.js +3 -0
  294. package/dist/collection/index.js.map +1 -0
  295. package/dist/collection/interface.js +2 -0
  296. package/dist/collection/interface.js.map +1 -0
  297. package/dist/collection/utils/media.js +18 -0
  298. package/dist/collection/utils/media.js.map +1 -0
  299. package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
  300. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
  301. package/dist/collection/utils/theme/generateFont.js +7 -0
  302. package/dist/collection/utils/theme/generateFont.js.map +1 -0
  303. package/dist/collection/utils/theme/generatePalette.js +46 -0
  304. package/dist/collection/utils/theme/generatePalette.js.map +1 -0
  305. package/dist/collection/utils/theme/generateTheme.js +12 -0
  306. package/dist/collection/utils/theme/generateTheme.js.map +1 -0
  307. package/dist/collection/utils/theme/utils.js +21 -0
  308. package/dist/collection/utils/theme/utils.js.map +1 -0
  309. package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
  310. package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  311. package/dist/esm/capsule.js +22 -0
  312. package/dist/esm/capsule.js.map +1 -0
  313. package/dist/esm/cpsl-alert_17.entry.js +10717 -0
  314. package/dist/esm/cpsl-alert_17.entry.js.map +1 -0
  315. package/dist/{capsule → esm}/cpsl-animation.entry.js +20 -114
  316. package/dist/esm/cpsl-animation.entry.js.map +1 -0
  317. package/dist/{capsule → esm}/cpsl-col.entry.js +4 -3
  318. package/dist/esm/cpsl-col.entry.js.map +1 -0
  319. package/dist/{capsule → esm}/cpsl-grid.entry.js +5 -4
  320. package/dist/esm/cpsl-grid.entry.js.map +1 -0
  321. package/dist/{capsule → esm}/cpsl-info-box.entry.js +4 -3
  322. package/dist/esm/cpsl-info-box.entry.js.map +1 -0
  323. package/dist/esm/cpsl-row.entry.js +18 -0
  324. package/dist/esm/cpsl-row.entry.js.map +1 -0
  325. package/dist/esm/index-f00e090c.js +1982 -0
  326. package/dist/esm/index-f00e090c.js.map +1 -0
  327. package/dist/esm/index.js +338 -0
  328. package/dist/esm/index.js.map +1 -0
  329. package/dist/esm/loader.js +13 -0
  330. package/dist/esm/loader.js.map +1 -0
  331. package/dist/esm/polyfills/core-js.js +11 -0
  332. package/dist/esm/polyfills/dom.js +79 -0
  333. package/dist/esm/polyfills/es5-html-element.js +1 -0
  334. package/dist/esm/polyfills/index.js +34 -0
  335. package/dist/esm/polyfills/system.js +6 -0
  336. package/dist/index.cjs.js +1 -0
  337. package/dist/index.js +1 -0
  338. package/dist/loader/cdn.js +3 -0
  339. package/dist/loader/index.cjs.js +3 -0
  340. package/dist/loader/index.d.ts +21 -0
  341. package/dist/loader/index.es2017.js +3 -0
  342. package/dist/loader/index.js +4 -0
  343. package/dist/loader/package.json +11 -0
  344. package/dist/scripts/buildIconLibrary.js +33 -0
  345. package/dist/scripts/buildIconLibrary.js.map +1 -0
  346. package/dist/types/assets/icons/index.d.ts +5 -0
  347. package/dist/types/components/cpsl-text/cpsl-text.d.ts +0 -4
  348. package/dist/types/index.d.ts +1 -1
  349. package/dist/types/interface.d.ts +0 -15
  350. package/dist/types/utils/theme/generateFont.d.ts +1 -1
  351. package/dist/types/utils/theme/generateTheme.d.ts +2 -1
  352. package/package.json +2 -2
  353. package/dist/capsule/_commonjsHelpers-bc8ff177.js +0 -36
  354. package/dist/capsule/_commonjsHelpers-bc8ff177.js.map +0 -1
  355. package/dist/capsule/cpsl-alert.entry.js +0 -31
  356. package/dist/capsule/cpsl-alert.entry.js.map +0 -1
  357. package/dist/capsule/cpsl-animation.entry.js.map +0 -1
  358. package/dist/capsule/cpsl-button.entry.js +0 -24
  359. package/dist/capsule/cpsl-button.entry.js.map +0 -1
  360. package/dist/capsule/cpsl-code-input.entry.js +0 -106
  361. package/dist/capsule/cpsl-code-input.entry.js.map +0 -1
  362. package/dist/capsule/cpsl-col.entry.js.map +0 -1
  363. package/dist/capsule/cpsl-divider.entry.js +0 -17
  364. package/dist/capsule/cpsl-divider.entry.js.map +0 -1
  365. package/dist/capsule/cpsl-grid.entry.js.map +0 -1
  366. package/dist/capsule/cpsl-icon.entry.js +0 -20
  367. package/dist/capsule/cpsl-icon.entry.js.map +0 -1
  368. package/dist/capsule/cpsl-info-box.entry.js.map +0 -1
  369. package/dist/capsule/cpsl-input.entry.js +0 -124
  370. package/dist/capsule/cpsl-input.entry.js.map +0 -1
  371. package/dist/capsule/cpsl-modal.entry.js +0 -3338
  372. package/dist/capsule/cpsl-modal.entry.js.map +0 -1
  373. package/dist/capsule/cpsl-overlay.entry.js +0 -44
  374. package/dist/capsule/cpsl-overlay.entry.js.map +0 -1
  375. package/dist/capsule/cpsl-pill.entry.js +0 -18
  376. package/dist/capsule/cpsl-pill.entry.js.map +0 -1
  377. package/dist/capsule/cpsl-progress-indicator.entry.js +0 -29
  378. package/dist/capsule/cpsl-progress-indicator.entry.js.map +0 -1
  379. package/dist/capsule/cpsl-qr-code.entry.js +0 -56
  380. package/dist/capsule/cpsl-qr-code.entry.js.map +0 -1
  381. package/dist/capsule/cpsl-row.entry.js +0 -17
  382. package/dist/capsule/cpsl-row.entry.js.map +0 -1
  383. package/dist/capsule/cpsl-slide-button.entry.js +0 -130
  384. package/dist/capsule/cpsl-slide-button.entry.js.map +0 -1
  385. package/dist/capsule/cpsl-spinner.entry.js +0 -25
  386. package/dist/capsule/cpsl-spinner.entry.js.map +0 -1
  387. package/dist/capsule/cpsl-tab.entry.js +0 -37
  388. package/dist/capsule/cpsl-tab.entry.js.map +0 -1
  389. package/dist/capsule/cpsl-tabs.entry.js +0 -71
  390. package/dist/capsule/cpsl-tabs.entry.js.map +0 -1
  391. package/dist/capsule/cpsl-text.entry.js +0 -66
  392. package/dist/capsule/cpsl-text.entry.js.map +0 -1
  393. package/dist/capsule/cpsl-tile-button.entry.js +0 -19
  394. package/dist/capsule/cpsl-tile-button.entry.js.map +0 -1
  395. package/dist/capsule/index-3ac1b9e9.js +0 -617
  396. package/dist/capsule/index-3ac1b9e9.js.map +0 -1
  397. package/dist/capsule/index-3ad00c7e.js +0 -6064
  398. package/dist/capsule/index-3ad00c7e.js.map +0 -1
  399. package/dist/capsule/index-f19e63df.js +0 -4148
  400. package/dist/capsule/index-f19e63df.js.map +0 -1
  401. package/dist/capsule/shadow-css-bc9e2af8.js +0 -478
  402. package/dist/capsule/shadow-css-bc9e2af8.js.map +0 -1
  403. /package/dist/{capsule → esm}/app-globals-0f993ce5.js +0 -0
  404. /package/dist/{capsule → esm}/app-globals-0f993ce5.js.map +0 -0
  405. /package/dist/{capsule → esm}/constants-7b49abd5.js +0 -0
  406. /package/dist/{capsule → esm}/constants-7b49abd5.js.map +0 -0
@@ -0,0 +1,19 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CpslText {
3
+ render() {
4
+ return (h(Host, { key: '14b6b911fe1c66fa0dbc118207755123110fd85a' }, h("slot", { key: 'ebf8c3b818cc85fd06bc4feb3d7c2b21818fcc9c' })));
5
+ }
6
+ static get is() { return "cpsl-text"; }
7
+ static get encapsulation() { return "shadow"; }
8
+ static get originalStyleUrls() {
9
+ return {
10
+ "$": ["cpsl-text.scss"]
11
+ };
12
+ }
13
+ static get styleUrls() {
14
+ return {
15
+ "$": ["cpsl-text.css"]
16
+ };
17
+ }
18
+ }
19
+ //# sourceMappingURL=cpsl-text.js.map
@@ -0,0 +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,CAAC,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,QAAQ;IACnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n render() {\n return (\n <Host>\n <slot></slot>\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-text', () => {
22
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const page = yield newE2EPage();
24
+ yield page.setContent('<cpsl-text></cpsl-text>');
25
+ const element = yield page.find('cpsl-text');
26
+ expect(element).toHaveClass('hydrated');
27
+ }));
28
+ });
29
+ //# sourceMappingURL=cpsl-text.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-text.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-text/test/cpsl-text.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QAEjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7C,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-text', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-text></cpsl-text>');\n\n const element = await page.find('cpsl-text');\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 { CpslText } from "../cpsl-text";
22
+ describe('cpsl-text', () => {
23
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
24
+ const page = yield newSpecPage({
25
+ components: [CpslText],
26
+ html: `<cpsl-text></cpsl-text>`,
27
+ });
28
+ expect(page.root).toEqualHtml(`
29
+ <cpsl-text>
30
+ <mock:shadow-root>
31
+ <slot></slot>
32
+ </mock:shadow-root>
33
+ </cpsl-text>
34
+ `);
35
+ }));
36
+ });
37
+ //# sourceMappingURL=cpsl-text.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-text.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-text/test/cpsl-text.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,IAAI,EAAE,yBAAyB;SAChC,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 { CpslText } from '../cpsl-text';\n\ndescribe('cpsl-text', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslText],\n html: `<cpsl-text></cpsl-text>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-text>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-text>\n `);\n });\n});\n"]}
@@ -0,0 +1,97 @@
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
+ --button-icon-color: var(--cpsl-color-text-primary);
58
+ --button-border-radius: var(--cpsl-border-radius-tile-button);
59
+ --button-background-color: var(--cpsl-color-tile-button-surface-default);
60
+ --button-border-color: var(--cpsl-color-tile-button-border);
61
+ --button-width: 72px;
62
+ --button-height: 56px;
63
+ --button-gap: 4px;
64
+ --button-box-shadow: 0px -4px 4px 0px var(--cpsl-color-alpha-black-2) inset, 0px 4px 4px 0px var(--cpsl-color-alpha-white-4) inset;
65
+ }
66
+
67
+ :host :hover {
68
+ --button-background-color: var(--cpsl-color-tile-button-surface-hover);
69
+ }
70
+ :host :active {
71
+ --button-background-color: var(--cpsl-color-tile-button-surface-pressed);
72
+ }
73
+
74
+ .button-native {
75
+ border-radius: var(--button-border-radius);
76
+ -webkit-padding-start: var(--button-padding-start);
77
+ padding-inline-start: var(--button-padding-start);
78
+ -webkit-padding-end: var(--button-padding-end);
79
+ padding-inline-end: var(--button-padding-end);
80
+ padding-top: var(--button-padding-top);
81
+ padding-bottom: var(--button-padding-bottom);
82
+ border: 1px solid transparent;
83
+ cursor: pointer;
84
+ background-color: var(--button-background-color);
85
+ border-color: var(--button-border-color);
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: var(--button-gap);
89
+ align-items: center;
90
+ justify-content: center;
91
+ width: var(--button-width);
92
+ height: var(--button-height);
93
+ box-shadow: var(--button-box-shadow);
94
+ }
95
+ .button-native cpsl-icon {
96
+ --icon-color: var(--button-icon-color);
97
+ }
@@ -0,0 +1,67 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CpslTileButton {
3
+ constructor() {
4
+ this.src = undefined;
5
+ this.icon = undefined;
6
+ }
7
+ render() {
8
+ return (h(Host, { key: 'f86ee8387b40817115e680cad78b3cab4af7b35f' }, h("button", { key: '7fa11eeed97fd89c8d5640cb270403c6bab8cda1', class: "button-native" }, h("cpsl-icon", { key: '0b605c0839dd930cc97a70fd867619929c3ce5af', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: '8c3fe5d96e1443cd7a454589cdb279a684773a83' }))));
9
+ }
10
+ static get is() { return "cpsl-tile-button"; }
11
+ static get encapsulation() { return "shadow"; }
12
+ static get originalStyleUrls() {
13
+ return {
14
+ "$": ["cpsl-tile-button.scss"]
15
+ };
16
+ }
17
+ static get styleUrls() {
18
+ return {
19
+ "$": ["cpsl-tile-button.css"]
20
+ };
21
+ }
22
+ static get properties() {
23
+ return {
24
+ "src": {
25
+ "type": "string",
26
+ "mutable": false,
27
+ "complexType": {
28
+ "original": "string",
29
+ "resolved": "string",
30
+ "references": {}
31
+ },
32
+ "required": false,
33
+ "optional": true,
34
+ "docs": {
35
+ "tags": [],
36
+ "text": "The external source of the icon. If both `icon` and `src` are provided, `icon` will be used."
37
+ },
38
+ "attribute": "src",
39
+ "reflect": false
40
+ },
41
+ "icon": {
42
+ "type": "string",
43
+ "mutable": false,
44
+ "complexType": {
45
+ "original": "IconType",
46
+ "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"youtubeBrand\" | \"youtube\"",
47
+ "references": {
48
+ "IconType": {
49
+ "location": "import",
50
+ "path": "../../interface",
51
+ "id": "src/interface.ts::IconType"
52
+ }
53
+ }
54
+ },
55
+ "required": false,
56
+ "optional": true,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": "The name of the icon. If both `icon` and `src` are provided, `icon` will be used."
60
+ },
61
+ "attribute": "icon",
62
+ "reflect": false
63
+ }
64
+ };
65
+ }
66
+ }
67
+ //# sourceMappingURL=cpsl-tile-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-tile-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-tile-button/cpsl-tile-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,cAAc;;;;;IAWzB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,+DAAQ,KAAK,EAAC,eAAe;gBAC3B,kEAAW,WAAW,EAAC,MAAM,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;gBAChE,8DAAa,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-tile-button',\n styleUrl: 'cpsl-tile-button.scss',\n shadow: true,\n})\nexport class CpslTileButton {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host>\n <button class=\"button-native\">\n <cpsl-icon exportparts=\"icon\" src={this.src} icon={this.icon} />\n <slot></slot>\n </button>\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-tile-button', () => {
22
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const page = yield newE2EPage();
24
+ yield page.setContent('<cpsl-tile-button></cpsl-tile-button>');
25
+ const element = yield page.find('cpsl-tile-button');
26
+ expect(element).toHaveClass('hydrated');
27
+ }));
28
+ });
29
+ //# sourceMappingURL=cpsl-tile-button.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-tile-button.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-tile-button/test/cpsl-tile-button.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,uCAAuC,CAAC,CAAC;QAE/D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACpD,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-tile-button', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-tile-button></cpsl-tile-button>');\n\n const element = await page.find('cpsl-tile-button');\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 { CpslTileButton } from "../cpsl-tile-button";
22
+ describe('cpsl-tile-button', () => {
23
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
24
+ const page = yield newSpecPage({
25
+ components: [CpslTileButton],
26
+ html: `<cpsl-tile-button></cpsl-tile-button>`,
27
+ });
28
+ expect(page.root).toEqualHtml(`
29
+ <cpsl-tile-button>
30
+ <mock:shadow-root>
31
+ <slot></slot>
32
+ </mock:shadow-root>
33
+ </cpsl-tile-button>
34
+ `);
35
+ }));
36
+ });
37
+ //# sourceMappingURL=cpsl-tile-button.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-tile-button.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-tile-button/test/cpsl-tile-button.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,IAAI,EAAE,uCAAuC;SAC9C,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 { CpslTileButton } from '../cpsl-tile-button';\n\ndescribe('cpsl-tile-button', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslTileButton],\n html: `<cpsl-tile-button></cpsl-tile-button>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-tile-button>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-tile-button>\n `);\n });\n});\n"]}
@@ -0,0 +1,6 @@
1
+ export const MOBILE_SIZE = 480;
2
+ export const DEFAULT_THEME = {
3
+ foregroundColor: '#121212',
4
+ backgroundColor: '#FAFAFA',
5
+ };
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;CAC3B,CAAC","sourcesContent":["import { Theme } from './interface';\n\nexport const MOBILE_SIZE = 480;\n\nexport const DEFAULT_THEME: Theme = {\n foregroundColor: '#121212',\n backgroundColor: '#FAFAFA',\n};\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export { default as generateTheme } from './utils/theme/generateTheme';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export * from './components';\n\nexport { default as generateTheme } from './utils/theme/generateTheme';\nexport type { Theme, BorderRadius } from './interface';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\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;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';\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 };\n border?: {\n placeholder?: string;\n active?: 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 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}\n"]}
@@ -0,0 +1,18 @@
1
+ export const SIZE_TO_MEDIA = {
2
+ xs: '(min-width: 0px)',
3
+ sm: '(min-width: 576px)',
4
+ md: '(min-width: 768px)',
5
+ lg: '(min-width: 992px)',
6
+ xl: '(min-width: 1200px)',
7
+ };
8
+ export const matchBreakpoint = (breakpoint) => {
9
+ if (breakpoint === undefined || breakpoint === '') {
10
+ return true;
11
+ }
12
+ if (window.matchMedia) {
13
+ const mediaQuery = SIZE_TO_MEDIA[breakpoint];
14
+ return window.matchMedia(mediaQuery).matches;
15
+ }
16
+ return false;
17
+ };
18
+ //# sourceMappingURL=media.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,56 @@
1
+ export const generateBorderRadii = ({ borderRadius }) => {
2
+ if (!Boolean(borderRadius)) {
3
+ return;
4
+ }
5
+ let smallRadius = 8;
6
+ let mediumRadius = 16;
7
+ let largeRadius = 24;
8
+ const fullRadius = 1000;
9
+ let isFull = false;
10
+ let isNone = false;
11
+ switch (borderRadius) {
12
+ case 'none': {
13
+ isNone = true;
14
+ smallRadius = 0;
15
+ mediumRadius = 0;
16
+ largeRadius = 0;
17
+ break;
18
+ }
19
+ case 'xs': {
20
+ smallRadius = 4;
21
+ mediumRadius = 12;
22
+ largeRadius = 20;
23
+ break;
24
+ }
25
+ case 'md': {
26
+ smallRadius = 12;
27
+ mediumRadius = 20;
28
+ largeRadius = 28;
29
+ break;
30
+ }
31
+ case 'lg': {
32
+ smallRadius = 16;
33
+ mediumRadius = 24;
34
+ largeRadius = 32;
35
+ break;
36
+ }
37
+ case 'full': {
38
+ smallRadius = 16;
39
+ mediumRadius = 24;
40
+ largeRadius = 32;
41
+ isFull = true;
42
+ break;
43
+ }
44
+ }
45
+ document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);
46
+ document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);
47
+ document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);
48
+ document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);
49
+ document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);
50
+ document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);
51
+ document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);
52
+ document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);
53
+ document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);
54
+ document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);
55
+ };
56
+ //# sourceMappingURL=generateBorderRadii.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateBorderRadii.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateBorderRadii.ts"],"names":[],"mappings":"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","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let smallRadius = 8;\n let mediumRadius = 16;\n let largeRadius = 24;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'md': {\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n case 'lg': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n};\n"]}
@@ -0,0 +1,7 @@
1
+ export const generateFont = ({ font }) => {
2
+ if (!Boolean(font)) {
3
+ return;
4
+ }
5
+ document.documentElement.style.setProperty('--cpsl-default-font', font);
6
+ };
7
+ //# sourceMappingURL=generateFont.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateFont.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateFont.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAuB,EAAE,EAAE;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateFont = ({ font }: Pick<Theme, 'font'>) => {\n if (!Boolean(font)) {\n return;\n }\n\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n};\n"]}
@@ -0,0 +1,46 @@
1
+ import { mix, readableColorIsBlack } from "color2k";
2
+ import { getCssColors, isColor } from "./utils";
3
+ import { DEFAULT_THEME } from "../../constants";
4
+ const MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];
5
+ export const generatePalette = ({ foregroundColor, backgroundColor, customPalette }) => {
6
+ if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {
7
+ foregroundColor = DEFAULT_THEME.foregroundColor;
8
+ }
9
+ if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {
10
+ backgroundColor = DEFAULT_THEME.backgroundColor;
11
+ }
12
+ const isDarkBackground = !readableColorIsBlack(backgroundColor);
13
+ const palette = {
14
+ foregroundColors: [],
15
+ backgroundColors: [],
16
+ isDarkBackground,
17
+ };
18
+ const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';
19
+ const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';
20
+ MIXES.forEach(value => {
21
+ palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));
22
+ palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));
23
+ });
24
+ document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);
25
+ document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);
26
+ document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);
27
+ document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);
28
+ document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);
29
+ document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);
30
+ document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);
31
+ document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);
32
+ document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);
33
+ document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);
34
+ document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);
35
+ document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);
36
+ document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);
37
+ document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);
38
+ document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);
39
+ document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);
40
+ if (Boolean(customPalette)) {
41
+ const cssColorVars = getCssColors(customPalette);
42
+ Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
43
+ }
44
+ return palette;
45
+ };
46
+ //# sourceMappingURL=generatePalette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatePalette.js","sourceRoot":"","sources":["../../../../src/utils/theme/generatePalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAwE,EAAW,EAAE;IACpK,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IAED,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAY;QACvB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB;KACjB,CAAC;IAEF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACpB,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;IAGH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAGtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtG,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor } from './utils';\nimport { DEFAULT_THEME } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nconst MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import { DEFAULT_THEME } from "../../constants";
2
+ import { generateBorderRadii } from "./generateBorderRadii";
3
+ import { generateFont } from "./generateFont";
4
+ import { generatePalette } from "./generatePalette";
5
+ const generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }) => {
6
+ const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });
7
+ generateFont({ font });
8
+ generateBorderRadii({ borderRadius });
9
+ return palette.isDarkBackground;
10
+ };
11
+ export default generateTheme;
12
+ //# sourceMappingURL=generateTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateTheme.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,MAAM,aAAa,GAAG,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,eAAe,EAAE,eAAe,GAAG,aAAa,CAAC,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAS,EAAW,EAAE;IAChL,MAAM,OAAO,GAAG,eAAe,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,CAAC;IAErF,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvB,mBAAmB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,gBAAgB,CAAC;AAClC,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nconst generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font });\n\n generateBorderRadii({ borderRadius });\n\n return palette.isDarkBackground;\n};\n\nexport default generateTheme;\n"]}
@@ -0,0 +1,21 @@
1
+ export const isColor = strColor => {
2
+ const s = new Option().style;
3
+ s.color = strColor;
4
+ return s.color !== '';
5
+ };
6
+ const toKebabCase = (pascal) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();
7
+ const buildVars = (prev, obj) => {
8
+ let resp = {};
9
+ for (const k in obj) {
10
+ const name = `${prev}-${toKebabCase(k)}`;
11
+ if (typeof obj[k] === 'object' && obj[k] !== null) {
12
+ resp = Object.assign(Object.assign({}, resp), buildVars(name, obj[k]));
13
+ }
14
+ else {
15
+ resp[name] = obj[k];
16
+ }
17
+ }
18
+ return resp;
19
+ };
20
+ export const getCssColors = (customPalette) => buildVars('--cpsl-color', customPalette);
21
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/utils/theme/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE;IAChC,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC,KAAK,CAAC;IAC7B,CAAC,CAAC,KAAK,GAAG,QAAQ,CAAC;IACnB,OAAO,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAGpG,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,GAAQ,EAA2B,EAAE;IACpE,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAClD,IAAI,mCAAQ,IAAI,GAAK,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;QACjD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAA4B,EAA2B,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { CustomPalette } from '../../interface';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\n"]}
@@ -0,0 +1,9 @@
1
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
+
3
+ function getDefaultExportFromCjs (x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
+ }
6
+
7
+ export { commonjsGlobal as c, getDefaultExportFromCjs as g };
8
+
9
+ //# sourceMappingURL=_commonjsHelpers-1789f0cf.js.map
@@ -0,0 +1 @@
1
+ {"file":"_commonjsHelpers-1789f0cf.js","mappings":";;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}