@saasquatch/mint-components 1.3.3-6 → 1.5.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/cjs/{ShadowViewAddon-d6a442a9.js → ShadowViewAddon-a85b8c8d.js} +1 -1
  2. package/dist/cjs/{global-b957dd98.js → global-6223fe8f.js} +1 -1
  3. package/dist/cjs/{index.module-85eb6b4d.js → index.module-7dd4b981.js} +1 -1
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/cjs/mint-components.cjs.js +3 -3
  6. package/dist/cjs/{re-render-59955561.js → re-render-6111d4bd.js} +1 -1
  7. package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
  8. package/dist/cjs/sqm-big-stat.cjs.entry.js +2 -2
  9. package/dist/cjs/sqm-divided-layout_30.cjs.entry.js +3995 -358
  10. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
  11. package/dist/cjs/{sqm-leaderboard-rank-view-9114d9ad.js → sqm-leaderboard-rank-view-7dd44d62.js} +2 -2
  12. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +3 -3
  13. package/dist/cjs/sqm-leaderboard.cjs.entry.js +2 -2
  14. package/dist/cjs/sqm-name-fields.cjs.entry.js +1 -1
  15. package/dist/cjs/{sqm-navigation-sidebar-item-view-b565a10a.js → sqm-navigation-sidebar-item-view-6c7f78e6.js} +1 -1
  16. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
  17. package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
  18. package/dist/cjs/{sqm-portal-email-verification-view-bd40f7eb.js → sqm-portal-email-verification-view-08d1848c.js} +1 -1
  19. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
  20. package/dist/cjs/{sqm-portal-footer-view-b60e17c8.js → sqm-portal-footer-view-69c73802.js} +1 -1
  21. package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
  22. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
  23. package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
  24. package/dist/cjs/{sqm-portal-profile-view-c3b889d4.js → sqm-portal-profile-view-14b41436.js} +1 -1
  25. package/dist/cjs/sqm-portal-profile.cjs.entry.js +3 -3
  26. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
  27. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
  28. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
  29. package/dist/cjs/sqm-referral-table-column.cjs.entry.js +2 -2
  30. package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +2 -2
  31. package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +2 -2
  32. package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +2 -2
  33. package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +2 -2
  34. package/dist/cjs/sqm-share-code.cjs.entry.js +1 -1
  35. package/dist/cjs/{useDemoBigStat-9193e8c5.js → useDemoBigStat-2786227e.js} +1 -1
  36. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +13 -18
  37. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +106 -119
  38. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +21 -5
  39. package/dist/collection/components/sqm-reward-exchange-list/assets/placeholder.png +0 -0
  40. package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +32 -29
  41. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +199 -89
  42. package/dist/collection/components/sqm-stencilbook/AutoColor.js +26 -0
  43. package/dist/collection/components/{sqm-task-card → sqm-stencilbook}/Matrix.js +0 -0
  44. package/dist/collection/components/sqm-stencilbook/Resizer.js +26 -0
  45. package/dist/collection/components/sqm-stencilbook/Themes.js +38 -0
  46. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +42 -3
  47. package/dist/collection/components/sqm-task-card/SVGs.js +7 -2
  48. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +142 -4
  49. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +5 -4
  50. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +25 -6
  51. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +74 -47
  52. package/dist/collection/components/sqm-task-card/sqm-task-card.js +26 -1
  53. package/dist/esm/{ShadowViewAddon-2338f393.js → ShadowViewAddon-a3f510db.js} +1 -1
  54. package/dist/esm/{global-0e81c5e6.js → global-90da933f.js} +1 -1
  55. package/dist/esm/{index.module-9b5bb6a2.js → index.module-90d2c3ad.js} +1 -1
  56. package/dist/esm/loader.js +3 -3
  57. package/dist/esm/mint-components.js +3 -3
  58. package/dist/esm/{re-render-57ac6584.js → re-render-e06f2f7f.js} +1 -1
  59. package/dist/esm/sqm-asset-card.entry.js +1 -1
  60. package/dist/esm/sqm-big-stat.entry.js +2 -2
  61. package/dist/esm/sqm-divided-layout_30.entry.js +3995 -358
  62. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  63. package/dist/esm/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-47844836.js} +2 -2
  64. package/dist/esm/sqm-leaderboard-rank.entry.js +3 -3
  65. package/dist/esm/sqm-leaderboard.entry.js +2 -2
  66. package/dist/esm/sqm-name-fields.entry.js +1 -1
  67. package/dist/esm/{sqm-navigation-sidebar-item-view-79b0748c.js → sqm-navigation-sidebar-item-view-f2304ad9.js} +1 -1
  68. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  69. package/dist/esm/sqm-popup-container.entry.js +1 -1
  70. package/dist/esm/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-8cefe480.js} +1 -1
  71. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  72. package/dist/esm/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-d9fe0bf8.js} +1 -1
  73. package/dist/esm/sqm-portal-footer.entry.js +3 -3
  74. package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
  75. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  76. package/dist/esm/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-b67467b4.js} +1 -1
  77. package/dist/esm/sqm-portal-profile.entry.js +3 -3
  78. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  79. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  80. package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
  81. package/dist/esm/sqm-referral-table-column.entry.js +2 -2
  82. package/dist/esm/sqm-referral-table-date-column.entry.js +2 -2
  83. package/dist/esm/sqm-referral-table-rewards-column.entry.js +2 -2
  84. package/dist/esm/sqm-referral-table-status-column.entry.js +2 -2
  85. package/dist/esm/sqm-referral-table-user-column.entry.js +2 -2
  86. package/dist/esm/sqm-share-code.entry.js +1 -1
  87. package/dist/esm/{useDemoBigStat-660c8672.js → useDemoBigStat-c3b955b7.js} +1 -1
  88. package/dist/esm-es5/{ShadowViewAddon-2338f393.js → ShadowViewAddon-a3f510db.js} +1 -1
  89. package/dist/esm-es5/{global-0e81c5e6.js → global-90da933f.js} +1 -1
  90. package/dist/esm-es5/{index.module-9b5bb6a2.js → index.module-90d2c3ad.js} +1 -1
  91. package/dist/esm-es5/loader.js +1 -1
  92. package/dist/esm-es5/mint-components.js +1 -1
  93. package/dist/esm-es5/{re-render-57ac6584.js → re-render-e06f2f7f.js} +1 -1
  94. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  95. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  96. package/dist/esm-es5/sqm-divided-layout_30.entry.js +58 -1
  97. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  98. package/dist/esm-es5/{sqm-leaderboard-rank-view-3f0dc20e.js → sqm-leaderboard-rank-view-47844836.js} +1 -1
  99. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  100. package/dist/esm-es5/sqm-leaderboard.entry.js +1 -1
  101. package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
  102. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-79b0748c.js → sqm-navigation-sidebar-item-view-f2304ad9.js} +1 -1
  103. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  104. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  105. package/dist/esm-es5/{sqm-portal-email-verification-view-8f253fb7.js → sqm-portal-email-verification-view-8cefe480.js} +1 -1
  106. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  107. package/dist/esm-es5/{sqm-portal-footer-view-b8a2f15e.js → sqm-portal-footer-view-d9fe0bf8.js} +1 -1
  108. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  109. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  110. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  111. package/dist/esm-es5/{sqm-portal-profile-view-831dea85.js → sqm-portal-profile-view-b67467b4.js} +1 -1
  112. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  113. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  114. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  115. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  116. package/dist/esm-es5/sqm-referral-table-column.entry.js +1 -1
  117. package/dist/esm-es5/sqm-referral-table-date-column.entry.js +1 -1
  118. package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +1 -1
  119. package/dist/esm-es5/sqm-referral-table-status-column.entry.js +1 -1
  120. package/dist/esm-es5/sqm-referral-table-user-column.entry.js +1 -1
  121. package/dist/esm-es5/sqm-share-code.entry.js +1 -1
  122. package/dist/esm-es5/{useDemoBigStat-660c8672.js → useDemoBigStat-c3b955b7.js} +1 -1
  123. package/dist/mint-components/assets/placeholder.png +0 -0
  124. package/dist/mint-components/mint-components.esm.js +1 -1
  125. package/dist/mint-components/mint-components.js +1 -1
  126. package/dist/mint-components/{p-be615f03.system.js → p-07c924fa.system.js} +1 -1
  127. package/dist/mint-components/{p-295b306a.js → p-0eb3e89c.js} +1 -1
  128. package/dist/mint-components/p-160bd62f.entry.js +1 -0
  129. package/dist/mint-components/{p-58bf2a30.system.js → p-16f5a7cb.system.js} +1 -1
  130. package/dist/mint-components/{p-55f029cd.system.entry.js → p-1a09e4e1.system.entry.js} +1 -1
  131. package/dist/mint-components/p-1c8b0290.entry.js +1 -0
  132. package/dist/mint-components/{p-b893904c.system.entry.js → p-1dcdca58.system.entry.js} +1 -1
  133. package/dist/mint-components/p-20d41ab1.entry.js +1 -0
  134. package/dist/mint-components/{p-a93149f4.entry.js → p-221a4097.entry.js} +1 -1
  135. package/dist/mint-components/{p-0a882bab.system.entry.js → p-223b42bd.system.entry.js} +1 -1
  136. package/dist/mint-components/{p-27bb0aa9.js → p-224504ad.js} +1 -1
  137. package/dist/mint-components/{p-7062ab8e.system.entry.js → p-24b3c6f0.system.entry.js} +1 -1
  138. package/dist/mint-components/{p-3404b8d2.system.entry.js → p-24c9a599.system.entry.js} +1 -1
  139. package/dist/mint-components/{p-aee2a2b9.entry.js → p-29fab29b.entry.js} +1 -1
  140. package/dist/mint-components/{p-ad1c6eb8.system.entry.js → p-304e6c82.system.entry.js} +1 -1
  141. package/dist/mint-components/{p-8f5b80f2.entry.js → p-3397167c.entry.js} +1 -1
  142. package/dist/mint-components/{p-62102076.entry.js → p-33c5ffb7.entry.js} +1 -1
  143. package/dist/mint-components/{p-98e29140.system.entry.js → p-396bf448.system.entry.js} +1 -1
  144. package/dist/mint-components/{p-69902f7c.system.js → p-3b97aed8.system.js} +1 -1
  145. package/dist/mint-components/{p-1ec1dcb3.system.js → p-3ce2fb83.system.js} +1 -1
  146. package/dist/mint-components/p-3d856985.entry.js +1 -0
  147. package/dist/mint-components/{p-1dc2793a.system.entry.js → p-4052b948.system.entry.js} +1 -1
  148. package/dist/mint-components/{p-46cb29e2.system.entry.js → p-412a9226.system.entry.js} +1 -1
  149. package/dist/mint-components/{p-75b143ac.system.entry.js → p-44d0fc80.system.entry.js} +1 -1
  150. package/dist/mint-components/p-45c752a0.entry.js +1 -0
  151. package/dist/mint-components/{p-b6107771.js → p-46a4269a.js} +1 -1
  152. package/dist/mint-components/{p-16b0b00b.entry.js → p-52802c88.entry.js} +2 -2
  153. package/dist/mint-components/p-5480e4ee.entry.js +1 -0
  154. package/dist/mint-components/p-55508395.system.entry.js +1 -0
  155. package/dist/mint-components/{p-a59e65f2.js → p-563253e8.js} +1 -1
  156. package/dist/mint-components/{p-58fb3d02.system.js → p-60855d33.system.js} +1 -1
  157. package/dist/mint-components/{p-0e49a93f.system.entry.js → p-67ae18d1.system.entry.js} +1 -1
  158. package/dist/mint-components/{p-8bfe1f7d.js → p-6882070c.js} +1 -1
  159. package/dist/mint-components/{p-cafc22bf.system.entry.js → p-69bcf4fa.system.entry.js} +1 -1
  160. package/dist/mint-components/{p-1dc2e37a.system.entry.js → p-6bf0a4d9.system.entry.js} +1 -1
  161. package/dist/mint-components/{p-b9edc48d.system.entry.js → p-6e245fa3.system.entry.js} +1 -1
  162. package/dist/mint-components/{p-77f9b4af.entry.js → p-723ebe45.entry.js} +1 -1
  163. package/dist/mint-components/{p-e53399e5.system.entry.js → p-73148868.system.entry.js} +1 -1
  164. package/dist/mint-components/p-8435a22d.entry.js +1 -0
  165. package/dist/mint-components/p-883a32e7.entry.js +1 -0
  166. package/dist/mint-components/p-925ccb31.system.entry.js +58 -0
  167. package/dist/mint-components/{p-7ee8a7ed.system.js → p-9c554ca0.system.js} +1 -1
  168. package/dist/mint-components/{p-75ae6fc0.entry.js → p-9d6dbb2d.entry.js} +1 -1
  169. package/dist/mint-components/p-9e4fee30.system.entry.js +1 -0
  170. package/dist/mint-components/{p-101fafa3.js → p-a2c3cff3.js} +1 -1
  171. package/dist/mint-components/{p-6acfe4a0.entry.js → p-a4c2c7ed.entry.js} +1 -1
  172. package/dist/mint-components/{p-f3ea7918.system.js → p-a6094ff9.system.js} +1 -1
  173. package/dist/mint-components/{p-25021e09.entry.js → p-ade44a4e.entry.js} +1 -1
  174. package/dist/mint-components/{p-be62004c.entry.js → p-b1bb07db.entry.js} +1 -1
  175. package/dist/mint-components/{p-d4fe6a69.system.js → p-b608f7a4.system.js} +1 -1
  176. package/dist/mint-components/{p-503192e9.entry.js → p-b8bd2607.entry.js} +1 -1
  177. package/dist/mint-components/{p-17e6fc02.system.entry.js → p-be2738b0.system.entry.js} +1 -1
  178. package/dist/mint-components/{p-b2cb66f5.system.js → p-c6114bfe.system.js} +1 -1
  179. package/dist/mint-components/{p-d5a00e40.system.entry.js → p-c79c608d.system.entry.js} +1 -1
  180. package/dist/mint-components/{p-1dd1105d.system.entry.js → p-cca9026f.system.entry.js} +1 -1
  181. package/dist/mint-components/p-cd410a05.entry.js +9 -0
  182. package/dist/mint-components/p-cdeae699.system.js +1 -0
  183. package/dist/mint-components/{p-232dddcc.system.entry.js → p-d174d0bc.system.entry.js} +1 -1
  184. package/dist/mint-components/{p-bafc60df.js → p-d21e0dbd.js} +1 -1
  185. package/dist/mint-components/{p-d5b84d6b.js → p-d35b0366.js} +1 -1
  186. package/dist/mint-components/{p-24d13567.js → p-db2e4c42.js} +1 -1
  187. package/dist/mint-components/{p-35103a1b.system.entry.js → p-dc603d08.system.entry.js} +1 -1
  188. package/dist/mint-components/{p-8a9966fc.system.js → p-e7f633b9.system.js} +1 -1
  189. package/dist/mint-components/p-f17050de.entry.js +1 -0
  190. package/dist/mint-components/{p-441119ee.js → p-f90486ca.js} +15 -15
  191. package/dist/mint-components/p-fce1dbf6.entry.js +1 -0
  192. package/dist/mint-components/p-fdb484a0.entry.js +392 -0
  193. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +9 -3
  194. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +158 -36
  195. package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +1 -0
  196. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -1
  197. package/dist/types/components/sqm-stencilbook/AutoColor.d.ts +1 -0
  198. package/dist/types/components/{sqm-task-card → sqm-stencilbook}/Matrix.d.ts +0 -0
  199. package/dist/types/components/sqm-stencilbook/Resizer.d.ts +3 -0
  200. package/dist/types/components/sqm-stencilbook/Themes.d.ts +16 -0
  201. package/dist/types/components/sqm-task-card/SVGs.d.ts +1 -0
  202. package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +4 -1
  203. package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +1 -0
  204. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -0
  205. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +5 -1
  206. package/dist/types/components.d.ts +8 -0
  207. package/grapesjs/grapesjs.js +1 -1
  208. package/package.json +4 -2
  209. package/dist/mint-components/p-024cc1be.system.entry.js +0 -1
  210. package/dist/mint-components/p-22d56623.entry.js +0 -9
  211. package/dist/mint-components/p-3098bb1b.system.entry.js +0 -1
  212. package/dist/mint-components/p-35ba4a8b.entry.js +0 -1
  213. package/dist/mint-components/p-51277d8e.system.entry.js +0 -1
  214. package/dist/mint-components/p-623e7f8c.entry.js +0 -335
  215. package/dist/mint-components/p-6410316b.entry.js +0 -1
  216. package/dist/mint-components/p-6cbb3a00.entry.js +0 -1
  217. package/dist/mint-components/p-853bd4bd.entry.js +0 -1
  218. package/dist/mint-components/p-85728f98.entry.js +0 -1
  219. package/dist/mint-components/p-8ec40f9a.entry.js +0 -1
  220. package/dist/mint-components/p-aa39d9c0.entry.js +0 -1
  221. package/dist/mint-components/p-dea06c92.entry.js +0 -1
  222. package/dist/mint-components/p-eb5aae94.entry.js +0 -1
  223. package/dist/mint-components/p-f7b80ac0.entry.js +0 -1
  224. package/dist/mint-components/p-f7d7e44d.system.js +0 -1
