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