@saasquatch/mint-components 1.15.0-15 → 1.15.0-17

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 (70) hide show
  1. package/dist/cjs/{ShadowViewAddon-d2ed86e8.js → ShadowViewAddon-974f6839.js} +97 -57
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-big-stat_41.cjs.entry.js +37 -5
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +31 -6
  6. package/dist/cjs/sqm-tabs.cjs.entry.js +9 -4
  7. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
  8. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -7
  9. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +162 -2
  10. package/dist/collection/components/sqm-big-stat/useBigStat.js +10 -0
  11. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +13 -4
  12. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +13 -13
  13. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -1
  14. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +4 -4
  15. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +3 -1
  16. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +23 -22
  17. package/dist/collection/components/sqm-share-button/sqm-share-button.js +53 -7
  18. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +20 -8
  19. package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +110 -2
  20. package/dist/collection/components/sqm-tabs/Tabs.stories.js +7 -0
  21. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +7 -2
  22. package/dist/collection/components/sqm-tabs/sqm-tabs.js +28 -2
  23. package/dist/esm/{ShadowViewAddon-3651cb42.js → ShadowViewAddon-6a9f6e48.js} +97 -57
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/mint-components.js +1 -1
  26. package/dist/esm/sqm-big-stat_41.entry.js +37 -5
  27. package/dist/esm/sqm-stencilbook.entry.js +31 -6
  28. package/dist/esm/sqm-tabs.entry.js +9 -4
  29. package/dist/esm-es5/ShadowViewAddon-6a9f6e48.js +1 -0
  30. package/dist/esm-es5/loader.js +1 -1
  31. package/dist/esm-es5/mint-components.js +1 -1
  32. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  33. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  34. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  35. package/dist/mint-components/mint-components.esm.js +1 -1
  36. package/dist/mint-components/p-094b3b54.system.entry.js +1 -0
  37. package/dist/mint-components/{p-9b2e60ce.entry.js → p-3d8c4dd2.entry.js} +3 -3
  38. package/dist/mint-components/p-72263a72.js +394 -0
  39. package/dist/mint-components/p-81d6479a.system.js +1 -0
  40. package/dist/mint-components/p-b6de39a2.entry.js +1 -0
  41. package/dist/mint-components/{p-60e72631.entry.js → p-d30919cd.entry.js} +2 -2
  42. package/dist/mint-components/p-ead64a3d.system.entry.js +1 -0
  43. package/dist/mint-components/p-ee06426a.system.js +1 -1
  44. package/dist/mint-components/p-fdaa4dbb.system.entry.js +1 -0
  45. package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +2 -0
  46. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +5 -0
  47. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +41 -0
  48. package/dist/types/components/sqm-coupon-code/sqm-coupon-code-view.d.ts +1 -0
  49. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +1 -1
  50. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +2 -1
  51. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +1 -1
  52. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +2 -1
  53. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +15 -3
  54. package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
  55. package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +23 -0
  56. package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +1 -0
  57. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -0
  58. package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +8 -0
  59. package/dist/types/components.d.ts +176 -8
  60. package/docs/docs.docx +0 -0
  61. package/docs/raisins.json +1 -1
  62. package/grapesjs/grapesjs.js +1 -1
  63. package/package.json +1 -1
  64. package/dist/esm-es5/ShadowViewAddon-3651cb42.js +0 -1
  65. package/dist/mint-components/p-16dba1eb.system.js +0 -1
  66. package/dist/mint-components/p-70c8fea5.system.entry.js +0 -1
  67. package/dist/mint-components/p-9617685e.system.entry.js +0 -1
  68. package/dist/mint-components/p-a6ca754f.js +0 -394
  69. package/dist/mint-components/p-c060f770.system.entry.js +0 -1
  70. package/dist/mint-components/p-dcc81e90.entry.js +0 -1
@@ -40,15 +40,30 @@ const style = {
40
40
  };
41
41
  const sheet = JSS.createStyleSheet(style);
42
42
  const styleString = sheet.toString();