@@ -1,9 +1,11 @@
1
1
  import { h } from "@stencil/core";
2
- import { MatrixStory } from "./Matrix";
2
+ import { MatrixStory } from "../sqm-stencilbook/Matrix";
3
3
  import { TaskCardView } from "./sqm-task-card-view";
4
4
  import { ProgressBarView } from "./progress-bar/progress-bar-view";
5
5
  import scenarioTaskCard from "./sqm-task-card.feature";
6
6
  import scenarioProgressBar from "./progress-bar/progress-bar.feature";
7
+ import { DateTime } from "luxon";
8
+ import { Resizer } from "../sqm-stencilbook/Resizer";
7
9
  const scenario = scenarioTaskCard + scenarioProgressBar;
8
10
  export default {
9
11
  title: "Components/Task Card/",
@@ -37,6 +39,7 @@ const oneAction = {
37
39
  showExpiry: false,
38
40
  rewardDuration: null,
39
41
  loading: false,
42
+ finite: 0,
40
43
  };
41
44
  const coupleActions = {
42
45
  rewardAmount: 40,
@@ -54,6 +57,7 @@ const coupleActions = {
54
57
  showExpiry: false,
55
58
  rewardDuration: null,
56
59
  loading: false,
60
+ finite: 0,
57
61
  };
58
62
  const manyActions = {
59
63
  rewardAmount: 150,
@@ -71,6 +75,49 @@ const manyActions = {
71
75
  showExpiry: false,
72
76
  rewardDuration: null,
73
77
  loading: false,
78
+ finite: 0,
79
+ };
80
+ export const TaskCard = () => {
81
+ const expire = {
82
+ showExpiry: true,
83
+ rewardDuration: "2021-11-30T08:00:00.000Z/2021-12-01T08:00:00.000Z",
84
+ };
85
+ const expireRepeat = { ...expire, repeatable: true };
86
+ return (h("div", { style: storyFrame },
87
+ h(Resizer, null,
88
+ h("h4", null, "Not Repeatable"),
89
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 0 })),
90
+ " ",
91
+ h("h5", null),
92
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 })),
93
+ " ",
94
+ h("h5", null),
95
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 230 }))),
96
+ h(Resizer, null,
97
+ h("h4", null, "Repeatable"),
98
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 2, repeatable: true })),
99
+ " ",
100
+ h("h5", null),
101
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 7, repeatable: true })),
102
+ h("h5", null),
103
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 650, repeatable: true }))),
104
+ h(Resizer, null,
105
+ h("h4", null, "Complete"),
106
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 1 })),
107
+ " ",
108
+ h("h5", null),
109
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 })),
110
+ " ",
111
+ h("h5", null),
112
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }))),
113
+ h(Resizer, null,
114
+ h("h4", null, "Unavailable"),
115
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expireRepeat)),
116
+ " ",
117
+ h("h5", null),
118
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 3 }, expireRepeat)),
119
+ h("h5", null),
120
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 250 }, expireRepeat)))));
74
121
  };
