@saasquatch/mint-components 1.5.0-0 → 1.5.0-4

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 (93) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/{sqm-divided-layout_30.cjs.entry.js → sqm-brand_31.cjs.entry.js} +27134 -26654
  4. package/dist/cjs/sqm-program-explainer-step-view-74863815.js +70 -0
  5. package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +22 -0
  6. package/dist/cjs/sqm-program-explainer-view-afed92f5.js +45 -0
  7. package/dist/cjs/sqm-program-explainer.cjs.entry.js +23 -0
  8. package/dist/cjs/sqm-share-code.cjs.entry.js +19 -0
  9. package/dist/collection/collection-manifest.json +3 -0
  10. package/dist/collection/components/sqm-brand/SqmBrand.stories.js +93 -0
  11. package/dist/collection/components/sqm-brand/sqm-brand.js +97 -0
  12. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +49 -0
  13. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +41 -0
  14. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +131 -0
  15. package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +22 -0
  16. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +66 -0
  17. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +123 -0
  18. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +5 -3
  19. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +38 -19
  20. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +3 -0
  21. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +142 -102
  22. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +349 -3
  23. package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +28 -4
  24. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +0 -1
  25. package/dist/collection/components/sqm-share-code/useShareCode.js +20 -1
  26. package/dist/collection/components/sqm-share-link/useShareLink.js +20 -1
  27. package/dist/collection/components/sqm-stencilbook/AutoColor.js +32 -4
  28. package/dist/collection/components/sqm-stencilbook/Themes.js +14 -0
  29. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +6 -0
  30. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +26 -18
  31. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +37 -0
  32. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +8 -6
  33. package/dist/collection/components/sqm-task-card/sqm-task-card.js +5 -6
  34. package/dist/collection/fonts/GoogleFonts.js +12 -0
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/mint-components.js +1 -1
  37. package/dist/esm/{sqm-divided-layout_30.entry.js → sqm-brand_31.entry.js} +27128 -26649
  38. package/dist/esm/sqm-program-explainer-step-view-f190277a.js +68 -0
  39. package/dist/esm/sqm-program-explainer-step.entry.js +18 -0
  40. package/dist/esm/sqm-program-explainer-view-1c603bb7.js +43 -0
  41. package/dist/esm/sqm-program-explainer.entry.js +19 -0
  42. package/dist/esm/sqm-share-code.entry.js +20 -1
  43. package/dist/esm-es5/loader.js +1 -1
  44. package/dist/esm-es5/mint-components.js +1 -1
  45. package/dist/esm-es5/sqm-brand_31.entry.js +58 -0
  46. package/dist/esm-es5/sqm-program-explainer-step-view-f190277a.js +1 -0
  47. package/dist/esm-es5/sqm-program-explainer-step.entry.js +1 -0
  48. package/dist/esm-es5/sqm-program-explainer-view-1c603bb7.js +1 -0
  49. package/dist/esm-es5/sqm-program-explainer.entry.js +1 -0
  50. package/dist/esm-es5/sqm-share-code.entry.js +1 -1
  51. package/dist/mint-components/mint-components.esm.js +1 -1
  52. package/dist/mint-components/mint-components.js +1 -1
  53. package/dist/mint-components/p-16f5a7cb.system.js +1 -1
  54. package/dist/mint-components/p-2d6421b6.system.js +1 -0
  55. package/dist/mint-components/p-3b6228f4.system.js +1 -0
  56. package/dist/mint-components/p-49cbd0a2.entry.js +13 -0
  57. package/dist/mint-components/p-5f4d838e.system.entry.js +58 -0
  58. package/dist/mint-components/p-6c9c4477.js +1 -0
  59. package/dist/mint-components/p-84dc4854.entry.js +397 -0
  60. package/dist/mint-components/p-96a1967b.entry.js +1 -0
  61. package/dist/mint-components/p-9e4e397a.system.entry.js +1 -0
  62. package/dist/mint-components/p-bc8b6125.js +1 -0
  63. package/dist/mint-components/p-bf1b79ba.entry.js +1 -0
  64. package/dist/mint-components/p-c3f91add.system.entry.js +1 -0
  65. package/dist/mint-components/p-e6d77d20.system.entry.js +1 -0
  66. package/dist/types/components/sqm-brand/SqmBrand.stories.d.ts +7 -0
  67. package/dist/types/components/sqm-brand/sqm-brand.d.ts +23 -0
  68. package/dist/types/components/sqm-program-explainer/ProgramExplainer.stories.d.ts +7 -0
  69. package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +9 -0
  70. package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +31 -0
  71. package/dist/types/components/sqm-program-explainer-step/ProgramExplainerStep.stories.d.ts +5 -0
  72. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +8 -0
  73. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +29 -0
  74. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +2 -0
  75. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +85 -0
  76. package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +1 -0
  77. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +3 -0
  78. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +53 -0
  79. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +17 -0
  80. package/dist/types/components/sqm-stencilbook/AutoColor.d.ts +15 -0
  81. package/dist/types/components/sqm-stencilbook/Themes.d.ts +1 -0
  82. package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +1 -0
  83. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
  84. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +1 -1
  85. package/dist/types/components.d.ts +253 -2
  86. package/dist/types/fonts/GoogleFonts.d.ts +9 -0
  87. package/grapesjs/grapesjs.js +1 -1
  88. package/package.json +2 -2
  89. package/dist/esm-es5/sqm-divided-layout_30.entry.js +0 -58
  90. package/dist/mint-components/p-55508395.system.entry.js +0 -1
  91. package/dist/mint-components/p-925ccb31.system.entry.js +0 -58
  92. package/dist/mint-components/p-cd410a05.entry.js +0 -9
  93. package/dist/mint-components/p-fdb484a0.entry.js +0 -392
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-b0129cd6.js');
4
+ const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
5
+
6
+ function ProgramExplainerStepView(props) {
7
+ const style = {
8
+ Container: {
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ width: "100%",
12
+ height: "444px",
13
+ color: props.color,
14
+ background: props.background,
15
+ padding: "24px",
16
+ "@media (max-width: 1024px)": {
17
+ flexDirection: "row",
18
+ width: "auto",
19
+ height: "auto",
20
+ },
21
+ },
22
+ Logo: {},
23
+ Text: {
24
+ "@media (max-width: 1024px)": {
25
+ marginLeft: "24px",
26
+ },
27
+ },
28
+ Title: {
29
+ fontSize: "16px",
30
+ fontWeight: "var(--sl-font-weight-bold)",
31
+ textTransform: "uppercase",
32
+ lineHeight: "24px",
33
+ marginTop: "24px",
34
+ "@media (max-width: 1024px)": {
35
+ margin: "0",
36
+ },
37
+ },
38
+ Description: {
39
+ fontSize: "16px",
40
+ lineHeight: "28px",
41
+ marginTop: "12px",
42
+ "@media (max-width: 1024px)": {
43
+ marginTop: "8px",
44
+ },
45
+ },
46
+ };
47
+ jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
48
+ const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
49
+ const styleString = sheet.toString();
50
+ console.log(props);
51
+ return (index.h("div", { class: sheet.classes.Container },
52
+ index.h("style", { type: "text/css" }, styleString),
53
+ index.h("div", { class: sheet.classes.Logo },
54
+ index.h("div", { style: {
55
+ width: "64px",
56
+ height: "64px",
57
+ borderRadius: "100%",
58
+ background: "#F4F5F7",
59
+ color: "var(--sl-color-primary-400)",
60
+ textAlign: "center",
61
+ lineHeight: "72px",
62
+ } },
63
+ index.h("div", { style: { fontSize: "26px" } },
64
+ index.h("sl-icon", { name: props.icon })))),
65
+ index.h("div", { class: sheet.classes.Text },
66
+ index.h("div", { class: sheet.classes.Title }, props.title),
67
+ index.h("div", { class: sheet.classes.Description }, props.description))));
68
+ }
69
+
70
+ exports.ProgramExplainerStepView = ProgramExplainerStepView;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b0129cd6.js');
6
+ const _extends = require('./extends-0302d27d.js');
7
+ require('./jss-preset-default.esm-6304d24f.js');
8
+ const utils = require('./utils-95e5317c.js');
9
+ const sqmProgramExplainerStepView = require('./sqm-program-explainer-step-view-74863815.js');
10
+
11
+ const ProgramExplainerStep = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ _extends.h$1(this);
15
+ }
16
+ disconnectedCallback() { }
17
+ render() {
18
+ return index.h(sqmProgramExplainerStepView.ProgramExplainerStepView, Object.assign({}, utils.getProps(this)));
19
+ }
20
+ };
21
+
22
+ exports.sqm_program_explainer_step = ProgramExplainerStep;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-b0129cd6.js');
4
+ const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
5
+
6
+ function ProgramExplainerView(props, children) {
7
+ const style = {
8
+ Container: {
9
+ display: "flex",
10
+ "@media (max-width: 1024px)": {
11
+ flexDirection: "column",
12
+ },
13
+ },
14
+ Card: {
15
+ padding: "24px",
16
+ color: props.color,
17
+ background: props.background,
18
+ },
19
+ Title: {
20
+ fontSize: "28px",
21
+ lineHeight: "36px",
22
+ fontWeight: "700",
23
+ },
24
+ Description: {
25
+ fontSize: "16px",
26
+ lineHeight: "28px",
27
+ fontWeight: "400",
28
+ marginTop: "8px",
29
+ },
30
+ };
31
+ jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
32
+ const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
33
+ const styleString = sheet.toString();
34
+ console.log(props);
35
+ return (index.h("div", null,
36
+ index.h("style", { type: "text/css" }, styleString),
37
+ index.h("div", { class: sheet.classes.Card },
38
+ index.h("div", { class: sheet.classes.Title }, props.header)),
39
+ index.h("div", { class: sheet.classes.Container }, children),
40
+ index.h("div", { class: sheet.classes.Card },
41
+ index.h("div", { class: sheet.classes.Title }, props.title),
42
+ index.h("div", { class: sheet.classes.Description }, props.description))));
43
+ }
44
+
45
+ exports.ProgramExplainerView = ProgramExplainerView;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b0129cd6.js');
6
+ const _extends = require('./extends-0302d27d.js');
7
+ require('./jss-preset-default.esm-6304d24f.js');
8
+ const utils = require('./utils-95e5317c.js');
9
+ const sqmProgramExplainerView = require('./sqm-program-explainer-view-afed92f5.js');
10
+
11
+ const ProgramExplainer = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.ignored = true;
15
+ _extends.h$1(this);
16
+ }
17
+ disconnectedCallback() { }
18
+ render() {
19
+ return (index.h(sqmProgramExplainerView.ProgramExplainerView, Object.assign({}, utils.getProps(this)), index.h("slot", null)));
20
+ }
21
+ };
22
+
23
+ exports.sqm_program_explainer = ProgramExplainer;
@@ -21,11 +21,18 @@ const MessageLinkQuery = index_module.dist.gql `
21
21
  }
22
22
  }
23
23
  `;
