@saasquatch/mint-components 1.15.0-10 → 1.15.0-12

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 (45) 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-big-stat_41.cjs.entry.js +48 -47
  4. package/dist/cjs/sqm-empty_4.cjs.entry.js +48 -48
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +30 -2
  6. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  7. package/dist/collection/components/sqm-text/Text.stories.js +12 -0
  8. package/dist/collection/components/sqm-text/sqm-text.js +100 -49
  9. package/dist/collection/components/sqm-timeline/Timeline.stories.js +8 -1
  10. package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +45 -45
  11. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +53 -0
  12. package/dist/esm/loader.js +1 -1
  13. package/dist/esm/mint-components.js +1 -1
  14. package/dist/esm/sqm-big-stat_41.entry.js +48 -47
  15. package/dist/esm/sqm-empty_4.entry.js +48 -48
  16. package/dist/esm/sqm-stencilbook.entry.js +30 -2
  17. package/dist/esm-es5/loader.js +1 -1
  18. package/dist/esm-es5/mint-components.js +1 -1
  19. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  20. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/mint-components/mint-components.esm.js +1 -1
  23. package/dist/mint-components/p-1ae6c418.entry.js +1 -0
  24. package/dist/mint-components/{p-411bfb78.entry.js → p-3f3ae257.entry.js} +1 -1
  25. package/dist/mint-components/{p-0c7cbba4.entry.js → p-8e876dde.entry.js} +2 -2
  26. package/dist/mint-components/{p-070ac4ab.system.entry.js → p-c571bc61.system.entry.js} +1 -1
  27. package/dist/mint-components/p-dce51a2e.system.entry.js +1 -0
  28. package/dist/mint-components/p-ee06426a.system.js +1 -1
  29. package/dist/mint-components/{p-5fbabd19.system.entry.js → p-f219e877.system.entry.js} +1 -1
  30. package/dist/types/components/sqm-text/Text.stories.d.ts +6 -0
  31. package/dist/types/components/sqm-text/sqm-text.d.ts +12 -0
  32. package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +1 -0
  33. package/dist/types/components/sqm-timeline/sqm-timeline-entry-view.d.ts +2 -0
  34. package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +14 -0
  35. package/dist/types/components.d.ts +52 -0
  36. package/docs/docs.docx +0 -0
  37. package/docs/raisins.json +1 -1
  38. package/grapesjs/grapesjs.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/mint-components/p-3e9bb8f2.system.entry.js +0 -1
  41. package/dist/mint-components/p-9ca87c75.entry.js +0 -1
  42. package/dist/types/global/android.d.ts +0 -7
  43. package/dist/types/global/demo.d.ts +0 -2
  44. package/dist/types/stories/features.d.ts +0 -4
  45. package/dist/types/stories/templates.d.ts +0 -4
@@ -13056,7 +13056,7 @@ const Timeline_stories = {
13056
13056
  const TimelineWith1Reward = () => {
13057
13057
  return (index.h("div", null,
13058
13058
  index.h("sqm-timeline", null,
13059
- index.h("sqm-timeline-entry", { reward: "75", unit: "points", desc: "Your friends signs up for a free trial" })),
13059
+ index.h("sqm-timeline-entry", { textColor: "red", lineColor: "red", reward: "75", unit: "points", desc: "Your friends signs up for a free trial" })),
13060
13060
  index.h("br", null),
13061
13061
  " ",
13062
13062
  index.h("hr", null),
@@ -13113,6 +13113,13 @@ const TimelineWith4Rewards = () => {
13113
13113
  index.h("sqm-timeline-entry", { reward: "$200", unit: "visa giftcard", desc: "Your friend qualifies as a good fit for Klip Team" }),
13114
13114
  index.h("sqm-timeline-entry", { reward: "$1000", unit: "visa giftcard", desc: "Your friend purchases Klip Team" }))));
13115
13115
  };
13116
+ const TimelineWithCustomColors = () => {
13117
+ return (index.h("sqm-timeline", null,
13118
+ index.h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "75", unit: "points", desc: "Your friends signs up for a free trial" }),
13119
+ index.h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$50", unit: "visa giftcard", desc: "Your friends signs up for Klip Personal" }),
13120
+ index.h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$200", unit: "visa giftcard", desc: "Your friend qualifies as a good fit for Klip Team" }),
13121
+ index.h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$1000", unit: "visa giftcard", desc: "Your friend purchases Klip Team" })));
13122
+ };
13116
13123
 