75
122
  export const TaskCardNotRepeatable = () => {
76
123
  return (h("div", { style: storyFrame },
@@ -130,10 +177,51 @@ export const TaskCardRepeatable = () => {
130
177
  h(TaskCardView, Object.assign({}, manyActions, { progress: 1000, repeatable: true })),
131
178
  h("h5", null))));
132
179
  };
180
+ export const TaskCardRepeatableFinite = () => {
181
+ return (h("div", { style: storyFrame },
182
+ h("div", { style: resizable },
183
+ h("h4", null, "One Action"),
184
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 0, repeatable: true, finite: 2 })),
185
+ " ",
186
+ h("h5", null),
187
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 1, repeatable: true, finite: 2 })),
188
+ " ",
189
+ h("h5", null),
190
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 2, repeatable: true, finite: 2 })),
191
+ " ",
192
+ h("h5", null)),
193
+ h("div", { style: resizable },
194
+ h("h4", null, "A Couple Actions"),
195
+ h("h5", null)),
196
+ h("div", { style: resizable },
197
+ h("h4", null, "Many Actions"),
198
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 100, repeatable: true, finite: 2 })),
199
+ h("h5", null),
200
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 500, repeatable: true, finite: 2 })),
201
+ h("h5", null),
202
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 650, repeatable: true, finite: 2 })),
203
+ h("h5", null),
204
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 950, repeatable: true, finite: 2 })),
205
+ h("h5", null),
206
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 1000, repeatable: true, finite: 2 })),
207
+ h("h5", null),
208
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 1300, repeatable: true, finite: 3 })),
209
+ h("h5", null),
210
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 1500, repeatable: true, finite: 3 })),
211
+ h("h5", null),
212
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 2500, repeatable: true, finite: 3 })),
213
+ h("h5", null),
214
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 2500, repeatable: true, finite: 4 })),
215
+ h("h5", null),
216
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 2500, repeatable: true, finite: 5 })),
217
+ h("h5", null))));
218
+ };
133
219
  export const TaskCardEndDate = () => {
134
220
  const expire = {
135
221
  showExpiry: true,
136
- rewardDuration: "2021-12-01T08:00:00.000Z/2077-12-01T08:00:00.000Z",
222
+ rewardDuration: DateTime.now().minus({ days: 1 }).toISO() +
223
+ "/" +
224
+ DateTime.now().plus({ days: 1 }).toISO(),
137
225
  };
138
226
  const expireRepeat = { ...expire, repeatable: true };
139
227
  return (h("div", { style: storyFrame },
@@ -190,10 +278,60 @@ export const TaskCardLoading = () => {
190
278
  " ",
191
279
  h("h5", null))));
192
280
  };