24
+ const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
25
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
26
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
27
+ }
28
+ `;
24
29
  function useShareCode(props) {
25
30
  var _a, _b;
26
31
  const programId = index_module.M();
27
32
  const user = index_module.T();
33
+ const engagementMedium = index_module.x();
28
34
  const { data } = index_module.en(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
35
+ const [sendLoadEvent] = index_module.be(WIDGET_ENGAGEMENT_EVENT);
29
36
  const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode) !== null && _b !== void 0 ? _b :
30
37
  // Shown during loading
31
38
  "...";
@@ -36,6 +43,18 @@ function useShareCode(props) {
36
43
  navigator.clipboard.writeText(shareString);
37
44
  setOpen(true);
38
45
  setTimeout(() => setOpen(false), props.tooltiplifespan);
46
+ sendLoadEvent({
47
+ eventMeta: {
48
+ programId,
49
+ id: user === null || user === void 0 ? void 0 : user.id,
50
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
51
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
52
+ meta: {
53
+ engagementMedium,
54
+ shareMedium: "DIRECT",
55
+ },
56
+ },
57
+ });
39
58
  }
40
59
  return { ...props, onClick, open, shareString };
41
60
  }
@@ -6,6 +6,7 @@
6
6
  "./components/sqm-rewards-table/sqm-rewards-table.js",
7
7
  "./components/sqm-asset-card/sqm-asset-card.js",
8
8
  "./components/sqm-big-stat/sqm-big-stat.js",
9
+ "./components/sqm-brand/sqm-brand.js",
9
10
  "./components/sqm-divided-layout/sqm-divided-layout.js",
10
11
  "./components/sqm-edit-profile/sqm-edit-profile.js",
11
12
  "./components/sqm-form-message/sqm-form-message.js",
@@ -32,6 +33,8 @@
32
33
  "./components/sqm-portal-register/sqm-portal-register.js",
33
34
  "./components/sqm-portal-reset-password/sqm-portal-reset-password.js",
34
35
  "./components/sqm-portal-verify-email/sqm-portal-verify-email.js",
36
+ "./components/sqm-program-explainer/sqm-program-explainer.js",
37
+ "./components/sqm-program-explainer-step/sqm-program-explainer-step.js",
35
38
  "./components/sqm-program-menu/sqm-program-menu.js",
36
39
  "./components/sqm-referral-iframe/sqm-referral-iframe.js",
37
40
  "./components/sqm-referral-table/cells/sqm-referral-table-cell.js",
@@ -0,0 +1,93 @@
1
+ import { h } from "@stencil/core";
2
+ export default {
3
+ title: "Components/Brand",
4
+ };
5
+ const SampleComponents = () => (h("div", { style: { padding: "10px", border: "5px solid #EEE" } },
6
+ h("div", { style: { display: "flex", gap: "5px", padding: "5px" } },
7
+ h("sl-button", { type: "default" }, "Default"),
8
+ h("sl-button", { type: "primary" }, "Primary"),
9
+ h("sl-button", { type: "success" }, "Success"),
10
+ h("sl-button", { type: "neutral" }, "Neutral"),
11
+ h("sl-button", { type: "warning" }, "Warning"),
12
+ h("sl-button", { type: "danger" }, "Danger")),
13
+ h("div", { style: { display: "flex", gap: "5px", padding: "5px" } },
14
+ h("sl-badge", { type: "primary" }, "Primary"),
15
+ h("sl-badge", { type: "success" }, "Success"),
16
+ h("sl-badge", { type: "neutral" }, "Neutral"),
17
+ h("sl-badge", { type: "warning" }, "Warning"),
18
+ h("sl-badge", { type: "danger" }, "Danger")),
19
+ h("div", { class: "color-palette" },
20
+ h("div", { class: "color-palette__name" },
21
+ "Primary",
22
+ h("br", null),
23
+ h("code", null,
24
+ "--sl-color-primary-",
25
+ h("em", null, `{n}`))),
26
+ h("div", { style: { display: "flex", gap: "5px" } },
27
+ h(ColorSwatch, { depth: 50 }),
28
+ h(ColorSwatch, { depth: 100 }),
29
+ h(ColorSwatch, { depth: 200 }),
30
+ h(ColorSwatch, { depth: 300 }),
31
+ h(ColorSwatch, { depth: 400 }),
32
+ h(ColorSwatch, { depth: 500 }),
33
+ h(ColorSwatch, { depth: 600 }),
34
+ h(ColorSwatch, { depth: 700 }),
35
+ h(ColorSwatch, { depth: 800 }),
36
+ h(ColorSwatch, { depth: 900 }),
37
+ h(ColorSwatch, { depth: 950 })))));
38
+ export const Examples = () => {
39
+ return (h("div", null,
40
+ h(SampleComponents, null),
41
+ h("sqm-brand", { "brand-color": "#FF0000" },
42
+ h(SampleComponents, null)),
43
+ h("sqm-brand", { "brand-color": "#00FF00" },
44
+ h(SampleComponents, null)),
45
+ h("sqm-brand", { "brand-color": "#0000FF" },
46
+ h(SampleComponents, null)),
47
+ h("sqm-brand", { "brand-color": "#000000" },
48
+ h(SampleComponents, null))));
49
+ };
50
+ export const Nested = () => {
51
+ return (h("div", null,
52
+ "Default ",
53
+ h(SampleComponents, null),
54
+ h("sqm-brand", { "brand-color": "#FF0000" },
55
+ "Red:",
56
+ h(SampleComponents, null),
57
+ h("sqm-brand", { "brand-color": "#00FF00" },
58
+ "Green:",
59
+ h(SampleComponents, null),
60
+ h("sqm-brand", { "brand-color": "#0000FF" },
61
+ "Blue:",
62
+ h(SampleComponents, null),
63
+ h("sqm-brand", { "brand-color": "#000000" },
64
+ "Black:",
65
+ h(SampleComponents, null)))))));
66
+ };
67
+ function ColorSwatch({ depth }) {
68
+ return (h("div", { style: {
69
+ backgroundColor: `var(--sl-color-primary-${depth})`,
70
+ color: `var(--sl-color-neutral-${1000 - depth})`,
71
+ width: "50px",
72
+ height: "50px",
73
+ display: "flex",
74
+ justifyContent: "center",
75
+ alignItems: "center",
76
+ } }, depth));
77
+ }
78
+ export const Fonts = () => {
79
+ return (h("div", null,
80
+ h(SampleComponents, null),
81
+ h("sqm-brand", { "brand-font": "Roboto" },
82
+ "Roboto",
83
+ h(SampleComponents, null)),
84
+ h("sqm-brand", { "brand-font": "Open Sans" },
85
+ "Open Sans",
86
+ h(SampleComponents, null)),
87
+ h("sqm-brand", { "brand-font": "Lato" },
88
+ "Lato",
89
+ h(SampleComponents, null)),
90
+ h("sqm-brand", { "brand-font": "Oswald" },
91
+ "Oswald",
92
+ h(SampleComponents, null))));
93
+ };
@@ -0,0 +1,97 @@
1
+ import { withHooks } from "@saasquatch/stencil-hooks";
2
+ import { useEffect } from "@saasquatch/universal-hooks";
3
+ import { Component, h, Host, Prop } from "@stencil/core";
4
+ import { buildFontsCssUrl } from "../../fonts/GoogleFonts";
5
+ import { autoColorScaleCss } from "../sqm-stencilbook/AutoColor";
6
+ /**
7
+ *
8
+ * @uiName Big Stat
9
+ * @slot the description of the component
10
+ */
11
+ export class BrandComponent {
12
+ constructor() {
13
+ withHooks(this);
14
+ }
15
+ disconnectedCallback() { }
16
+ render() {
17
+ var _a, _b;
18
+ const brandColor = (_a = this.brandColor) !== null && _a !== void 0 ? _a : "inherit";
19
+ const css = autoColorScaleCss(brandColor);
20
+ const sanitizedFont = ((_b = this.brandFont) !== null && _b !== void 0 ? _b : "").trim() || undefined;
21
+ useEffect(() => {
22
+ if (!sanitizedFont) {
23
+ // Nothing required in default case.
24
+ return;
25
+ }
26
+ const sheet = document.createElement("link");
27
+ sheet.setAttribute("href", buildFontsCssUrl(sanitizedFont));
28
+ sheet.setAttribute("rel", "stylesheet");
29
+ document.head.appendChild(sheet);
30
+ return () => document.head.removeChild(sheet);
31
+ }, [sanitizedFont]);
32
+ const font = sanitizedFont !== null && sanitizedFont !== void 0 ? sanitizedFont : "inherit";
33
+ return (h(Host, null,
34
+ h("style", null, `
35
+ :host{
36
+ display: contents;
37
+ }
38
+ /*
39
+ Selects any element placed inside a slot
40
+ - resets css variable inheritence for fonts
41
+
42
+ */
43
+ ::slotted(*) {
44
+ --sl-font-sans: "${font}", arial;
45
+ --sl-input-font-family: "${font}", arial;
46
+ --sl-tooltip-font-family: "${font}", arial;
47
+ font-family: "${font}", arial;
48
+
49
+ ${css}
50
+ }`),
51
+ h("slot", null)));
52
+ }
53
+ static get is() { return "sqm-brand"; }
54
+ static get encapsulation() { return "shadow"; }
55
+ static get properties() { return {
56
+ "brandColor": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "string",
61
+ "resolved": "string",
62
+ "references": {}
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [{
68
+ "text": "Brand Color",
69
+ "name": "uiName"
70
+ }],
71
+ "text": "Controls the primary brand color used in the Mint Components library. Note that this\r\ndoes not affect vanilla components or other component libraries."
72
+ },
73
+ "attribute": "brand-color",
74
+ "reflect": false
75
+ },
76
+ "brandFont": {
77
+ "type": "string",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "string",
81
+ "resolved": "string",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [{
88
+ "text": "Brand Font",
89
+ "name": "uiName"
90
+ }],
91
+ "text": "The brand font that you want to use"
92
+ },
93
+ "attribute": "brand-font",
94
+ "reflect": false
95
+ }
96
+ }; }
97
+ }
@@ -0,0 +1,49 @@
1
+ import { h } from "@stencil/core";
2
+ import { ProgramExplainerView } from "./sqm-program-explainer-view";
3
+ import { ProgramExplainerStepView } from "../sqm-program-explainer-step/sqm-program-explainer-step-view";
4
+ export default {
5
+ title: "Components/Program Explainer",
6
+ };
7
+ const props = {
8
+ header: "Klip Rewards",
9
+ title: "Earn rewards with our loyalty program",
10
+ description: "Earn points by completing tasks like uploading your first video or sharing videos with friends. Use your points to redeem rewards like one free month of Klip Enterprise or two plane tickets to anywhere in North America.",
11
+ color: "black",
12
+ background: "#F3F0EC",
13
+ };
14
+ const steps1 = {
15
+ title: "Invite your friends to Klip",
16
+ description: "Earn up to $1200 in rewards for each referral",
17
+ color: "white",
18
+ background: "#5B3EDA",
19
+ icon: "person-plus-fill",
20
+ };
21
+ const steps2 = {
22
+ title: "If your friend signs up for a Klip Business plan",
23
+ description: "Get a $50 VISA giftcard when they pay for their first month",
24
+ color: "black",
25
+ background: "#F3CC66",
26
+ icon: "server",
27
+ };
28
+ const steps3 = {
29
+ title: "If your friend signs up for a Klip Enterprise plan",
30
+ description: "Get up to $1200 in rewards - a $200 VISA giftcard when our sales team qualifies them as a good fit for Klip, and a $1000 VISA giftcard when they become a paying customer",
31
+ color: "black",
32
+ background: "#D3CCF5",
33
+ icon: "people-fill",
34
+ };
35
+ export const OneStep = () => {
36
+ return (h(ProgramExplainerView, Object.assign({}, props),
37
+ h(ProgramExplainerStepView, Object.assign({}, steps1))));
38
+ };
39
+ export const TwoSteps = () => {
40
+ return (h(ProgramExplainerView, Object.assign({}, props),
41
+ h(ProgramExplainerStepView, Object.assign({}, steps1)),
42
+ h(ProgramExplainerStepView, Object.assign({}, steps2))));
43
+ };
44
+ export const ThreeSteps = () => {
45
+ return (h(ProgramExplainerView, Object.assign({}, props),
46
+ h(ProgramExplainerStepView, Object.assign({}, steps1)),
47
+ h(ProgramExplainerStepView, Object.assign({}, steps2)),
48
+ h(ProgramExplainerStepView, Object.assign({}, steps3))));
49
+ };
@@ -0,0 +1,41 @@
1
+ import { h } from "@stencil/core";
2
+ import jss from "jss";
3
+ import preset from "jss-preset-default";
4
+ export function ProgramExplainerView(props, children) {
5
+ const style = {
6
+ Container: {
7
+ display: "flex",
8
+ "@media (max-width: 1024px)": {
9
+ flexDirection: "column",
10
+ },
11
+ },
12
+ Card: {
13
+ padding: "24px",
14
+ color: props.color,
15
+ background: props.background,
16
+ },
17
+ Title: {
18
+ fontSize: "28px",
19
+ lineHeight: "36px",
20
+ fontWeight: "700",
21
+ },
22
+ Description: {
23
+ fontSize: "16px",
24
+ lineHeight: "28px",
25
+ fontWeight: "400",
26
+ marginTop: "8px",
27
+ },
28
+ };
29
+ jss.setup(preset());
30
+ const sheet = jss.createStyleSheet(style);
31
+ const styleString = sheet.toString();
32
+ console.log(props);
33
+ return (h("div", null,
34
+ h("style", { type: "text/css" }, styleString),
35
+ h("div", { class: sheet.classes.Card },
36
+ h("div", { class: sheet.classes.Title }, props.header)),
37
+ h("div", { class: sheet.classes.Container }, children),
38
+ h("div", { class: sheet.classes.Card },
39
+ h("div", { class: sheet.classes.Title }, props.title),
40
+ h("div", { class: sheet.classes.Description }, props.description))));
41
+ }
@@ -0,0 +1,131 @@
1
+ import { withHooks } from "@saasquatch/stencil-hooks";
2
+ import { Component, h, Prop, State } from "@stencil/core";
3
+ import { getProps } from "../../utils/utils";
4
+ import { ProgramExplainerView } from "./sqm-program-explainer-view";
5
+ /**
6
+ * @uiName Program Explainer
7
+ */
8
+ export class ProgramExplainer {
9
+ constructor() {
10
+ this.ignored = true;
11
+ withHooks(this);
12
+ }
13
+ disconnectedCallback() { }
14
+ render() {
15
+ return (h(ProgramExplainerView, Object.assign({}, getProps(this)),
16
+ h("slot", null)));
17
+ }
18
+ static get is() { return "sqm-program-explainer"; }
19
+ static get encapsulation() { return "shadow"; }
20
+ static get properties() { return {
21
+ "header": {
22
+ "type": "string",
23
+ "mutable": false,
24
+ "complexType": {
25
+ "original": "string",
26
+ "resolved": "string",
27
+ "references": {}
28
+ },
29
+ "required": false,
30
+ "optional": false,
31
+ "docs": {
32
+ "tags": [{
33
+ "text": "Header",
34
+ "name": "uiName"
35
+ }],
36
+ "text": ""
37
+ },
38
+ "attribute": "header",
39
+ "reflect": false
40
+ },
41
+ "title": {
42
+ "type": "string",
43
+ "mutable": false,
44
+ "complexType": {
45
+ "original": "string",
46
+ "resolved": "string",
47
+ "references": {}
48
+ },
49
+ "required": false,
50
+ "optional": false,
51
+ "docs": {
52
+ "tags": [{
53
+ "text": "Title",
54
+ "name": "uiName"
55
+ }],
56
+ "text": ""
57
+ },
58
+ "attribute": "title",
59
+ "reflect": false
60
+ },
61
+ "description": {
62
+ "type": "string",
63
+ "mutable": false,
64
+ "complexType": {
65
+ "original": "string",
66
+ "resolved": "string",
67
+ "references": {}
68
+ },
69
+ "required": false,
70
+ "optional": false,
71
+ "docs": {
72
+ "tags": [{
73
+ "text": "Description",
74
+ "name": "uiName"
75
+ }],
76
+ "text": ""
77
+ },
78
+ "attribute": "description",
79
+ "reflect": false
80
+ },
81
+ "color": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [{
93
+ "text": "Color",
94
+ "name": "uiName"
95
+ }, {
96
+ "text": "color",
97
+ "name": "uiWidget"
98
+ }],
99
+ "text": ""
100
+ },
101
+ "attribute": "color",
102
+ "reflect": false
103
+ },
104
+ "background": {
105
+ "type": "string",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "string",
109
+ "resolved": "string",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [{
116
+ "text": "Background",
117
+ "name": "uiName"
118
+ }, {
119
+ "text": "color",
120
+ "name": "uiWidget"
121
+ }],
122
+ "text": ""
123
+ },
124
+ "attribute": "background",
125
+ "reflect": false
126
+ }
127
+ }; }
128
+ static get states() { return {
129
+ "ignored": {}
130
+ }; }
131
+ }
@@ -0,0 +1,22 @@
1
+ import { h } from "@stencil/core";
2
+ import { ProgramExplainerStepView } from "./sqm-program-explainer-step-view";
3
+ export default {
4
+ title: "Components/Program Explainer Step",
5
+ };
6
+ export const Example1 = () => {
7
+ const props = {
8
+ title: "Invite your friends to Klip",
9
+ description: "Earn up to $1200 in rewards for each referral",
10
+ color: "white",
11
+ background: "#5B3EDA",
12
+ icon: "person-plus-fill",
13
+ };
14
+ return h(ProgramExplainerStepView, Object.assign({}, props));
15
+ };
16
+ // export const ActiveItem = () => {
17
+ // const props = {
18
+ // title: "hello",
19
+ // description: "world",
20
+ // };
21
+ // return <ProgramExplainerStepView {...props} />;
22
+ // };