43
+ // TODO: Figure out hover and active states
44
+ // *::part(base):hover {
45
+ // border-color: ${
46
+ // props.backgroundcolor
47
+ // ? props.backgroundcolor
48
+ // : props.medium
49
+ // ? medium[props.medium].color
50
+ // : ""
51
+ // }!important;
52
+ // }
53
+ // *::part(base):focus {
54
+ // border-color: ${
55
+ // props.backgroundcolor
56
+ // ? props.backgroundcolor
57
+ // : props.medium
58
+ // ? medium[props.medium].color
59
+ // : ""
60
+ // }!important;
61
+ // }
43
62
  function ShareButtonView(props, children) {
44
63
  const vanillaStyle = `
45
- *::part(base) {
46
- border: none;
47
- --sl-focus-ring-color-primary: ${props.backgroundcolor
48
- ? props.backgroundcolor
49
- : props.medium
50
- ? medium[props.medium].color
51
- : ""}80!important;
64
+ sl-button::part(base) {
65
+ border: ${props.border || "none"};
66
+
52
67
 
53
68
  background: ${props.backgroundcolor
54
69
  ? props.backgroundcolor
@@ -63,21 +78,7 @@ function ShareButtonView(props, children) {
63
78
  border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
64
79
  }
65
80
 
66
- *::part(base):hover {
67
- border-color: ${props.backgroundcolor
68
- ? props.backgroundcolor
69
- : props.medium
70
- ? medium[props.medium].color
71
- : ""}D1!important;
72
- }
73
81
 
74
- *::part(base):focus {
75
- border-color: ${props.backgroundcolor
76
- ? props.backgroundcolor
77
- : props.medium
78
- ? medium[props.medium].color
79
- : ""}D1!important;
80
- }
81
82
 
82
83
  *::part(label) {
83
84
  position: relative;
@@ -87,7 +88,7 @@ function ShareButtonView(props, children) {
87
88
  return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
88
89
  index.h("style", { type: "text/css" }, styleString),
89
90
  index.h("style", { type: "text/css" }, vanillaStyle),
90
- index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}sharebutton-base` },
91
+ index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base` },
91
92
  !props.hideicon && (index.h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
92
93
  !props.hidetext && children)));
93
94
  }
@@ -226,13 +227,13 @@ function LeaderboardView(props) {
226
227
  }
227
228
 
228
229
  function BigStatView(props) {
229
- const { statvalue, flexReverse, alignment } = props;
230
- // Dependent on props, not feasiable to move out
230
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
231
+ // Dependent on props, not feasible to move out
231
232
  const style = {
232
233
  Container: {
233
234
  display: "flex",
234
- height: "inherit",
235
- "justify-content": "space-between",
235
+ // height: "inherit",
236
+ // "justify-content": "space-between",
236
237
  "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
237
238
  "align-items": `${alignment === "left"
238
239
  ? "flex-start"
@@ -241,14 +242,22 @@ function BigStatView(props) {
241
242
  : "center"}`,
242
243
  },
243
244
  Stat: {
244
- "font-size": "var(--sl-font-size-x-large)",
245
+ "font-size": statFontSize
246
+ ? `${statFontSize}px`
247
+ : "var(--sl-font-size-xx-large)",
245
248
  "text-align": alignment,
249
+ color: statTextColor || "var(--sqm-text)",
250
+ lineHeight: "35px",
251
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
246
252
  },
247
253
  Description: {
248
- "font-size": "var(--sl-font-size-small)",
254
+ "font-size": descriptionFontSize
255
+ ? `${descriptionFontSize}px`
256
+ : "var(--sl-font-size-small)",
249
257
  "font-weight": "var(--sl-font-weight-normal)",
250
- color: "var(--sqm-text-subdued)",
258
+ color: descriptionTextColor || "var(--sqm-text)",
251
259
  "text-align": alignment,
260
+ lineHeight: "20px",
252
261
  },
253
262
  };
254
263
  const sheet = JSS.createStyleSheet(style);
@@ -1406,6 +1415,11 @@ function useBigStat(props) {
1406
1415
  flexReverse,
1407
1416
  alignment,
1408
1417
  loading: false,
1418
+ statTextColor: props.statTextColor,
1419
+ statFontSize: props.statFontSize,
1420
+ descriptionTextColor: props.descriptionTextColor,
1421
+ descriptionFontSize: props.descriptionFontSize,
1422
+ statFontWeight: props.statFontWeight,
1409
1423
  },
1410
1424
  label: "BAD PROP TYPE",
1411
1425
  };
@@ -1435,6 +1449,11 @@ function useBigStat(props) {
1435
1449
  loading: stat === null || stat === void 0 ? void 0 : stat.loading,
1436
1450
  flexReverse,
1437
1451
  alignment,
1452
+ statTextColor: props.statTextColor,
1453
+ statFontSize: props.statFontSize,
1454
+ descriptionTextColor: props.descriptionTextColor,
1455
+ descriptionFontSize: props.descriptionFontSize,
1456
+ statFontWeight: props.statFontWeight,
1438
1457
  },
1439
1458
  label,
1440
1459
  };
@@ -1451,8 +1470,12 @@ function useDemoBigStat(props) {
1451
1470
  value: 0,
1452
1471
  statvalue: "!!!",
1453
1472
  loading: false,
1454
- flexReverse: false,
1455
- alignment: "center",
1473
+ flexReverse: props.flexReverse,
1474
+ alignment: props.alignment,
1475
+ statTextColor: props.statTextColor,
1476
+ statFontSize: props.statFontSize,
1477
+ descriptionTextColor: props.descriptionTextColor,
1478
+ descriptionFontSize: props.descriptionFontSize,
1456
1479
  },
1457
1480
  label: "BAD PROP TYPE",
1458
1481
  };
@@ -1464,8 +1487,13 @@ function useDemoBigStat(props) {
1464
1487
  props: cjs.cjs({
1465
1488
  statvalue: "12345",
1466
1489
  value: 0,
1467
- flexReverse: false,
1468
- alignment: "center",
1490
+ flexReverse: props.flexReverse,
1491
+ alignment: props.alignment,
1492
+ statTextColor: props.statTextColor,
1493
+ statFontSize: props.statFontSize,
1494
+ descriptionTextColor: props.descriptionTextColor,
1495
+ descriptionFontSize: props.descriptionFontSize,
1496
+ statFontWeight: props.statFontWeight,
1469
1497
  }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1470
1498
  label: label !== null && label !== void 0 ? label : "Demo Label",
1471
1499
  };
@@ -1476,25 +1504,37 @@ function StatContainerView(props, children) {
1476
1504
  const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
1477
1505
  return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
1478
1506
  };
1479
- // Dependent on props, not feasiable to move out
1507
+ // take alignment variable and convert it to CSS flexbox alignment
1508
+ const alignment = props.alignment === "center"
1509
+ ? "center"
1510
+ : props.alignment === "right"
1511
+ ? "flex-end"
1512
+ : "flex-start";
1513
+ // Dependent on props, not feasible to move out
1480
1514
  const style = {
1481
1515
  StatContainer: {
1482
1516
  width: "100%",
1483
- display: props.display || "grid",
1484
- "grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
1485
- gap: divideSpace(),
1486
- // First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
1517
+ display: "flex",
1518
+ flexWrap: "wrap",
1519
+ alignItems: "center",
1520
+ justifyContent: alignment,
1521
+ flexDirection: "row",
1522
+ gap: `var(--sl-spacing-${props.gap})`,
1523
+ // Apply border styles conditionally based on the hideBorder prop
1487
1524
  "& > *": {
1488
- "border-right": "1px solid #EAEAEA",
1525
+ "border-right": props.hideBorder
1526
+ ? "none"
1527
+ : "1px solid var(--sqm-text-subdued)",
1489
1528
  "padding-right": divideSpace(),
1490
1529
  },
1491
1530
  "& > :last-child": {
1492
1531
  "border-right": "none",
1493
1532
  },
1494
1533
  "& > ::slotted(*)": {
1495
- "border-right": "1px solid #EAEAEA",
1534
+ "border-right": props.hideBorder
1535
+ ? "none"
1536
+ : "1px solid var(--sqm-text-subdued)",
1496
1537
  "padding-right": divideSpace(),
1497
- height: "100%",
1498
1538
  },
1499
1539
  "& > ::slotted(*:last-child)": {
1500
1540
  "border-right": "none",
@@ -4007,29 +4047,29 @@ function CardFeedView(props, children) {
4007
4047
  index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
4008
4048
  }
4009
4049
 
4010
- const style$a = {
4011
- HostBlock: mixins.HostBlock,
4012
- couponCodeLabel: {
4013
- margin: "var(--sl-spacing-x-small) 0",
4014
- color: "var(--sqm-text-subdued)",
4015
- fontSize: "var(--sl-font-size-small)",
4016
- },
4017
- };
4018
- const vanillaStyle$6 = `
4050
+ function CouponCodeView(props) {
4051
+ const error = !props.loading && props.error;
4052
+ const style = {
4053
+ HostBlock: mixins.HostBlock,
4054
+ couponCodeLabel: {
4055
+ margin: "var(--sl-spacing-x-small) 0",
4056
+ color: props.textColor || "var(--sqm-text-subdued)",
4057
+ fontSize: "var(--sl-font-size-small)",
4058
+ },
4059
+ };
4060
+ const vanillaStyle = `
4019
4061
  :host{
4020
4062
  display: block;
4021
4063
  width: 100%;
4022
4064
  }
4023
4065
  `;
4024
- const sheet$a = JSS.createStyleSheet(style$a);
4025
- const styleString$a = sheet$a.toString();
4026
- function CouponCodeView(props) {
4027
- const error = !props.loading && props.error;
4066
+ const sheet = JSS.createStyleSheet(style);
4067
+ const styleString = sheet.toString();
4028
4068
  return (index.h("div", null,
4029
4069
  index.h("style", { type: "text/css" },
4030
- styleString$a,
4031
- vanillaStyle$6),
4032
- index.h("p", { class: sheet$a.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4070
+ styleString,
4071
+ vanillaStyle),
4072
+ index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4033
4073
  error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
4034
4074
  index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
4035
4075
  }