193
- export const TaskCardUnavailable = () => {
281
+ export const TaskCardNotStarted = () => {
194
282
  const expire = {
195
283
  showExpiry: true,
196
- rewardDuration: "2021-11-30T08:00:00.000Z/2021-12-01T08:00:00.000Z",
284
+ rewardDuration: DateTime.now().plus({ days: 1 }).toISO() +
285
+ "/" +
286
+ DateTime.now().plus({ days: 2 }).toISO(),
287
+ };
288
+ const expireRepeat = { ...expire, repeatable: true };
289
+ return (h("div", { style: storyFrame },
290
+ h("div", { style: resizable },
291
+ h("h4", null, "One Action"),
292
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expire)),
293
+ " ",
294
+ h("h5", null),
295
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expire)),
296
+ " ",
297
+ h("h5", null),
298
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 0 }, expireRepeat)),
299
+ " ",
300
+ h("h5", null),
301
+ h(TaskCardView, Object.assign({}, oneAction, { progress: 1 }, expireRepeat)),
302
+ " ",
303
+ h("h5", null)),
304
+ h("div", { style: resizable },
305
+ h("h4", null, "A Couple Actions"),
306
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expire)),
307
+ " ",
308
+ h("h5", null),
309
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expire)),
310
+ " ",
311
+ h("h5", null),
312
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 1 }, expireRepeat)),
313
+ h("h5", null),
314
+ h(TaskCardView, Object.assign({}, coupleActions, { progress: 5 }, expireRepeat)),
315
+ h("h5", null)),
316
+ h("div", { style: resizable },
317
+ h("h4", null, "Many Actions"),
318
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expire)),
319
+ " ",
320
+ h("h5", null),
321
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expire)),
322
+ " ",
323
+ h("h5", null),
324
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 100 }, expireRepeat)),
325
+ h("h5", null),
326
+ h(TaskCardView, Object.assign({}, manyActions, { progress: 500 }, expireRepeat)),
327
+ h("h5", null))));
328
+ };
329
+ export const TaskCardEnded = () => {
330
+ const expire = {
331
+ showExpiry: true,
332
+ rewardDuration: DateTime.now().minus({ days: 2 }).toISO() +
333
+ "/" +
334
+ DateTime.now().minus({ days: 1 }).toISO(),
197
335
  };
198
336
  const expireRepeat = { ...expire, repeatable: true };
199
337
  return (h("div", { style: storyFrame },
@@ -1,7 +1,8 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const gift = () => {
3
- return (h("svg", { width: 16, height: 16, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
- h("path", { d: "M15 5H9v11h4.5a1 1 0 001-1V9h.5a1 1 0 001-1V6a1 1 0 00-1-1zM1.5 9v6a1 1 0 001 1H7V5H1a1 1 0 00-1 1v2a1 1 0 001 1h.5z", fill: "var(--sl-color-primary-200)" }),
5
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9v1h13V9h-13z", fill: "var(--sl-color-primary-300)" }),
6
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.71c0 .886-1.33 2.227-2 2.29H9v11H7.002V5H4.588C3.212 4.702 2 3.645 2 2.52 2 1.426 2.476.558 3.342.183 4.169-.176 5.125.02 5.88.545c.927.643 1.447 1.851 1.919 2.947l.123.286.12-.272C8.51 2.45 9.045 1.243 9.94.596c.793-.573 1.801-.79 2.672-.397.9.405 1.388 1.336 1.388 2.51zM10.612 1.5c.48-.347 1.056-.41 1.548 0 .428.357.45.525.506.93l.01.07c0 .599-.516 1.5-1.032 1.5-.366 0-.653-.003-.922-.006-.49-.005-.92-.01-1.657.006.14-.272.252-.533.36-.782.285-.667.534-1.246 1.187-1.718zm-5.673 0c-.233-.161-.766-.09-.987.006-.183.08-.456.32-.456 1.015 0 .674 1.092 1.257 1.092 1.257S5.454 4 7.002 4c-.527-1.305-1.273-1.951-2.063-2.5z", fill: "var(--sl-color-primary-600)" })));
3
+ return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
+ h("path", { d: "M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z", fill: "#F2C94C" }),
5
+ h("path", { d: "M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z", fill: "#F2C94C" }),
6
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9V10H14.5V9H1.5Z", fill: "#BE9720" }),
7
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#EB5757" })));
7
8
  };
@@ -3,14 +3,13 @@ import jss from "jss";
3
3
  import preset from "jss-preset-default";
4
4
  import * as SVGs from "./SVGs";
5
5
  export function ProgressBarView(props) {
6
- const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, } = props;
7
- console.log("progress bar props", props);
6
+ const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
7
+ // console.log("progress bar props", props);
8
8
  const gift1 = SVGs.gift();
9
9
  const gift2 = SVGs.gift();
10
10
  const gift3 = SVGs.gift();
11
11
  var items = [];
12
12
  var columns = "";
13
- var repetitions = Math.floor(progress / goal);
14
13
  if (repeatable) {
15
14
  if (steps) {
16
15
  addStepsRepeatable();
@@ -31,12 +30,12 @@ export function ProgressBarView(props) {
31
30
  const style = {
32
31
  ProgressBar: {
33
32
  "& .progress-bar": {
34
- height: "15px",
33
+ height: "0",
35
34
  marginTop: steps
36
35
  ? "var(--sl-spacing-medium)"
37
36
  : "var(--sl-spacing-large)",
38
37
  filter: expired ? "grayscale(1)" : "",
39
- marginBottom: "var(--sl-spacing-xx-large)",
38
+ marginBottom: "var(--sl-spacing-xxx-large)",
40
39
  marginRight: "var(--sl-spacing-x-small)",
41
40
  fontSize: "var(--sl-font-size-x-small)",
42
41
  display: "grid",
@@ -141,7 +140,10 @@ export function ProgressBarView(props) {
141
140
  const styleString = sheet.toString();
142
141
  return (h("div", { class: sheet.classes.ProgressBar },
143
142
  h("style", { type: "text/css" }, styleString),
144
- h("div", { class: repetitions > 1 ? "progress-bar repeatable-steps" : "progress-bar" }, items)));
143
+ h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
144
+ (Boolean(finite) && progress > 2 * goal)
145
+ ? "progress-bar repeatable-steps"
146
+ : "progress-bar" }, items)));
145
147
  function clamp(x, min, max) {
146
148
  return Math.min(Math.max(x, min), max);
147
149
  }
@@ -214,6 +216,23 @@ export function ProgressBarView(props) {
214
216
  items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
215
217
  items.push(h("div", { class: "gift bw" }, gift2));
216
218
  }
219
+ // finite repetition hit
220
+ else if (finite && repetitions >= finite) {
221
+ if (repetitions > 2) {
222
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
223
+ items.push(h("div", { class: "gift start" }, gift1));
224
+ columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
225
+ }
226
+ else {
227
+ columns = "0.5fr 0fr 0fr 0.5fr 0fr 0fr";
228
+ }
229
+ items.push(h("div", { class: "filled" }));
230
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
231
+ items.push(h("div", { class: "gift" }, gift2));
232
+ items.push(h("div", { class: "filled" }));
233
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
234
+ items.push(h("div", { class: "gift" }, gift3));
235
+ }
217
236
  // multiple repetitions
218
237
  else {
219
238
  columns =
@@ -6,29 +6,27 @@ import * as SVGs from "./SVGs";
6
6
  import { ProgressBarView, } from "./progress-bar/progress-bar-view";
7
7
  import { DateTime } from "luxon";
8
8
  export function TaskCardView(props) {
9
- console.log({ props });
9
+ // console.log({ props });
10
10
  const checkmark_circle = SVGs.checkmark_circle();
11
+ const checkmark_filled = SVGs.checkmark_filled();
11
12
  const arrow_left_right = SVGs.arrow_left_right();
12
13
  const style = {
13
14
  HostBlock: HostBlock,
14
15
  TaskCard: {
15
- "& .main > div": {
16
- margin: "var(--sl-spacing-medium)",
17
- },
18
16
  "& .main": {
19
17
  position: "relative",
20
18
  boxSizing: "border-box",
21
19
  minWidth: "347px",
22
20
  background: "var(--sl-color-neutral-0)",
23
- border: "1px solid var(--sl-color-neutral-300)",
24
- borderRadius: "var(--sl-border-radius-medium)",
21
+ border: "1px solid var(--sl-color-neutral-200)",
22
+ borderRadius: "var(--sl-border-radius-large)",
25
23
  fontSize: "var(--sl-font-size-small)",
26
24
  lineHeight: "var(--sl-line-height-dense)",
27
25
  color: "var(--sl-color-neutral-600)",
28
26
  },
29
27
  "& .main.complete": {
30
- background: "var(--sl-color-success-50)",
31
- borderColor: "var(--sl-color-success-700)",
28
+ background: "var(--sl-color-primary-50)",
29
+ borderColor: "var(--sl-color-primary-500)",
32
30
  },
33
31
  "& .main.expired": {
34
32
  color: "var(--sl-color-neutral-400)",
@@ -37,17 +35,30 @@ export function TaskCardView(props) {
37
35
  "& .title": {
38
36
  fontSize: "var(--sl-font-size-small)",
39
37
  fontWeight: "var(--sl-font-weight-semibold)",
38
+ color: "var(--sl-color-neutral-950)",
39
+ },
40
+ "& .container": {
41
+ margin: "var(--sl-spacing-medium)",
40
42
  },
41
- "& .black": {
42
- color: "var(--sl-color-neutral-1000)",
43
+ "& .container.subdued": {
44
+ opacity: "0.66",
43
45
  },
46
+ "& .container > div": {
47
+ margin: "var(--sl-spacing-medium) 0",
48
+ },
49
+ },
50
+ Expired: {
51
+ margin: "var(--sl-spacing-medium)",
52
+ marginBottom: "calc(var(--sl-spacing-x-small)*-1)",
53
+ color: "var(--sl-color-warning-500)",
54
+ fontWeight: "var(--sl-font-weight-semibold)",
44
55
  },
45
56
  Header: {
46
57
  display: "flex",
47
58
  "& .icon": {
48
59
  alignSelf: "center",
49
60
  lineHeight: "0",
50
- color: "var(--sl-color-success-700)",
61
+ color: "var(--sl-color-primary-400)",
51
62
  fontSize: "var(--sl-font-size-large)",
52
63
  marginRight: "var(--sl-spacing-x-small)",
53
64
  },
@@ -55,6 +66,7 @@ export function TaskCardView(props) {
55
66
  alignSelf: "center",
56
67
  fontSize: "var(--sl-font-size-x-large)",
57
68
  fontWeight: "var(--sl-font-weight-semibold)",
69
+ color: "var(--sl-color-neutral-950)",
58
70
  lineHeight: "100%",
59
71
  marginRight: "var(--sl-spacing-xx-small)",
60
72
  },
@@ -62,6 +74,7 @@ export function TaskCardView(props) {
62
74
  alignSelf: "end",
63
75
  textTransform: "uppercase",
64
76
  fontSize: "var(--sl-font-size-x-small)",
77
+ color: "var(--sl-color-neutral-950)",
65
78
  lineHeight: "var(--sl-font-size-medium)",
66
79
  marginRight: "var(--sl-spacing-xx-small)",
67
80
  },
@@ -70,9 +83,6 @@ export function TaskCardView(props) {
70
83
  fontWeight: "var(--sl-font-weight-semibold)",
71
84
  marginBottom: "var(--sl-spacing-xx-small)",
72
85
  },
73
- "& .black": {
74
- color: "var(--sl-color-neutral-1000)",
75
- },
76
86
  "& .neutral": {
77
87
  color: "var(--sl-color-neutral-400)",
78
88
  },
@@ -82,6 +92,7 @@ export function TaskCardView(props) {
82
92
  "& .icon": {
83
93
  fontSize: "var(--sl-font-size-xx-small)",
84
94
  marginRight: "var(--sl-spacing-xx-small)",
95
+ verticalAlign: "bottom",
85
96
  },
86
97
  "& .text": {
87
98
  marginTop: "auto",
@@ -89,7 +100,7 @@ export function TaskCardView(props) {
89
100
  fontSize: "var(--sl-font-size-x-small)",
90
101
  },
91
102
  "& .success": {
92
- color: "var(--sl-color-success-600)",
103
+ color: "var(--sl-color-primary-500)",
93
104
  fontWeight: "var(--sl-font-weight-semibold)",
94
105
  },
95
106
  "& .action": {
@@ -100,6 +111,10 @@ export function TaskCardView(props) {
100
111
  borderRadius: "var(--sl-border-radius-medium)",
101
112
  },
102
113
  "&.disabled::part(base)": {
114
+ border: "1px solid var(--sl-color-primary-400)",
115
+ background: "var(--sl-color-primary-400)",
116
+ },
117
+ "&.neutral::part(base)": {
103
118
  border: "1px solid var(--sl-color-neutral-400)",
104
119
  background: "var(--sl-color-neutral-400)",
105
120
  },
@@ -119,8 +134,11 @@ export function TaskCardView(props) {
119
134
  const dateStart = props.showExpiry && DateTime.fromISO(props.rewardDuration.split("/")[0]);
120
135
  const dateEnd = props.showExpiry && DateTime.fromISO(props.rewardDuration.split("/")[1]);
121
136
  const dateToday = DateTime.now();
122
- const taskComplete = showComplete && props.repeatable === false;
123
- const taskUnavailable = props.showExpiry && (dateEnd < dateToday || dateToday < dateStart);
137
+ const taskComplete = (showComplete && props.repeatable === false) ||
138
+ (props.finite && props.progress >= props.finite * props.goal);
139
+ const taskEnded = props.showExpiry && dateEnd <= dateToday;
140
+ const taskNotStarted = props.showExpiry && dateToday <= dateStart;
141
+ const taskUnavailable = taskEnded || taskNotStarted;
124
142
  return (h("div", { class: sheet.classes.TaskCard },
125
143
  h("div", { class: taskUnavailable
126
144
  ? "main expired"
@@ -128,34 +146,43 @@ export function TaskCardView(props) {
128
146
  ? "main complete"
129
147
  : "main" },
130
148
  h("style", { type: "text/css" }, styleString),
131
- h("div", { class: sheet.classes.Header }, props.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0", height: "12px" } })) : (h("div", null,
132
- taskUnavailable && (h("div", { class: "end" }, "Available " +
133
- dateStart.toLocaleString(DateTime.DATE_MED).split(",")[0] +
134
- " - " +
135
- dateEnd.toLocaleString(DateTime.DATE_MED).split(",")[0])),
136
- showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, checkmark_circle)),
137
- h("span", { class: taskUnavailable ? "value" : "value black" }, props.rewardAmount),
138
- h("span", { class: "text" }, props.rewardUnit)))),
139
- props.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "0 16px", height: "12px" } })) : (h("div", { class: taskUnavailable ? "title" : "title black" }, props.cardTitle)),
140
- props.loading ? (h("sl-skeleton", { style: { margin: "12px 16px", height: "12px" } })) : (h(Details, Object.assign({}, props))),
141
- props.showProgressBar && props.loading ? (h("sl-skeleton", { style: { margin: "0 16px", height: "12px" } })) : (props.showProgressBar && (h(ProgressBarView, Object.assign({}, props, { complete: taskComplete, expired: taskUnavailable })))),
142
- h("div", { class: sheet.classes.Footer }, props.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto", height: "12px" } })) : (h("div", { style: { display: "contents" } },
143
- h("span", { class: "text" },
144
- props.repeatable && (h("div", null,
145
- h("span", { class: repetitions > 0
146
- ? taskUnavailable
147
- ? "icon neutral"
148
- : "icon success"
149
- : "icon" }, arrow_left_right),
150
- h("span", { class: repetitions > 0
151
- ? taskUnavailable
152
- ? "neutral"
153
- : "success"
154
- : "" }, "Completed " + repetitions + " times"))),
155
- props.showExpiry && !taskUnavailable && (h("span", null, "Ends " + dateEnd.toLocaleString(DateTime.DATE_FULL)))),
156
- h("sl-button", { class: taskComplete || taskUnavailable ? "action disabled" : "action", type: "primary", size: "small", onClick: () => props.openNewTab
157
- ? window.open(props.buttonLink)
158
- : window.open(props.buttonLink, "_self"), disabled: taskComplete || taskUnavailable }, props.buttonText)))))));
149
+ taskUnavailable && (h("div", { class: sheet.classes.Expired }, taskEnded
150
+ ? "Ended " + dateEnd.toLocaleString(DateTime.DATE_MED)
151
+ : "Starts " + dateStart.toLocaleString(DateTime.DATE_MED))),
152
+ h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
153
+ h("div", { class: sheet.classes.Header }, props.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
154
+ showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled : checkmark_circle)),
155
+ h("span", { class: taskUnavailable ? "value black" : "value black" }, props.rewardAmount),
156
+ h("span", { class: "text" }, props.rewardUnit)))),
157
+ props.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (h("div", { class: taskUnavailable ? "title black" : "title black" }, props.cardTitle)),
158
+ props.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (h(Details, Object.assign({}, props))),
159
+ props.showProgressBar && props.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (props.showProgressBar && (h(ProgressBarView, Object.assign({}, props, { complete: taskComplete, expired: taskUnavailable })))),
160
+ h("div", { class: sheet.classes.Footer }, props.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
161
+ h("span", { class: "text" },
162
+ props.repeatable && (h("div", null,
163
+ h("span", { class: repetitions > 0
164
+ ? taskUnavailable
165
+ ? "icon neutral"
166
+ : "icon success"
167
+ : "icon" }, arrow_left_right),
168
+ h("span", { class: repetitions > 0
169
+ ? taskUnavailable
170
+ ? "neutral"
171
+ : "success"
172
+ : "" }, "Completed " +
173
+ (props.finite
174
+ ? Math.min(repetitions, props.finite)
175
+ : repetitions) +
176
+ (props.finite ? "/" + props.finite : "") +
177
+ " times"))),
178
+ props.showExpiry && !taskUnavailable && (h("span", null, "Ends " + dateEnd.toLocaleString(DateTime.DATE_FULL)))),
179
+ h("sl-button", { class: taskUnavailable
180
+ ? "action neutral"
181
+ : taskComplete
182
+ ? "action disabled"
183
+ : "action", type: "primary", size: "small", onClick: () => props.openNewTab
184
+ ? window.open(props.buttonLink)
185
+ : window.open(props.buttonLink, "_parent"), disabled: taskComplete || taskUnavailable }, props.buttonText))))))));
159
186
  }