13117
13124
  const Timeline = /*#__PURE__*/Object.freeze({
13118
13125
  __proto__: null,
@@ -13120,7 +13127,8 @@ const Timeline = /*#__PURE__*/Object.freeze({
13120
13127
  TimelineWith1Reward: TimelineWith1Reward,
13121
13128
  TimelineWith2Rewards: TimelineWith2Rewards,
13122
13129
  TimelineWith3Rewards: TimelineWith3Rewards,
13123
- TimelineWith4Rewards: TimelineWith4Rewards
13130
+ TimelineWith4Rewards: TimelineWith4Rewards,
13131
+ TimelineWithCustomColors: TimelineWithCustomColors
13124
13132
  });
13125
13133
 
13126
13134
  const scenario$x = "@author:kutay\n@owner:kutay\nFeature: Image\n\n\tBackground: A user on the portal is viewing the widget\n\t\tGiven a user viewing the image component\n\n\t@motivating\n\t@ui\n\tScenario: Image is displayed from URL\n\t\tGiven an Image component\n\t\tAnd prop \"image-url\" is provided with a valid image url\n\t\tThen the image is displayed\n\t\tAnd it is centered\n\n\t@motivating\n\t@ui\n\tScenario Outline: Images can be aligned left, center or right\n\t\tGiven an Image component\n\t\tAnd prop \"image-url\" is provided with a valid image url\n\t\tAnd prop \"align\" has <value>\n\t\tThen the image is displayed\n\t\tAnd it is aligned to the <value>\n\t\tExamples:\n\t\t\t| value |\n\t\t\t| left |\n\t\t\t| center |\n\t\t\t| right |\n\n\t@motivating\n\t@ui\n\tScenario: Image background can be assigned a color\n\t\tGiven an Image component\n\t\tAnd prop \"image-url\" is provided with a valid image url\n\t\tAnd prop \"background-color\" is provided a color\n\t\tThen the image is displayed\n\t\tAnd the background is the provided color\n\n\t@motivating\n\t@ui\n\tScenario: Image minimum height can be constrained\n\t\tGiven an Image component\n\t\tAnd prop \"image-url\" is provided\n\t\tAnd prop \"min-height\" is given a minimum value\n\t\tThen the image is displayed\n\t\tAnd the container size changes\n\t\tThen the image does not shrink below its minimum height";
@@ -15842,6 +15850,25 @@ const QRCode = /*#__PURE__*/Object.freeze({
15842
15850
  DownloadError: DownloadError
15843
15851
  });
15844
15852
 
15853
+ const Text_stories = {
15854
+ title: "Components/Text",
15855
+ };
15856
+ const PurpleText = () => {
15857
+ return (index.h("sqm-text", { textColor: "slateblue" },
15858
+ index.h("p", null, "This is the text component")));
15859
+ };
15860
+ const CustomFontSize = () => {
15861
+ return (index.h("sqm-text", { fontSize: 36 },
15862
+ index.h("p", null, "This is the text component")));
15863
+ };
15864
+
15865
+ const Text = /*#__PURE__*/Object.freeze({
15866
+ __proto__: null,
15867
+ 'default': Text_stories,
15868
+ PurpleText: PurpleText,
15869
+ CustomFontSize: CustomFontSize
15870
+ });
15871
+
15845
15872
  /**
15846
15873
  *
15847
15874
  * Themes
@@ -18579,6 +18606,7 @@ const stories = [
18579
18606
  PayoutButtonScroll,
18580
18607
  PayoutStatusAlert,
18581
18608
  QRCode,
18609
+ Text,
18582
18610
  ];
18583
18611
  const StencilStorybook = class {
18584
18612
  constructor(hostRef) {
@@ -97,6 +97,7 @@ import * as BaseRegistrationForm from "../sqm-base-registration/BaseRegistration
97
97
  import * as PortalRegistrationForm from "../sqm-portal-registration-form/PortalRegistrationForm.stories";
98
98
  import * as PortalGoogleRegistrationFormStories from "../sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories";
99
99
  import * as QRCode from "../sqm-qr-code/QRCode.stories";
100
+ import * as Text from "../sqm-text/Text.stories";
100
101
  import * as Themes from "./Themes";
101
102
  import { CucumberAddon } from "./CucumberAddon";
102
103
  import { HookStoryAddon } from "./HookStoryAddon";
@@ -199,6 +200,7 @@ const stories = [
199
200
  PayoutButtonScroll,
200
201
  PayoutStatusAlert,
201
202
  QRCode,
203
+ Text,
202
204
  ];
203
205
  /**
204
206
  * For internal documentation
@@ -0,0 +1,12 @@
1
+ import { h } from "@stencil/core";
2
+ export default {
3
+ title: "Components/Text",
4
+ };
5
+ export const PurpleText = () => {
6
+ return (h("sqm-text", { textColor: "slateblue" },
7
+ h("p", null, "This is the text component")));
8
+ };
9
+ export const CustomFontSize = () => {
10
+ return (h("sqm-text", { fontSize: 36 },
11
+ h("p", null, "This is the text component")));
12
+ };
@@ -1,53 +1,5 @@
1
- import { Component, h, State } from "@stencil/core";
1
+ import { Component, h, Prop, State } from "@stencil/core";
2
2
  import { withHooks } from "@saasquatch/stencil-hooks";
3
- const vanillaStyle = `
4
- sqm-text {
5
- display: block;
6
- color: var(--sqm-text);
7
- }
8
-
9
- sqm-text h1 {
10
- font-size: var(--sl-font-size-xxx-large);
11
- font-weight: var(--sl-font-weight-semibold);
12
- color: var(--sqm-text);
13
- margin: 0;
14
- }
15
-
16
- sqm-text h2 {
17
- font-size: var(--sl-font-size-xx-large);
18
- font-weight: var(--sl-font-weight-semibold);
19
- color: var(--sqm-text);
20
- margin: 0;
21
- }
22
-
23
- sqm-text h3 {
24
- font-size: var(--sl-font-size-x-large);
25
- font-weight: var(--sl-font-weight-semibold);
26
- color: var(--sqm-text);
27
- margin: 0;
28
- }
29
-
30
- sqm-text h4 {
31
- font-size: var(--sl-font-size-large);
32
- font-weight: var(--sl-font-weight-bold);
33
- color: var(--sqm-text);
34
- margin: 0;
35
- }
36
-
37
- sqm-text p {
38
- font-size: var(--sl-font-size-medium);
39
- font-weight: var(--sl-font-weight-normal);
40
- color: var(--sqm-text);
41
- margin: 0;
42
- }
43
-
44
- sqm-text sub {
45
- font-size: var(--sl-font-size-small);
46
- font-weight: var(--sl-font-weight-normal);
47
- color: var(--sqm-text);
48
- margin: 0;
49
- }
50
- `;
51
3
  /**
52
4
  * @uiName Text
53
5
  * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero","sqm-big-stat","span","sqm-text-span","sqb-program-section","sqb-conditional-section"]
@@ -63,11 +15,110 @@ export class Text {
63
15
  disconnectedCallback() { }
64
16
  componentWillLoad() { }
65
17
  render() {
18
+ const vanillaStyle = `
19
+ sqm-text {
20
+ display: block;
21
+ color: ${this.textColor || "var(--sqm-text)"};
22
+ }
23
+
24
+ sqm-text h1 {
25
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-xxx-large)"};
26
+ font-weight: var(--sl-font-weight-semibold);
27
+ color: ${this.textColor || "var(--sqm-text)"};
28
+ margin: 0;
29
+ }
30
+
31
+ sqm-text h2 {
32
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-xx-large)"};
33
+ font-weight: var(--sl-font-weight-semibold);
34
+ color: ${this.textColor || "var(--sqm-text)"};
35
+ margin: 0;
36
+ }
37
+
38
+ sqm-text h3 {
39
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-x-large)"};
40
+ font-weight: var(--sl-font-weight-semibold);
41
+ color: ${this.textColor || "var(--sqm-text)"};
42
+ margin: 0;
43
+ }
44
+
45
+ sqm-text h4 {
46
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-large)"};
47
+ font-weight: var(--sl-font-weight-bold);
48
+ color: ${this.textColor || "var(--sqm-text)"};
49
+ margin: 0;
50
+ }
51
+
52
+ sqm-text p {
53
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-medium)"};
54
+ font-weight: var(--sl-font-weight-normal);
55
+ color: ${this.textColor || "var(--sqm-text)"};
56
+ margin: 0;
57
+ }
58
+
59
+ sqm-text sub {
60
+ font-size: ${this.fontSize ? `${this.fontSize}px` : "var(--sl-font-size-small)"};
61
+ font-weight: var(--sl-font-weight-normal);
62
+ color: ${this.textColor || "var(--sqm-text)"};
63
+ margin: 0;
64
+ }
65
+ `;
66
66
  return (h("div", null,
67
67
  h("style", null, vanillaStyle),
68
68
  h("slot", null)));
69
69
  }
70
70
  static get is() { return "sqm-text"; }
71
+ static get properties() { return {
72
+ "fontSize": {
73
+ "type": "number",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "number",
77
+ "resolved": "number",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": true,
82
+ "docs": {
83
+ "tags": [{
84
+ "text": "Font Size",
85
+ "name": "uiName"
86
+ }, {
87
+ "text": "number",
88
+ "name": "uiType"
89
+ }],
90
+ "text": "Font size in pixels"
91
+ },
92
+ "attribute": "font-size",
93
+ "reflect": false
94
+ },
95
+ "textColor": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": true,
105
+ "docs": {
106
+ "tags": [{
107
+ "text": "Text Color",
108
+ "name": "uiName"
109
+ }, {
110
+ "text": "color",
111
+ "name": "uiWidget"
112
+ }, {
113
+ "text": "color",
114
+ "name": "format"
115
+ }],
116
+ "text": ""
117
+ },
118
+ "attribute": "text-color",
119
+ "reflect": false
120
+ }
121
+ }; }
71
122
  static get states() { return {
72
123
  "ignored": {}
73
124
  }; }
@@ -11,7 +11,7 @@ export default {
11
11
  export const TimelineWith1Reward = () => {
12
12
  return (h("div", null,
13
13
  h("sqm-timeline", null,
14
- h("sqm-timeline-entry", { reward: "75", unit: "points", desc: "Your friends signs up for a free trial" })),
14
+ h("sqm-timeline-entry", { textColor: "red", lineColor: "red", reward: "75", unit: "points", desc: "Your friends signs up for a free trial" })),
15
15
  h("br", null),
16
16
  " ",
17
17
  h("hr", null),
@@ -68,3 +68,10 @@ export const TimelineWith4Rewards = () => {
68
68
  h("sqm-timeline-entry", { reward: "$200", unit: "visa giftcard", desc: "Your friend qualifies as a good fit for Klip Team" }),
69
69
  h("sqm-timeline-entry", { reward: "$1000", unit: "visa giftcard", desc: "Your friend purchases Klip Team" }))));
70
70
  };
71
+ export const TimelineWithCustomColors = () => {
72
+ return (h("sqm-timeline", null,
73
+ h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "75", unit: "points", desc: "Your friends signs up for a free trial" }),
74
+ h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$50", unit: "visa giftcard", desc: "Your friends signs up for Klip Personal" }),
75
+ h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$200", unit: "visa giftcard", desc: "Your friend qualifies as a good fit for Klip Team" }),
76
+ h("sqm-timeline-entry", { "text-color": "red", "line-color": "red", reward: "$1000", unit: "visa giftcard", desc: "Your friend purchases Klip Team" })));
77
+ };
@@ -1,51 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { createStyleSheet } from "../../styling/JSS";
3
3
  import { Circle, Gift } from "./SVGs";
4
- const style = {
5
- TimelineReward: {
6
- color: "var(--sqm-text)",
7
- lineHeight: "var(--sl-line-height-dense)",
8
- "& .container": {
9
- display: "flex",
10
- },
11
- "& .line": {
12
- display: "none",
13
- color: "transparent",
14
- userSelect: "none",
15
- background: "var(--sl-color-primary-300)",
16
- width: "4px",
17
- borderRadius: "4px",
18
- margin: "-2px",
19
- position: "relative",
20
- left: "12px",
21
- top: "34px",
22
- },
23
- "& .step": {
24
- display: "flex",
25
- },
26
- "& .icon": {
27
- position: "relative",
28
- top: "4px",
29
- zIndex: "1",
30
- color: "var(--sl-color-primary-300)",
31
- marginRight: "var(--sl-spacing-large)",
32
- },
33
- "& .reward": {
34
- marginRight: "var(--sl-spacing-x-small)",
35
- fontSize: "var(--sl-font-size-x-large)",
36
- fontWeight: "var(--sl-font-weight-semibold)",
37
- },
38
- "& .unit": {
39
- textTransform: "uppercase",
40
- fontSize: "var(--sl-font-size-small)",
41
- },
42
- "& .description": {
43
- fontSize: "var(--sl-font-size-medium)",
44
- },
45
- },
46
- };
47
- const sheet = createStyleSheet(style);
48
- const styleString = sheet.toString();
49
4
  const vanillaStyle = `
50
5
  :host{
51
6
  display: block;
@@ -58,6 +13,51 @@ const vanillaStyle = `
58
13
  export function TimelineEntryView(props) {
59
14
  var _a;
60
15
  const timeline_icon = (_a = props.icon) !== null && _a !== void 0 ? _a : props.iconState;
16
+ const style = {
17
+ TimelineReward: {
18
+ color: props.textColor || "var(--sqm-text)",
19
+ lineHeight: "var(--sl-line-height-dense)",
20
+ "& .container": {
21
+ display: "flex",
22
+ },
23
+ "& .line": {
24
+ display: "none",
25
+ color: "transparent",
26
+ userSelect: "none",
27
+ background: props.lineColor || "var(--sl-color-primary-500)",
28
+ width: "4px",
29
+ borderRadius: "4px",
30
+ margin: "-2px",
31
+ position: "relative",
32
+ left: "12px",
33
+ top: "34px",
34
+ },
35
+ "& .step": {
36
+ display: "flex",
37
+ },
38
+ "& .icon": {
39
+ position: "relative",
40
+ top: "4px",
41
+ zIndex: "1",
42
+ color: "var(--sl-color-primary-500)",
43
+ marginRight: "var(--sl-spacing-large)",
44
+ },
45
+ "& .reward": {
46
+ marginRight: "var(--sl-spacing-x-small)",
47
+ fontSize: "var(--sl-font-size-x-large)",
48
+ fontWeight: "var(--sl-font-weight-semibold)",
49
+ },
50
+ "& .unit": {
51
+ textTransform: "uppercase",
52
+ fontSize: "var(--sl-font-size-small)",
53
+ },
54
+ "& .description": {
55
+ fontSize: "var(--sl-font-size-medium)",
56
+ },
57
+ },
58
+ };
59
+ const sheet = createStyleSheet(style);
60
+ const styleString = sheet.toString();
61
61
  return (h("div", { class: sheet.classes.TimelineReward, part: "sqm-base" },
62
62
  h("style", { type: "text/css" },
63
63
  styleString,
@@ -20,12 +20,65 @@ export class TimelineReward {
20
20
  }
21
21
  disconnectedCallback() { }
22
22
  render() {
23
+ console.log({ ...getProps(this) });
23
24
  useRequestRerender([this.reward]);
24
25
  return h(TimelineEntryView, Object.assign({}, getProps(this)));
25
26
  }
26
27
  static get is() { return "sqm-timeline-entry"; }
27
28
  static get encapsulation() { return "shadow"; }
28
29
  static get properties() { return {
30
+ "textColor": {
31
+ "type": "string",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "string",
35
+ "resolved": "string",
36
+ "references": {}
37
+ },
38
+ "required": false,
39
+ "optional": true,
40
+ "docs": {
41
+ "tags": [{
42
+ "text": "Text color",
43
+ "name": "uiName"
44
+ }, {
45
+ "text": "color",
46
+ "name": "uiWidget"
47
+ }, {
48
+ "text": "color",
49
+ "name": "format"
50
+ }],
51
+ "text": "Color of the text and copy icon"
52
+ },
53
+ "attribute": "text-color",
54
+ "reflect": false
55
+ },
56
+ "lineColor": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "string",
61
+ "resolved": "string",
62
+ "references": {}
63
+ },
64
+ "required": false,
65
+ "optional": true,
66
+ "docs": {
67
+ "tags": [{
68
+ "text": "Line color",
69
+ "name": "uiName"
70
+ }, {
71
+ "text": "color",
72
+ "name": "uiWidget"
73
+ }, {
74
+ "text": "color",
75
+ "name": "format"
76
+ }],
77
+ "text": "Color of timeline"
78
+ },
79
+ "attribute": "line-color",
80
+ "reflect": false
81
+ },
29
82
  "reward": {
30
83
  "type": "string",
31
84
  "mutable": false,