@saasquatch/mint-components 1.15.0-5 → 1.15.0-7
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.
- package/dist/cjs/{ShadowViewAddon-3f11bc68.js → ShadowViewAddon-e666dc8b.js} +197 -213
- package/dist/cjs/{copy-text-view-c85acaaa.js → copy-text-view-7441206d.js} +53 -38
- package/dist/cjs/{global-261393c6.js → global-124aec2c.js} +21 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +2 -2
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +59 -6
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-8b950046.js → sqm-invoice-table-view-f369b0a6.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-8d5b23f3.js → sqm-portal-email-verification-view-f5ce25cc.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-fcb3ea3f.js → sqm-portal-profile-view-07d13061.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +19 -6
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +6 -2
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +77 -2
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +1 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +139 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +12 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +138 -3
- package/dist/collection/components/sqm-task-card/DetailsView.js +1 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +139 -155
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +146 -0
- package/dist/collection/components/sqm-task-card/useTaskCard.js +10 -0
- package/dist/collection/components/views/copy-text-view.js +53 -38
- package/dist/collection/global/styles.js +21 -9
- package/dist/collection/global/styles.ts +21 -9
- package/dist/esm/{ShadowViewAddon-f5791215.js → ShadowViewAddon-7c10e0ee.js} +197 -213
- package/dist/esm/{copy-text-view-782137ba.js → copy-text-view-717050d5.js} +53 -38
- package/dist/esm/{global-7b65dcb8.js → global-6dc825bc.js} +21 -9
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_17.entry.js +2 -2
- package/dist/esm/sqm-big-stat_41.entry.js +59 -6
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-0f0a7386.js → sqm-invoice-table-view-1bd8afaa.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-3bd4f1d9.js → sqm-portal-email-verification-view-d96d6c43.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-3a751a15.js → sqm-portal-profile-view-4ce1c7c3.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +19 -6
- package/dist/esm-es5/ShadowViewAddon-7c10e0ee.js +1 -0
- package/dist/esm-es5/copy-text-view-717050d5.js +1 -0
- package/dist/esm-es5/{global-7b65dcb8.js → global-6dc825bc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-0f0a7386.js → sqm-invoice-table-view-1bd8afaa.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-3bd4f1d9.js → sqm-portal-email-verification-view-d96d6c43.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-3a751a15.js → sqm-portal-profile-view-4ce1c7c3.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/global/styles.ts +21 -9
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-aa3c81d3.system.js → p-11519322.system.js} +1 -1
- package/dist/mint-components/{p-c2ab40ae.system.entry.js → p-11542862.system.entry.js} +1 -1
- package/dist/mint-components/{p-8f603753.system.entry.js → p-208d8d75.system.entry.js} +1 -1
- package/dist/mint-components/{p-a4eb4b81.entry.js → p-2c07df76.entry.js} +1 -1
- package/dist/mint-components/{p-7127a230.js → p-3a49811c.js} +1 -1
- package/dist/mint-components/{p-fbfbbbd2.system.js → p-44a82cf3.system.js} +1 -1
- package/dist/mint-components/p-4874193a.system.js +1 -0
- package/dist/mint-components/{p-ebdf906a.entry.js → p-49deb225.entry.js} +1 -1
- package/dist/mint-components/{p-4b626c19.entry.js → p-4dbe2d08.entry.js} +1 -1
- package/dist/mint-components/{p-4ae5ac59.entry.js → p-51495bc3.entry.js} +1 -1
- package/dist/mint-components/{p-c0b52238.entry.js → p-619c2aa3.entry.js} +1 -1
- package/dist/mint-components/{p-c53b8fe7.entry.js → p-6f34c2c2.entry.js} +2 -2
- package/dist/mint-components/{p-5c2d9a52.entry.js → p-734695a0.entry.js} +1 -1
- package/dist/mint-components/{p-e4fd9966.entry.js → p-7f1e10d3.entry.js} +2 -2
- package/dist/mint-components/{p-383d8c5a.system.entry.js → p-837dbf90.system.entry.js} +1 -1
- package/dist/mint-components/p-8c12078e.js +394 -0
- package/dist/mint-components/{p-2e4129e0.system.entry.js → p-90421929.system.entry.js} +1 -1
- package/dist/mint-components/{p-10ed0483.system.entry.js → p-9209a016.system.entry.js} +1 -1
- package/dist/mint-components/{p-646cfbd5.system.js → p-93fed35b.system.js} +1 -1
- package/dist/mint-components/{p-05255c61.system.js → p-95ae4ab9.system.js} +1 -1
- package/dist/mint-components/{p-fa630b25.system.entry.js → p-a37541ae.system.entry.js} +1 -1
- package/dist/mint-components/{p-32d5cbc1.js → p-abefb7cc.js} +1 -1
- package/dist/mint-components/{p-7e8bf5cb.system.entry.js → p-ad985d37.system.entry.js} +1 -1
- package/dist/mint-components/{p-c07551c4.system.entry.js → p-bb3f1257.system.entry.js} +1 -1
- package/dist/mint-components/p-bdbbc673.system.entry.js +1 -0
- package/dist/mint-components/{p-15d20bf9.entry.js → p-c0d839d0.entry.js} +11 -11
- package/dist/mint-components/p-c3680c02.js +1 -0
- package/dist/mint-components/{p-5c0576c0.system.entry.js → p-c6841ab8.system.entry.js} +1 -1
- package/dist/mint-components/{p-f25f3d2a.system.entry.js → p-cd63a965.system.entry.js} +1 -1
- package/dist/mint-components/{p-cde752fa.js → p-cf8677ea.js} +1 -1
- package/dist/mint-components/{p-22f374db.entry.js → p-d3e5704c.entry.js} +1 -1
- package/dist/mint-components/p-d8cf46ba.system.js +1 -0
- package/dist/mint-components/{p-ae473175.js → p-e01fe915.js} +12 -12
- package/dist/mint-components/{p-9dd8c93b.system.js → p-ed11966d.system.js} +1 -1
- package/dist/mint-components/{p-ec7d2a85.entry.js → p-eda5e82c.entry.js} +1 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +3 -0
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +19 -2
- package/dist/types/components/sqm-share-code/sqm-share-code.d.ts +34 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +1 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +34 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +5 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +32 -0
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +9 -0
- package/dist/types/components/views/copy-text-view.d.ts +5 -0
- package/dist/types/components.d.ts +236 -4
- package/dist/types/global/styles.d.ts +1 -1
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-f5791215.js +0 -1
- package/dist/esm-es5/copy-text-view-782137ba.js +0 -1
- package/dist/mint-components/p-31015791.js +0 -1
- package/dist/mint-components/p-3708a40b.system.js +0 -1
- package/dist/mint-components/p-3b90e01b.system.js +0 -1
- package/dist/mint-components/p-97ccee03.system.entry.js +0 -1
- package/dist/mint-components/p-acf93efa.js +0 -394
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -37,13 +37,23 @@ export class ShareLink {
|
|
|
37
37
|
* @uiName Copy button label
|
|
38
38
|
*/
|
|
39
39
|
this.copyButtonLabel = "Copy Link";
|
|
40
|
+
/**
|
|
41
|
+
* The type of the button (primary or secondary) that will be used to copy the link.
|
|
42
|
+
* @uiName Button Type
|
|
43
|
+
* @uiType string
|
|
44
|
+
* @uiEnum ["primary", "secondary"]
|
|
45
|
+
* @uiEnumNames ["Primary", "Secondary"]
|
|
46
|
+
* @uiGroup Style
|
|
47
|
+
*/
|
|
48
|
+
this.buttonType = "primary";
|
|
40
49
|
/**
|
|
41
50
|
* Set the copy button style and placement
|
|
42
51
|
*
|
|
43
|
-
* @uiName
|
|
52
|
+
* @uiName Button style
|
|
44
53
|
* @uiType string
|
|
45
54
|
* @uiEnum ["icon", "button-outside", "button-below"]
|
|
46
55
|
* @uiEnumNames ["Icon", "Button outside", "Button below"]
|
|
56
|
+
* @uiGroup Style
|
|
47
57
|
*/
|
|
48
58
|
this.buttonStyle = "icon";
|
|
49
59
|
withHooks(this);
|
|
@@ -175,6 +185,123 @@ export class ShareLink {
|
|
|
175
185
|
"reflect": false,
|
|
176
186
|
"defaultValue": "\"Copy Link\""
|
|
177
187
|
},
|
|
188
|
+
"backgroundColor": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"mutable": false,
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "string",
|
|
193
|
+
"resolved": "string",
|
|
194
|
+
"references": {}
|
|
195
|
+
},
|
|
196
|
+
"required": false,
|
|
197
|
+
"optional": true,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [{
|
|
200
|
+
"text": "Background color",
|
|
201
|
+
"name": "uiName"
|
|
202
|
+
}, {
|
|
203
|
+
"text": "color",
|
|
204
|
+
"name": "uiWidget"
|
|
205
|
+
}, {
|
|
206
|
+
"text": "color",
|
|
207
|
+
"name": "format"
|
|
208
|
+
}, {
|
|
209
|
+
"text": "Style",
|
|
210
|
+
"name": "uiGroup"
|
|
211
|
+
}],
|
|
212
|
+
"text": "Background color of share link container"
|
|
213
|
+
},
|
|
214
|
+
"attribute": "background-color",
|
|
215
|
+
"reflect": false
|
|
216
|
+
},
|
|
217
|
+
"textColor": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"mutable": false,
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "string",
|
|
222
|
+
"resolved": "string",
|
|
223
|
+
"references": {}
|
|
224
|
+
},
|
|
225
|
+
"required": false,
|
|
226
|
+
"optional": true,
|
|
227
|
+
"docs": {
|
|
228
|
+
"tags": [{
|
|
229
|
+
"text": "Text color",
|
|
230
|
+
"name": "uiName"
|
|
231
|
+
}, {
|
|
232
|
+
"text": "color",
|
|
233
|
+
"name": "uiWidget"
|
|
234
|
+
}, {
|
|
235
|
+
"text": "color",
|
|
236
|
+
"name": "format"
|
|
237
|
+
}, {
|
|
238
|
+
"text": "Style",
|
|
239
|
+
"name": "uiGroup"
|
|
240
|
+
}],
|
|
241
|
+
"text": "Color of the text and copy icon"
|
|
242
|
+
},
|
|
243
|
+
"attribute": "text-color",
|
|
244
|
+
"reflect": false
|
|
245
|
+
},
|
|
246
|
+
"borderRadius": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"mutable": false,
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "string",
|
|
251
|
+
"resolved": "string",
|
|
252
|
+
"references": {}
|
|
253
|
+
},
|
|
254
|
+
"required": false,
|
|
255
|
+
"optional": true,
|
|
256
|
+
"docs": {
|
|
257
|
+
"tags": [{
|
|
258
|
+
"text": "Border Radius",
|
|
259
|
+
"name": "uiName"
|
|
260
|
+
}, {
|
|
261
|
+
"text": "number",
|
|
262
|
+
"name": "uiType"
|
|
263
|
+
}, {
|
|
264
|
+
"text": "Style",
|
|
265
|
+
"name": "uiGroup"
|
|
266
|
+
}],
|
|
267
|
+
"text": "The border radius on the share link container"
|
|
268
|
+
},
|
|
269
|
+
"attribute": "border-radius",
|
|
270
|
+
"reflect": false
|
|
271
|
+
},
|
|
272
|
+
"buttonType": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"mutable": false,
|
|
275
|
+
"complexType": {
|
|
276
|
+
"original": "\"primary\" | \"secondary\"",
|
|
277
|
+
"resolved": "\"primary\" | \"secondary\"",
|
|
278
|
+
"references": {}
|
|
279
|
+
},
|
|
280
|
+
"required": false,
|
|
281
|
+
"optional": true,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [{
|
|
284
|
+
"text": "Button Type",
|
|
285
|
+
"name": "uiName"
|
|
286
|
+
}, {
|
|
287
|
+
"text": "string",
|
|
288
|
+
"name": "uiType"
|
|
289
|
+
}, {
|
|
290
|
+
"text": "[\"primary\", \"secondary\"]",
|
|
291
|
+
"name": "uiEnum"
|
|
292
|
+
}, {
|
|
293
|
+
"text": "[\"Primary\", \"Secondary\"]",
|
|
294
|
+
"name": "uiEnumNames"
|
|
295
|
+
}, {
|
|
296
|
+
"text": "Style",
|
|
297
|
+
"name": "uiGroup"
|
|
298
|
+
}],
|
|
299
|
+
"text": "The type of the button (primary or secondary) that will be used to copy the link."
|
|
300
|
+
},
|
|
301
|
+
"attribute": "button-type",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "\"primary\""
|
|
304
|
+
},
|
|
178
305
|
"buttonStyle": {
|
|
179
306
|
"type": "string",
|
|
180
307
|
"mutable": false,
|
|
@@ -187,7 +314,7 @@ export class ShareLink {
|
|
|
187
314
|
"optional": true,
|
|
188
315
|
"docs": {
|
|
189
316
|
"tags": [{
|
|
190
|
-
"text": "
|
|
317
|
+
"text": "Button style",
|
|
191
318
|
"name": "uiName"
|
|
192
319
|
}, {
|
|
193
320
|
"text": "string",
|
|
@@ -198,6 +325,9 @@ export class ShareLink {
|
|
|
198
325
|
}, {
|
|
199
326
|
"text": "[\"Icon\", \"Button outside\", \"Button below\"]",
|
|
200
327
|
"name": "uiEnumNames"
|
|
328
|
+
}, {
|
|
329
|
+
"text": "Style",
|
|
330
|
+
"name": "uiGroup"
|
|
201
331
|
}],
|
|
202
332
|
"text": "Set the copy button style and placement"
|
|
203
333
|
},
|
|
@@ -210,7 +340,7 @@ export class ShareLink {
|
|
|
210
340
|
"mutable": false,
|
|
211
341
|
"complexType": {
|
|
212
342
|
"original": "DemoData<CopyTextViewProps>",
|
|
213
|
-
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
|
|
343
|
+
"resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; backgroundColor?: string; textColor?: string; borderRadius?: string; buttonType?: \"primary\" | \"secondary\"; borderColor?: string; onClick?: () => void; }",
|
|
214
344
|
"references": {
|
|
215
345
|
"DemoData": {
|
|
216
346
|
"location": "import",
|
|
@@ -245,7 +375,12 @@ function useDemoShareLink(props) {
|
|
|
245
375
|
tooltiptext: props.tooltiptext,
|
|
246
376
|
textAlign: props.textAlign,
|
|
247
377
|
buttonStyle: props.buttonStyle,
|
|
378
|
+
backgroundColor: props.backgroundColor,
|
|
379
|
+
textColor: props.textColor,
|
|
380
|
+
borderRadius: props.borderRadius,
|
|
381
|
+
buttonType: props.buttonType,
|
|
248
382
|
copyButtonLabel: props.copyButtonLabel,
|
|
383
|
+
// borderColor: props.borderColor,
|
|
249
384
|
rewardStatus: "AVAILABLE",
|
|
250
385
|
open,
|
|
251
386
|
onClick: () => {
|
|
@@ -12,7 +12,7 @@ export const style = {
|
|
|
12
12
|
position: "absolute",
|
|
13
13
|
top: "var(--sl-spacing-medium)",
|
|
14
14
|
right: "var(--sl-spacing-medium)",
|
|
15
|
-
color: "var(--
|
|
15
|
+
color: "var(--sqm-text)",
|
|
16
16
|
fontSize: "var(--sl-font-size-large)",
|
|
17
17
|
"& :hover": {
|
|
18
18
|
color: "var(--sl-color-primary-700)",
|
|
@@ -6,165 +6,151 @@ import { luxonLocale } from "../../utils/utils";
|
|
|
6
6
|
import { Details } from "./DetailsView";
|
|
7
7
|
import { ProgressBarView } from "./progress-bar/progress-bar-view";
|
|
8
8
|
import * as SVGs from "./SVGs";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
color: "var(--sl-color-primary-600)",
|
|
50
|
-
border: "1px solid var(--sl-color-neutral-200)",
|
|
51
|
-
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
52
|
-
borderBottom: "none",
|
|
53
|
-
background: "var(--sl-color-primary-50)",
|
|
54
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
55
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
56
|
-
"& .icon": {
|
|
57
|
-
position: "relative",
|
|
58
|
-
top: "0.1em",
|
|
59
|
-
marginRight: "var(--sl-spacing-small)",
|
|
60
|
-
color: "var(--sl-color-primary-500)",
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
Ended: {
|
|
64
|
-
fontSize: "var(--sl-font-size-small)",
|
|
65
|
-
padding: "var(--sl-spacing-medium)",
|
|
66
|
-
color: "var(--sl-color-warning-600)",
|
|
67
|
-
border: "1px solid var(--sl-color-neutral-200)",
|
|
68
|
-
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
69
|
-
borderBottom: "none",
|
|
70
|
-
background: "var(--sl-color-warning-50)",
|
|
71
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
72
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
73
|
-
"& .icon": {
|
|
74
|
-
position: "relative",
|
|
75
|
-
top: "0.1em",
|
|
76
|
-
marginRight: "var(--sl-spacing-small)",
|
|
77
|
-
color: "var(--sl-color-warning-500)",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
Header: {
|
|
81
|
-
display: "flex",
|
|
82
|
-
"& .icon": {
|
|
83
|
-
position: "relative",
|
|
84
|
-
top: "5%",
|
|
85
|
-
alignSelf: "center",
|
|
86
|
-
lineHeight: "0",
|
|
87
|
-
color: "var(--sl-color-primary-400)",
|
|
88
|
-
fontSize: "var(--sl-font-size-large)",
|
|
89
|
-
marginRight: "var(--sl-spacing-x-small)",
|
|
90
|
-
},
|
|
91
|
-
"& .value": {
|
|
92
|
-
alignSelf: "center",
|
|
93
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
94
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
95
|
-
color: "var(--sqm-text)",
|
|
96
|
-
lineHeight: "100%",
|
|
97
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
98
|
-
},
|
|
99
|
-
"& .text": {
|
|
100
|
-
alignSelf: "end",
|
|
101
|
-
textTransform: "uppercase",
|
|
102
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
103
|
-
color: "var(--sqm-text)",
|
|
104
|
-
lineHeight: "var(--sl-font-size-medium)",
|
|
105
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
9
|
+
export function TaskCardView(props) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const { callbacks, states, content } = props;
|
|
12
|
+
console.log("text color from the view ", content.textColor);
|
|
13
|
+
const style = {
|
|
14
|
+
TaskCard: {
|
|
15
|
+
display: "inline-block",
|
|
16
|
+
width: "100%",
|
|
17
|
+
"& .main": {
|
|
18
|
+
position: "relative",
|
|
19
|
+
boxSizing: "border-sizing",
|
|
20
|
+
background: content.backgroundColor || "var(--sl-color-neutral-0)",
|
|
21
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
22
|
+
borderRadius: "var(--sl-border-radius-large)",
|
|
23
|
+
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
|
|
24
|
+
fontSize: "var(--sl-font-size-small)",
|
|
25
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
26
|
+
color: content.textColor || "var(--sqm-text)",
|
|
27
|
+
},
|
|
28
|
+
"& .main.complete": {
|
|
29
|
+
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
30
|
+
borderColor: content.borderColor || "var(--sl-color-primary-500)",
|
|
31
|
+
},
|
|
32
|
+
"& .main.expired": {
|
|
33
|
+
color: content.textColor || "var(--sqm-text)",
|
|
34
|
+
background: content.backgroundColor || "var(--sl-color-neutral-50)",
|
|
35
|
+
},
|
|
36
|
+
"& .title": {
|
|
37
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
38
|
+
color: content.textColor || "var(--sqm-text)",
|
|
39
|
+
},
|
|
40
|
+
"& .container": {
|
|
41
|
+
margin: "var(--sl-spacing-medium)",
|
|
42
|
+
},
|
|
43
|
+
"& .container.subdued": {
|
|
44
|
+
opacity: "0.45",
|
|
45
|
+
},
|
|
46
|
+
"& .container > div": {
|
|
47
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
48
|
+
},
|
|
106
49
|
},
|
|
107
|
-
|
|
108
|
-
|
|
50
|
+
NotStarted: {
|
|
51
|
+
fontSize: "var(--sl-font-size-small)",
|
|
52
|
+
padding: "var(--sl-spacing-medium)",
|
|
53
|
+
color: content.textColor || "var(--sl-color-primary-600)",
|
|
54
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
55
|
+
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
56
|
+
borderBottom: "none",
|
|
57
|
+
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
109
58
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"&[data-subdue] .success": {
|
|
118
|
-
color: "var(--sl-color-primary-300)",
|
|
119
|
-
},
|
|
120
|
-
"&[data-subdue] .neutral": {
|
|
121
|
-
color: "var(--sqm-text)",
|
|
122
|
-
},
|
|
123
|
-
display: "flex",
|
|
124
|
-
"& .icon": {
|
|
125
|
-
fontSize: "var(--sl-font-size-xx-small)",
|
|
126
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
127
|
-
verticalAlign: "middle",
|
|
128
|
-
},
|
|
129
|
-
"& .text": {
|
|
130
|
-
marginTop: "auto",
|
|
131
|
-
verticalAlign: "text-bottom",
|
|
132
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
133
|
-
color: "var(--sqm-text)",
|
|
59
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
60
|
+
"& .icon": {
|
|
61
|
+
position: "relative",
|
|
62
|
+
top: "0.1em",
|
|
63
|
+
marginRight: "var(--sl-spacing-small)",
|
|
64
|
+
color: content.textColor || "var(--sqm-text)",
|
|
65
|
+
},
|
|
134
66
|
},
|
|
135
|
-
|
|
136
|
-
|
|
67
|
+
Ended: {
|
|
68
|
+
fontSize: "var(--sl-font-size-small)",
|
|
69
|
+
padding: "var(--sl-spacing-medium)",
|
|
70
|
+
color: content.textColor || "var(--sl-color-warning-600)",
|
|
71
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
72
|
+
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
73
|
+
borderBottom: "none",
|
|
74
|
+
background: content.backgroundColor || "var(--sl-color-warning-50)",
|
|
137
75
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
76
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
77
|
+
"& .icon": {
|
|
78
|
+
position: "relative",
|
|
79
|
+
top: "0.1em",
|
|
80
|
+
marginRight: "var(--sl-spacing-small)",
|
|
81
|
+
color: content.textColor || "var(--sqm-text)",
|
|
82
|
+
},
|
|
138
83
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
84
|
+
Header: {
|
|
85
|
+
display: "flex",
|
|
86
|
+
"& .icon": {
|
|
87
|
+
position: "relative",
|
|
88
|
+
top: "5%",
|
|
89
|
+
alignSelf: "center",
|
|
90
|
+
lineHeight: "0",
|
|
91
|
+
color: content.textColor || "var(--sqm-text)",
|
|
92
|
+
fontSize: "var(--sl-font-size-large)",
|
|
93
|
+
marginRight: "var(--sl-spacing-x-small)",
|
|
144
94
|
},
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
95
|
+
"& .value": {
|
|
96
|
+
alignSelf: "center",
|
|
97
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
98
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
99
|
+
color: content.textColor || "var(--sqm-text)",
|
|
100
|
+
lineHeight: "100%",
|
|
101
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
148
102
|
},
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
|
|
103
|
+
"& .text": {
|
|
104
|
+
alignSelf: "end",
|
|
105
|
+
textTransform: "uppercase",
|
|
106
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
107
|
+
color: content.textColor || "var(--sqm-text)",
|
|
108
|
+
lineHeight: "var(--sl-font-size-medium)",
|
|
109
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
110
|
+
},
|
|
111
|
+
"& .end": {
|
|
112
|
+
color: content.textColor || "var(--sl-color-warning-500)",
|
|
113
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
114
|
+
marginBottom: "var(--sl-spacing-xx-small)",
|
|
115
|
+
},
|
|
116
|
+
"& .neutral": {
|
|
117
|
+
color: content.textColor || "var(--sl-color-neutral-400)",
|
|
152
118
|
},
|
|
153
119
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
120
|
+
Footer: {
|
|
121
|
+
"&[data-subdue] .success": {
|
|
122
|
+
color: content.textColor || "var(--sl-color-primary-300)",
|
|
123
|
+
},
|
|
124
|
+
"&[data-subdue] .neutral": {
|
|
125
|
+
color: content.textColor || "var(--sqm-text)",
|
|
126
|
+
},
|
|
127
|
+
display: "flex",
|
|
128
|
+
"& .icon": {
|
|
129
|
+
fontSize: "var(--sl-font-size-xx-small)",
|
|
130
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
131
|
+
verticalAlign: "middle",
|
|
132
|
+
},
|
|
133
|
+
"& .text": {
|
|
134
|
+
marginTop: "auto",
|
|
135
|
+
verticalAlign: "text-bottom",
|
|
136
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
137
|
+
color: content.textColor || "var(--sqm-text)",
|
|
138
|
+
},
|
|
139
|
+
"& .success": {
|
|
140
|
+
color: content.textColor || "var(--sqm-text)",
|
|
141
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
142
|
+
},
|
|
143
|
+
"& .neutral": {
|
|
144
|
+
color: content.textColor || "var(--sqm-text)",
|
|
145
|
+
},
|
|
146
|
+
"& .datetime": {
|
|
147
|
+
display: "block",
|
|
148
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
149
|
+
},
|
|
160
150
|
},
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
const styleString = sheet.toString();
|
|
165
|
-
export function TaskCardView(props) {
|
|
166
|
-
var _a, _b;
|
|
167
|
-
const { callbacks, states, content } = props;
|
|
151
|
+
};
|
|
152
|
+
const sheet = createStyleSheet(style);
|
|
153
|
+
const contenttring = sheet.toString();
|
|
168
154
|
const dateStart = content.rewardDuration &&
|
|
169
155
|
DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
170
156
|
const dateEnd = content.rewardDuration &&
|
|
@@ -199,7 +185,7 @@ export function TaskCardView(props) {
|
|
|
199
185
|
`;
|
|
200
186
|
return (h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
|
|
201
187
|
h("style", { type: "text/css" },
|
|
202
|
-
|
|
188
|
+
contenttring,
|
|
203
189
|
vanillaStyle),
|
|
204
190
|
!states.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
|
|
205
191
|
h("span", { class: "icon" },
|
|
@@ -277,11 +263,9 @@ export function TaskCardView(props) {
|
|
|
277
263
|
.setLocale(luxonLocale(states.locale))
|
|
278
264
|
.toLocaleString(DateTime.DATETIME_MED),
|
|
279
265
|
})))),
|
|
280
|
-
content.hideButton ? ("") : (h("sl-button", { exportparts:
|
|
281
|
-
? "
|
|
282
|
-
: taskComplete
|
|
283
|
-
? "action disabled"
|
|
284
|
-
: "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
266
|
+
content.hideButton ? ("") : (h("sl-button", { exportparts: `base: ${content.buttonStyle === "primary"
|
|
267
|
+
? "primary"
|
|
268
|
+
: "secondary"}button-base`, id: "sl-button", type: content.buttonStyle === "primary" ? "primary" : "default", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
285
269
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
286
270
|
} }, content.buttonText)))))))));
|
|
287
271
|
}
|