160
187
  function Details(props) {
161
188
  const style = {
@@ -182,10 +209,10 @@ function Details(props) {
182
209
  transition: "all var(--sl-transition-medium) ease",
183
210
  maxHeight: "300px",
184
211
  marginBottom: props.steps
185
- ? "var(--sl-spacing-large)"
212
+ ? "var(--sl-spacing-x-large)"
186
213
  : props.showProgressBar
187
214
  ? "var(--sl-spacing-xx-large)"
188
- : "var(--sl-spacing-large)",
215
+ : "var(--sl-spacing-x-large)",
189
216
  },
190
217
  "& .summary": {
191
218
  display: "block",
@@ -7,7 +7,7 @@ import { useDemoBigStat } from "../sqm-big-stat/useDemoBigStat";
7
7
  import { TaskCardView } from "./sqm-task-card-view";
8
8
  /**
9
9
  * @uiName Task Card
10
- * @uiOrder ["reward-amount", "reward-unit", "card-title", "description", "repeatable", "show-progress-bar", "stat-type", "progress-source", "goal", "steps", "progress-bar-unit", "show-expiry", "reward-duration", "button-text", "button-link", "open-new-tab"]
10
+ * @uiOrder ["reward-amount", "reward-unit", "card-title", "description", "repeatable", "finite", "show-progress-bar", "stat-type", "progress-source", "goal", "steps", "progress-bar-unit", "show-expiry", "reward-duration", "button-text", "button-link", "open-new-tab"]
11
11
  */
12
12
  export class TaskCard {
13
13
  constructor() {
@@ -32,6 +32,10 @@ export class TaskCard {
32
32
  * @uiName Goal Repeatable
33
33
  */
34
34
  this.repeatable = false;
35
+ /**
36
+ * @uiName Repeat Amount (0 for no limit)
37
+ */
38
+ this.finite = 0;
35
39
  /**
36
40
  * @uiName Show Progress Bar
37
41
  */
@@ -191,6 +195,27 @@ export class TaskCard {
191
195
  "reflect": false,
192
196
  "defaultValue": "false"
193
197
  },
198
+ "finite": {
199
+ "type": "number",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "number",
203
+ "resolved": "number",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": false,
208
+ "docs": {
209
+ "tags": [{
210
+ "text": "Repeat Amount (0 for no limit)",
211
+ "name": "uiName"
212
+ }],
213
+ "text": ""
214
+ },
215
+ "attribute": "finite",
216
+ "reflect": false,
217
+ "defaultValue": "0"
218
+ },
194
219
  "showProgressBar": {
195
220
  "type": "boolean",
196
221
  "mutable": false,
@@ -1,5 +1,5 @@
1
1
  import { h, g as getElement } from './index-17b4da69.js';
2
- import { d as dist, M, T, e as en } from './index.module-9b5bb6a2.js';
2
+ import { d as dist, M, T, e as en } from './index.module-90d2c3ad.js';
3
3
 
4
4
  function LeaderboardView(props) {
5
5
  var _a;
@@ -1,5 +1,5 @@
1
1
  import { g as getAugmentedNamespace, c as createCommonjsModule, a as commonjsGlobal, b as browser, l as l$1 } from './extends-3a3f9fe2.js';
2
- import { s as src, m as memoize, S } from './index.module-9b5bb6a2.js';
2
+ import { s as src, m as memoize, S } from './index.module-90d2c3ad.js';
3
3
 
4
4
  var __assign = (undefined && undefined.__assign) || function () {
5
5
  __assign = Object.assign || function(t) {