@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
|
@@ -35,7 +35,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-52f
|
|
|
35
35
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-4f837226.js');
|
|
36
36
|
require('./ErrorView-b2fcf954.js');
|
|
37
37
|
const sqmQrCodeView = require('./sqm-qr-code-view-3da9ed28.js');
|
|
38
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
38
|
+
const ShadowViewAddon = require('./ShadowViewAddon-974f6839.js');
|
|
39
39
|
const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
|
|
40
40
|
const sqmInvoiceTableView = require('./sqm-invoice-table-view-55066ec6.js');
|
|
41
41
|
|
|
@@ -1500,13 +1500,15 @@ const TextStyleWithoutIcon = () => {
|
|
|
1500
1500
|
const props = { medium: "facebook", type: "text", hideicon: true };
|
|
1501
1501
|
return index.h(ShadowViewAddon.ShareButtonView, Object.assign({}, props), "Share");
|
|
1502
1502
|
};
|
|
1503
|
-
const
|
|
1503
|
+
const WithCustomColorsAndBranding = () => {
|
|
1504
1504
|
const props = {
|
|
1505
1505
|
medium: "facebook",
|
|
1506
1506
|
type: "text",
|
|
1507
1507
|
backgroundcolor: "red",
|
|
1508
1508
|
textcolor: "yellow",
|
|
1509
1509
|
iconslot: "prefix",
|
|
1510
|
+
border: "2px solid yellow",
|
|
1511
|
+
borderradius: 30,
|
|
1510
1512
|
};
|
|
1511
1513
|
return index.h(ShadowViewAddon.ShareButtonView, Object.assign({}, props), "Facebook");
|
|
1512
1514
|
};
|
|
@@ -1579,7 +1581,7 @@ const ShareButton = /*#__PURE__*/Object.freeze({
|
|
|
1579
1581
|
WithoutIcon: WithoutIcon,
|
|
1580
1582
|
WithoutText: WithoutText,
|
|
1581
1583
|
TextStyleWithoutIcon: TextStyleWithoutIcon,
|
|
1582
|
-
|
|
1584
|
+
WithCustomColorsAndBranding: WithCustomColorsAndBranding,
|
|
1583
1585
|
WithCustomBorderRadius: WithCustomBorderRadius,
|
|
1584
1586
|
LinkLocationTest: LinkLocationTest,
|
|
1585
1587
|
FullStackIcon: FullStackIcon,
|
|
@@ -1832,6 +1834,10 @@ const InvalidStatValue = () => {
|
|
|
1832
1834
|
};
|
|
1833
1835
|
return index.h(ShadowViewAddon.BigStatView, Object.assign({}, props), "Big stat");
|
|
1834
1836
|
};
|
|
1837
|
+
const CustomStyles$1 = () => {
|
|
1838
|
+
return (index.h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
1839
|
+
index.h("p", null, "Giftcards Earned")));
|
|
1840
|
+
};
|
|
1835
1841
|
const MultipleStats = () => {
|
|
1836
1842
|
return (index.h("sqm-stat-container", { space: "xxx-large", display: "flex" },
|
|
1837
1843
|
index.h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/referralsCount" },
|
|
@@ -1844,6 +1850,15 @@ const MultipleStats = () => {
|
|
|
1844
1850
|
index.h("sqm-text", null,
|
|
1845
1851
|
index.h("p", null, "Points Balance")))));
|
|
1846
1852
|
};
|
|
1853
|
+
const MultipleStatsWithCustomBranding = () => {
|
|
1854
|
+
return (index.h("sqm-stat-container", { space: "xxx-large", display: "grid", alignment: "center", "hide-border": "true" },
|
|
1855
|
+
index.h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
1856
|
+
index.h("p", null, "Giftcards Earned")),
|
|
1857
|
+
index.h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
1858
|
+
index.h("p", null, "Referrals")),
|
|
1859
|
+
index.h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
1860
|
+
index.h("p", null, "Points balance"))));
|
|
1861
|
+
};
|
|
1847
1862
|
|
|
1848
1863
|
const BigStat = /*#__PURE__*/Object.freeze({
|
|
1849
1864
|
__proto__: null,
|
|
@@ -1856,7 +1871,9 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
1856
1871
|
FlexReverseLeft: FlexReverseLeft,
|
|
1857
1872
|
NoStatValue: NoStatValue,
|
|
1858
1873
|
InvalidStatValue: InvalidStatValue,
|
|
1859
|
-
|
|
1874
|
+
CustomStyles: CustomStyles$1,
|
|
1875
|
+
MultipleStats: MultipleStats,
|
|
1876
|
+
MultipleStatsWithCustomBranding: MultipleStatsWithCustomBranding
|
|
1860
1877
|
});
|
|
1861
1878
|
|
|
1862
1879
|
const scenario$4 = "@owner:noah @author:noah\nFeature: Leaderboard\n\tThe leaderboard supports three main cases\n\t- Top Started Referrers\n\t- Top Converted Referrers\n\t- Top Point Earners\n\tTo display these different types of leaderboards it uses the backends pre-canned options.\n\tThe backend supports filtering on programId and interval, programId is sourced from program context.\n\n Background: A user exists\n Given a user\n And they are viewing the leaderboard\n\n @motivating\n Scenario Outline: Two types of referrals leaderboards can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with <value>\n And there are started referrals on the tenant\n And there are started converted on the tenant\n When the user views the leaderboard\n Then they see the referral <referralType> leaderboard\n\n Examples:\n | value | referralType |\n | topStartedReferrers | started |\n | topConvertedReferrers | converted |\n\n @motivating\n Scenario: The top point earners leaderboard can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with value \"topPointEarners\"\n And there are users with points\n When the user views the leaderboard\n Then they see the top point earners leaderboard\n And text values are displayed for point counts\n\n @minutia\n Scenario Outline: Reward pretty value is used on the top point earners leaderboard\n Given top point earners leaderboard\n And the \"POINT\" reward unit has a pretty value for the following locales\n | locale |\n | en |\n | fr |\n | tr |\n When the user views the leaderboard\n And they have <locale>\n Then they see the translated pretty value in the stat value column\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard results\n Given a <leaderboardType> leaderboard loaded with program context for \"my-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"my-test-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-test-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards can be displayed by clearing program context\n\t\t#This is important for clients with use cases like StaffTracks global points leaderboard\n\t\t#This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"\"\n When the user views the leaderboard\n Then they see global <results>\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Leaderboard results are shown in descending order\n Given there are leaderboard results\n When the user views the leaderboard\n Then they see up to the 10 top leaderboard results\n And leaderboard is in descending order\n\n @motivating\n Scenario Outline: Leaderboard results can be filtered with a time interval\n Given a <leaderboardType> leaderboard\n And it has prop \"interval\" with value \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n When the user views the leaderboard\n Then they only see <results> from within \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Leaderboard rank type can be configured\n Given a leaderboard has prop \"rank-type\" with <value>\n When the user views the leaderboard\n Then their leaderboard rank is their <rank>\n\n Examples:\n | value | rank |\n | rowNumber | row number |\n | denseRank | dense rank |\n | rank | rank |\n\n @minutia\n Scenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n Given a leaderboard has prop \"max-rows\" with <value>\n And the leaderboard has <resultCount>\n When the user views the leaderboard\n Then they see <number> rows\n\n Examples:\n | value | resultCount | number |\n | | 10 | 10 |\n | 5 | 10 | 5 |\n | 3 | 1 | 1 |\n | 25 | 15 | 15 |\n\n @minutiae @ui\n Scenario: Leaderboards with no results show an empty state\n Given a leaderboard has no results\n When the user views the leaderboard\n Then an empty state is dislayed\n And they see an image of a leaderboard\n And below they see \"View your rank in the leaderboard\"\n And below they see \"Be the first to refer a friend and reach the top of the leaderboard\"\n And the text is center aligned\n\n @minutiae @ui\n Scenario: A custom empty state can be provided\n Given a leaderboard has no results\n When the user views the leaderboard\n Then the contents of the \"empty\" slot are displayed\n\n @minutiae @ui\n Scenario: User is on Essentials plan\n Given the user has an Essentials plan\n When they view the leaderboard\n Then a message telling them to upgrade their plan appears:\n \"\"\"\n Contact Support to upgrade your plan and start leveraging\n gamification in your program.\n \"\"\"\n And an empty table image is displayed\n\n @minutiae @ui\n Scenario: Leaderboard headings can be customized\n Given a leaderboard\n And it has the following props\n | prop | value |\n | rankheading | Place |\n | usersheading | Customer |\n | statsheading | Referral Count |\n | show-rank | true |\n When the user views the leaderboard\n Then they see the following columns with headings\n | column | heading |\n | rank | Place |\n | user | Customer |\n | stat | Referral Count |\n\n @motivating @ui\n Scenario Outline: Leaderboard rank can be hidden or shown\n Given a leaderboard\n And it has prop \"show-rank\" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the rank column\n\n Examples:\n | propValue | maySee |\n | true | see |\n | false | don't see |\n | | don't see |\n\n Scenario Outline: Users names can be hidden or shown\n Given a leaderboard\n And it has prop \"hide-names\" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the referrer column\n\n Examples:\n | propValue | maySee |\n | true | don't see |\n | false | see |\n | | see |\n\n @motivating @ui\n Scenario: Users in the top 10 of the leaderboard results see their leaderboard row highlighted\n Given a user in the top 10 of the leaderboard results\n When they view the leaderboard\n Then they see the row with their name highlighted with brand colour\n\n @motivating @ui\n Scenario Outline: Users not in the top 10 leaderboard results can see their progress at the bottom of the leaderboard\n Given a user <mayHave> completed actions counted by the leaderboard\n And they are not in the top 10 leaderboard results\n And the leaderboard has prop \"show-user\" with <value>\n When they view the leaderboard\n Then they <maySee> \"...\" under the top 10 leaderboard results\n And under \"...\" they <maySee> a row highlighted with brand colour\n And they <maySee> their name\n And they <maySee> their leaderboard value\n And they <maySeeRank>\n\n Examples:\n | mayHave | value | maySee | maySeeRank |\n | has | true | see | see their rank |\n | hasn't | true | see | don't see their rank |\n | N/A | false | don't see | don't see their rank |\n | hasn't | | see | don't see their rank |\n\n @minutiae\n Scenario: Users without names are displayed as an \"Anonymous User\"\n Given a user\n And they do not have a first name\n And they do not have a last initial\n When they view the leaderboard\n Then they see the user displayed as \"Anonymous User\"\n\n @minutiae\n Scenario Outline: If a user only has a first or last name, then only that is displayed\n Given a user\n And they only have a <name>\n When they view the leaderboard\n Then they only see their <name>\n\n Examples:\n | name |\n | firstName |\n | lastName |\n";
|
|
@@ -13623,6 +13640,13 @@ const SimpleTabs = () => (index.h("div", { style: { maxWidth: "700px", margin: "
|
|
|
13623
13640
|
<sqm-tab header="Advanced">This is the advanced tab</sqm-tab>
|
|
13624
13641
|
</sqm-tabs>
|
|
13625
13642
|
` }));
|
|
13643
|
+
const CustomColor$1 = () => (index.h("div", { style: { maxWidth: "700px", margin: "auto" }, innerHTML: `
|
|
13644
|
+
<sqm-tabs text-color="red">
|
|
13645
|
+
<sqm-tab header="General">This is the general tab</sqm-tab>
|
|
13646
|
+
<sqm-tab header="Custom">This is the custom tab</sqm-tab>
|
|
13647
|
+
<sqm-tab header="Advanced">This is the advanced tab</sqm-tab>
|
|
13648
|
+
</sqm-tabs>
|
|
13649
|
+
` }));
|
|
13626
13650
|
const ManyTabs = () => (index.h("div", { style: { maxWidth: "700px", margin: "auto" }, innerHTML: `
|
|
13627
13651
|
<sqm-tabs>
|
|
13628
13652
|
<sqm-tab header="General">This is the general tab</sqm-tab>
|
|
@@ -14104,6 +14128,7 @@ const Tabs = /*#__PURE__*/Object.freeze({
|
|
|
14104
14128
|
__proto__: null,
|
|
14105
14129
|
'default': Tabs_stories,
|
|
14106
14130
|
SimpleTabs: SimpleTabs,
|
|
14131
|
+
CustomColor: CustomColor$1,
|
|
14107
14132
|
ManyTabs: ManyTabs,
|
|
14108
14133
|
SingleTab: SingleTab,
|
|
14109
14134
|
ReferralProgram: ReferralProgram,
|
|
@@ -14526,7 +14551,7 @@ const InAContainer = () => {
|
|
|
14526
14551
|
return (index.h("div", { style: containerStyles },
|
|
14527
14552
|
index.h(sqmCloseButtonView.CloseButtonView, Object.assign({}, defaultProps$j))));
|
|
14528
14553
|
};
|
|
14529
|
-
const CustomColor$
|
|
14554
|
+
const CustomColor$2 = () => {
|
|
14530
14555
|
return (index.h("div", { style: containerStyles },
|
|
14531
14556
|
index.h(sqmCloseButtonView.CloseButtonView, Object.assign({}, { ...defaultProps$j, color: "blue" }))));
|
|
14532
14557
|
};
|
|
@@ -14536,7 +14561,7 @@ const CloseButton = /*#__PURE__*/Object.freeze({
|
|
|
14536
14561
|
'default': CloseButton_stories,
|
|
14537
14562
|
Default: Default$l,
|
|
14538
14563
|
InAContainer: InAContainer,
|
|
14539
|
-
CustomColor: CustomColor$
|
|
14564
|
+
CustomColor: CustomColor$2
|
|
14540
14565
|
});
|
|
14541
14566
|
|
|
14542
14567
|
// ! IMPORTANT: These objects cannot be used as default values for component props
|
|
@@ -9,7 +9,7 @@ const utils = require('./utils-6847bc06.js');
|
|
|
9
9
|
const reRender = require('./re-render-b324deab.js');
|
|
10
10
|
const useChildElements = require('./useChildElements-1b35d945.js');
|
|
11
11
|
|
|
12
|
-
const TabsView = ({ content, placement, }) => {
|
|
12
|
+
const TabsView = ({ content, placement, textColor = "var(--sqm-text)", }) => {
|
|
13
13
|
// Vertical padding for top & bottom placement, horizontal for left & right.
|
|
14
14
|
const padding = !placement || placement === "top" || placement === "bottom"
|
|
15
15
|
? "var(--sl-spacing-x-large) 0;"
|
|
@@ -18,7 +18,12 @@ const TabsView = ({ content, placement, }) => {
|
|
|
18
18
|
sl-tab-panel::part(base) {
|
|
19
19
|
padding: ${padding};
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
sl-tab::part(base) {
|
|
23
|
+
color: ${textColor};
|
|
24
|
+
}
|
|
21
25
|
`;
|
|
26
|
+
console.log("text color is ", textColor);
|
|
22
27
|
return (index.h(index.Host, null,
|
|
23
28
|
index.h("style", { type: "text/css" }, vanillaStyle),
|
|
24
29
|
index.h("sl-tab-group", { placement: placement }, content.tabs.map((tab) => {
|
|
@@ -29,7 +34,7 @@ const TabsView = ({ content, placement, }) => {
|
|
|
29
34
|
index.h("slot", { name: slotName }))));
|
|
30
35
|
}
|
|
31
36
|
return [
|
|
32
|
-
index.h("sl-tab", { slot: "nav", panel: slotName, id: tab.getAttribute("id") || slotName }, tab.getAttribute("header")),
|
|
37
|
+
index.h("sl-tab", { slot: "nav", panel: slotName, part: "tab", id: tab.getAttribute("id") || slotName }, tab.getAttribute("header")),
|
|
33
38
|
index.h("sl-tab-panel", { name: slotName },
|
|
34
39
|
index.h("slot", { name: slotName })),
|
|
35
40
|
];
|
|
@@ -91,8 +96,8 @@ const Tabs = class {
|
|
|
91
96
|
disconnectedCallback() { }
|
|
92
97
|
render() {
|
|
93
98
|
const { content } = useTabs();
|
|
94
|
-
const { placement } = utils.getProps(this);
|
|
95
|
-
return (index.h(TabsView, { placement: placement, content: content }, index.h("slot", null)));
|
|
99
|
+
const { placement, textColor } = utils.getProps(this);
|
|
100
|
+
return (index.h(TabsView, { placement: placement, content: content, textColor: textColor }, index.h("slot", null)));
|
|
96
101
|
}
|
|
97
102
|
};
|
|
98
103
|
|
|
@@ -74,6 +74,10 @@ export const InvalidStatValue = () => {
|
|
|
74
74
|
};
|
|
75
75
|
return h(BigStatView, Object.assign({}, props), "Big stat");
|
|
76
76
|
};
|
|
77
|
+
export const CustomStyles = () => {
|
|
78
|
+
return (h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
79
|
+
h("p", null, "Giftcards Earned")));
|
|
80
|
+
};
|
|
77
81
|
export const MultipleStats = () => {
|
|
78
82
|
return (h("sqm-stat-container", { space: "xxx-large", display: "flex" },
|
|
79
83
|
h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/referralsCount" },
|
|
@@ -86,3 +90,12 @@ export const MultipleStats = () => {
|
|
|
86
90
|
h("sqm-text", null,
|
|
87
91
|
h("p", null, "Points Balance")))));
|
|
88
92
|
};
|
|
93
|
+
export const MultipleStatsWithCustomBranding = () => {
|
|
94
|
+
return (h("sqm-stat-container", { space: "xxx-large", display: "grid", alignment: "center", "hide-border": "true" },
|
|
95
|
+
h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
96
|
+
h("p", null, "Giftcards Earned")),
|
|
97
|
+
h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
98
|
+
h("p", null, "Referrals")),
|
|
99
|
+
h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
|
|
100
|
+
h("p", null, "Points balance"))));
|
|
101
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { createStyleSheet } from "../../styling/JSS";
|
|
3
3
|
export function BigStatView(props) {
|
|
4
|
-
const { statvalue, flexReverse, alignment } = props;
|
|
5
|
-
// Dependent on props, not
|
|
4
|
+
const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
|
|
5
|
+
// Dependent on props, not feasible to move out
|
|
6
6
|
const style = {
|
|
7
7
|
Container: {
|
|
8
8
|
display: "flex",
|
|
9
|
-
height: "inherit",
|
|
10
|
-
"justify-content": "space-between",
|
|
9
|
+
// height: "inherit",
|
|
10
|
+
// "justify-content": "space-between",
|
|
11
11
|
"flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
|
|
12
12
|
"align-items": `${alignment === "left"
|
|
13
13
|
? "flex-start"
|
|
@@ -16,14 +16,22 @@ export function BigStatView(props) {
|
|
|
16
16
|
: "center"}`,
|
|
17
17
|
},
|
|
18
18
|
Stat: {
|
|
19
|
-
"font-size":
|
|
19
|
+
"font-size": statFontSize
|
|
20
|
+
? `${statFontSize}px`
|
|
21
|
+
: "var(--sl-font-size-xx-large)",
|
|
20
22
|
"text-align": alignment,
|
|
23
|
+
color: statTextColor || "var(--sqm-text)",
|
|
24
|
+
lineHeight: "35px",
|
|
25
|
+
fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
|
|
21
26
|
},
|
|
22
27
|
Description: {
|
|
23
|
-
"font-size":
|
|
28
|
+
"font-size": descriptionFontSize
|
|
29
|
+
? `${descriptionFontSize}px`
|
|
30
|
+
: "var(--sl-font-size-small)",
|
|
24
31
|
"font-weight": "var(--sl-font-weight-normal)",
|
|
25
|
-
color: "var(--sqm-text
|
|
32
|
+
color: descriptionTextColor || "var(--sqm-text)",
|
|
26
33
|
"text-align": alignment,
|
|
34
|
+
lineHeight: "20px",
|
|
27
35
|
},
|
|
28
36
|
};
|
|
29
37
|
const sheet = createStyleSheet(style);
|
|
@@ -23,8 +23,19 @@ export class BigStat {
|
|
|
23
23
|
*
|
|
24
24
|
* @uiName Flex reverse
|
|
25
25
|
* @default
|
|
26
|
+
* @uiGroup Style
|
|
26
27
|
*/
|
|
27
28
|
this.flexReverse = false;
|
|
29
|
+
/**
|
|
30
|
+
* Controls the alignment of the flexbox
|
|
31
|
+
*
|
|
32
|
+
* @uiName Alignment
|
|
33
|
+
* @uiType string
|
|
34
|
+
* @uiEnum ["left", "right", "center"]
|
|
35
|
+
* @uiEnumNames ["Left", "Right", "Center"]
|
|
36
|
+
* @uiGroup Style
|
|
37
|
+
*/
|
|
38
|
+
this.alignment = "center";
|
|
28
39
|
this.ignored = true;
|
|
29
40
|
withHooks(this);
|
|
30
41
|
}
|
|
@@ -86,6 +97,9 @@ export class BigStat {
|
|
|
86
97
|
}, {
|
|
87
98
|
"text": undefined,
|
|
88
99
|
"name": "default"
|
|
100
|
+
}, {
|
|
101
|
+
"text": "Style",
|
|
102
|
+
"name": "uiGroup"
|
|
89
103
|
}],
|
|
90
104
|
"text": "Controls the order of the stat value & description column"
|
|
91
105
|
},
|
|
@@ -116,11 +130,15 @@ export class BigStat {
|
|
|
116
130
|
}, {
|
|
117
131
|
"text": "[\"Left\", \"Right\", \"Center\"]",
|
|
118
132
|
"name": "uiEnumNames"
|
|
133
|
+
}, {
|
|
134
|
+
"text": "Style",
|
|
135
|
+
"name": "uiGroup"
|
|
119
136
|
}],
|
|
120
137
|
"text": "Controls the alignment of the flexbox"
|
|
121
138
|
},
|
|
122
139
|
"attribute": "alignment",
|
|
123
|
-
"reflect": false
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"defaultValue": "\"center\""
|
|
124
142
|
},
|
|
125
143
|
"programId": {
|
|
126
144
|
"type": "string",
|
|
@@ -145,12 +163,154 @@ export class BigStat {
|
|
|
145
163
|
"attribute": "program-id",
|
|
146
164
|
"reflect": false
|
|
147
165
|
},
|
|
166
|
+
"statTextColor": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "string",
|
|
171
|
+
"resolved": "string",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": true,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [{
|
|
178
|
+
"text": "Stat text color",
|
|
179
|
+
"name": "uiName"
|
|
180
|
+
}, {
|
|
181
|
+
"text": "color",
|
|
182
|
+
"name": "uiWidget"
|
|
183
|
+
}, {
|
|
184
|
+
"text": "string",
|
|
185
|
+
"name": "uiType"
|
|
186
|
+
}, {
|
|
187
|
+
"text": "color",
|
|
188
|
+
"name": "format"
|
|
189
|
+
}, {
|
|
190
|
+
"text": "Style",
|
|
191
|
+
"name": "uiGroup"
|
|
192
|
+
}],
|
|
193
|
+
"text": "Color of the stat text"
|
|
194
|
+
},
|
|
195
|
+
"attribute": "stat-text-color",
|
|
196
|
+
"reflect": false
|
|
197
|
+
},
|
|
198
|
+
"statFontSize": {
|
|
199
|
+
"type": "number",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "number",
|
|
203
|
+
"resolved": "number",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": true,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [{
|
|
210
|
+
"text": "Stat font size",
|
|
211
|
+
"name": "uiName"
|
|
212
|
+
}, {
|
|
213
|
+
"text": "string",
|
|
214
|
+
"name": "uiType"
|
|
215
|
+
}, {
|
|
216
|
+
"text": "Style",
|
|
217
|
+
"name": "uiGroup"
|
|
218
|
+
}],
|
|
219
|
+
"text": "Font size of the stat text in pixels"
|
|
220
|
+
},
|
|
221
|
+
"attribute": "stat-font-size",
|
|
222
|
+
"reflect": false
|
|
223
|
+
},
|
|
224
|
+
"statFontWeight": {
|
|
225
|
+
"type": "number",
|
|
226
|
+
"mutable": false,
|
|
227
|
+
"complexType": {
|
|
228
|
+
"original": "number",
|
|
229
|
+
"resolved": "number",
|
|
230
|
+
"references": {}
|
|
231
|
+
},
|
|
232
|
+
"required": false,
|
|
233
|
+
"optional": true,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [{
|
|
236
|
+
"text": "Stat font size",
|
|
237
|
+
"name": "uiName"
|
|
238
|
+
}, {
|
|
239
|
+
"text": "Style",
|
|
240
|
+
"name": "uiGroup"
|
|
241
|
+
}, {
|
|
242
|
+
"text": "[100, 200, 300, 400, 500, 600, 700, 800, 900]",
|
|
243
|
+
"name": "uiEnum"
|
|
244
|
+
}, {
|
|
245
|
+
"text": "[\"Thin\", \"Extra Light\", \"Light\", \"Normal\", \"Medium\", \"Semi Bold\", \"Bold\", \"Extra Bold\", \"Heavy\"]",
|
|
246
|
+
"name": "uiEnumNames"
|
|
247
|
+
}],
|
|
248
|
+
"text": "Font size of the stat text in pixels"
|
|
249
|
+
},
|
|
250
|
+
"attribute": "stat-font-weight",
|
|
251
|
+
"reflect": false
|
|
252
|
+
},
|
|
253
|
+
"descriptionTextColor": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "string",
|
|
258
|
+
"resolved": "string",
|
|
259
|
+
"references": {}
|
|
260
|
+
},
|
|
261
|
+
"required": false,
|
|
262
|
+
"optional": true,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [{
|
|
265
|
+
"text": "Description text color",
|
|
266
|
+
"name": "uiName"
|
|
267
|
+
}, {
|
|
268
|
+
"text": "color",
|
|
269
|
+
"name": "uiWidget"
|
|
270
|
+
}, {
|
|
271
|
+
"text": "string",
|
|
272
|
+
"name": "uiType"
|
|
273
|
+
}, {
|
|
274
|
+
"text": "color",
|
|
275
|
+
"name": "format"
|
|
276
|
+
}, {
|
|
277
|
+
"text": "Style",
|
|
278
|
+
"name": "uiGroup"
|
|
279
|
+
}],
|
|
280
|
+
"text": "Color of the description text"
|
|
281
|
+
},
|
|
282
|
+
"attribute": "description-text-color",
|
|
283
|
+
"reflect": false
|
|
284
|
+
},
|
|
285
|
+
"descriptionFontSize": {
|
|
286
|
+
"type": "number",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "number",
|
|
290
|
+
"resolved": "number",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": true,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [{
|
|
297
|
+
"text": "Description font size",
|
|
298
|
+
"name": "uiName"
|
|
299
|
+
}, {
|
|
300
|
+
"text": "Style",
|
|
301
|
+
"name": "uiGroup"
|
|
302
|
+
}],
|
|
303
|
+
"text": "Font size of the description text in pixels"
|
|
304
|
+
},
|
|
305
|
+
"attribute": "description-font-size",
|
|
306
|
+
"reflect": false
|
|
307
|
+
},
|
|
148
308
|
"demoData": {
|
|
149
309
|
"type": "unknown",
|
|
150
310
|
"mutable": false,
|
|
151
311
|
"complexType": {
|
|
152
312
|
"original": "DemoData<BigStatViewProps>",
|
|
153
|
-
"resolved": "{ loading?: boolean; value?: number; statvalue?: string; flexReverse?: boolean; alignment?: \"left\" | \"right\" | \"center\"; labelSlot?: VNode; }",
|
|
313
|
+
"resolved": "{ loading?: boolean; value?: number; statvalue?: string; flexReverse?: boolean; alignment?: \"left\" | \"right\" | \"center\"; labelSlot?: VNode; statTextColor?: string; statFontSize?: number; descriptionTextColor?: string; descriptionFontSize?: number; statFontWeight?: number; }",
|
|
154
314
|
"references": {
|
|
155
315
|
"DemoData": {
|
|
156
316
|
"location": "import",
|
|
@@ -890,6 +890,11 @@ export function useBigStat(props) {
|
|
|
890
890
|
flexReverse,
|
|
891
891
|
alignment,
|
|
892
892
|
loading: false,
|
|
893
|
+
statTextColor: props.statTextColor,
|
|
894
|
+
statFontSize: props.statFontSize,
|
|
895
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
896
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
897
|
+
statFontWeight: props.statFontWeight,
|
|
893
898
|
},
|
|
894
899
|
label: "BAD PROP TYPE",
|
|
895
900
|
};
|
|
@@ -919,6 +924,11 @@ export function useBigStat(props) {
|
|
|
919
924
|
loading: stat === null || stat === void 0 ? void 0 : stat.loading,
|
|
920
925
|
flexReverse,
|
|
921
926
|
alignment,
|
|
927
|
+
statTextColor: props.statTextColor,
|
|
928
|
+
statFontSize: props.statFontSize,
|
|
929
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
930
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
931
|
+
statFontWeight: props.statFontWeight,
|
|
922
932
|
},
|
|
923
933
|
label,
|
|
924
934
|
};
|
|
@@ -13,8 +13,12 @@ export function useDemoBigStat(props) {
|
|
|
13
13
|
value: 0,
|
|
14
14
|
statvalue: "!!!",
|
|
15
15
|
loading: false,
|
|
16
|
-
flexReverse:
|
|
17
|
-
alignment:
|
|
16
|
+
flexReverse: props.flexReverse,
|
|
17
|
+
alignment: props.alignment,
|
|
18
|
+
statTextColor: props.statTextColor,
|
|
19
|
+
statFontSize: props.statFontSize,
|
|
20
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
21
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
18
22
|
},
|
|
19
23
|
label: "BAD PROP TYPE",
|
|
20
24
|
};
|
|
@@ -26,8 +30,13 @@ export function useDemoBigStat(props) {
|
|
|
26
30
|
props: deepmerge({
|
|
27
31
|
statvalue: "12345",
|
|
28
32
|
value: 0,
|
|
29
|
-
flexReverse:
|
|
30
|
-
alignment:
|
|
33
|
+
flexReverse: props.flexReverse,
|
|
34
|
+
alignment: props.alignment,
|
|
35
|
+
statTextColor: props.statTextColor,
|
|
36
|
+
statFontSize: props.statFontSize,
|
|
37
|
+
descriptionTextColor: props.descriptionTextColor,
|
|
38
|
+
descriptionFontSize: props.descriptionFontSize,
|
|
39
|
+
statFontWeight: props.statFontWeight,
|
|
31
40
|
}, props.demoData || {}, { arrayMerge: (_, a) => a }),
|
|
32
41
|
label: label !== null && label !== void 0 ? label : "Demo Label",
|
|
33
42
|
};
|
|
@@ -2,24 +2,24 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { createStyleSheet } from "../../styling/JSS";
|
|
3
3
|
import { HostBlock } from "../../global/mixins";
|
|
4
4
|
import { CopyTextView } from "../views/copy-text-view";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
export function CouponCodeView(props) {
|
|
6
|
+
const error = !props.loading && props.error;
|
|
7
|
+
const style = {
|
|
8
|
+
HostBlock: HostBlock,
|
|
9
|
+
couponCodeLabel: {
|
|
10
|
+
margin: "var(--sl-spacing-x-small) 0",
|
|
11
|
+
color: props.textColor || "var(--sqm-text-subdued)",
|
|
12
|
+
fontSize: "var(--sl-font-size-small)",
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
const vanillaStyle = `
|
|
14
16
|
:host{
|
|
15
17
|
display: block;
|
|
16
18
|
width: 100%;
|
|
17
19
|
}
|
|
18
20
|
`;
|
|
19
|
-
const sheet = createStyleSheet(style);
|
|
20
|
-
const styleString = sheet.toString();
|
|
21
|
-
export function CouponCodeView(props) {
|
|
22
|
-
const error = !props.loading && props.error;
|
|
21
|
+
const sheet = createStyleSheet(style);
|
|
22
|
+
const styleString = sheet.toString();
|
|
23
23
|
return (h("div", null,
|
|
24
24
|
h("style", { type: "text/css" },
|
|
25
25
|
styleString,
|
package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js
CHANGED
|
@@ -8,7 +8,9 @@ export function ProgramExplainerStepView(props) {
|
|
|
8
8
|
width: "100%",
|
|
9
9
|
padding: "var(--sl-spacing-x-large)",
|
|
10
10
|
lineHeight: "var(--sl-line-height-dense)",
|
|
11
|
-
borderRadius: props.borderRadius
|
|
11
|
+
borderRadius: props.borderRadius
|
|
12
|
+
? `${props.borderRadius}px`
|
|
13
|
+
: "var(--sl-border-radius-large)",
|
|
12
14
|
color: props.textColor || "var(--sqm-text)",
|
|
13
15
|
background: props.backgroundColor || "var(--sl-color-primary-50)",
|
|
14
16
|
"@media (max-width: 499px)": {
|
|
@@ -115,11 +115,11 @@ export class ProgramExplainerStep {
|
|
|
115
115
|
"reflect": false
|
|
116
116
|
},
|
|
117
117
|
"borderRadius": {
|
|
118
|
-
"type": "
|
|
118
|
+
"type": "number",
|
|
119
119
|
"mutable": false,
|
|
120
120
|
"complexType": {
|
|
121
|
-
"original": "
|
|
122
|
-
"resolved": "
|
|
121
|
+
"original": "number",
|
|
122
|
+
"resolved": "number",
|
|
123
123
|
"references": {}
|
|
124
124
|
},
|
|
125
125
|
"required": false,
|
|
@@ -132,7 +132,7 @@ export class ProgramExplainerStep {
|
|
|
132
132
|
"text": "number",
|
|
133
133
|
"name": "type"
|
|
134
134
|
}],
|
|
135
|
-
"text": ""
|
|
135
|
+
"text": "Amount in pixels"
|
|
136
136
|
},
|
|
137
137
|
"attribute": "border-radius",
|
|
138
138
|
"reflect": false
|
|
@@ -44,13 +44,15 @@ export const TextStyleWithoutIcon = () => {
|
|
|
44
44
|
const props = { medium: "facebook", type: "text", hideicon: true };
|
|
45
45
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
46
46
|
};
|
|
47
|
-
export const
|
|
47
|
+
export const WithCustomColorsAndBranding = () => {
|
|
48
48
|
const props = {
|
|
49
49
|
medium: "facebook",
|
|
50
50
|
type: "text",
|
|
51
51
|
backgroundcolor: "red",
|
|
52
52
|
textcolor: "yellow",
|
|
53
53
|
iconslot: "prefix",
|
|
54
|
+
border: "2px solid yellow",
|
|
55
|
+
borderradius: 30,
|
|
54
56
|
};
|
|
55
57
|
return h(ShareButtonView, Object.assign({}, props), "Facebook");
|
|
56
58
|
};
|
|
@@ -24,15 +24,30 @@ const style = {
|
|
|
24
24
|
};
|
|
25
25
|
const sheet = createStyleSheet(style);
|
|
26
26
|
const styleString = sheet.toString();
|
|
27
|
+
// TODO: Figure out hover and active states
|
|
28
|
+
// *::part(base):hover {
|
|
29
|
+
// border-color: ${
|
|
30
|
+
// props.backgroundcolor
|
|
31
|
+
// ? props.backgroundcolor
|
|
32
|
+
// : props.medium
|
|
33
|
+
// ? medium[props.medium].color
|
|
34
|
+
// : ""
|
|
35
|
+
// }!important;
|
|
36
|
+
// }
|
|
37
|
+
// *::part(base):focus {
|
|
38
|
+
// border-color: ${
|
|
39
|
+
// props.backgroundcolor
|
|
40
|
+
// ? props.backgroundcolor
|
|
41
|
+
// : props.medium
|
|
42
|
+
// ? medium[props.medium].color
|
|
43
|
+
// : ""
|
|
44
|
+
// }!important;
|
|
45
|
+
// }
|
|
27
46
|
export function ShareButtonView(props, children) {
|
|
28
47
|
const vanillaStyle = `
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
? props.backgroundcolor
|
|
33
|
-
: props.medium
|
|
34
|
-
? medium[props.medium].color
|
|
35
|
-
: ""}80!important;
|
|
48
|
+
sl-button::part(base) {
|
|
49
|
+
border: ${props.border || "none"};
|
|
50
|
+
|
|
36
51
|
|
|
37
52
|
background: ${props.backgroundcolor
|
|
38
53
|
? props.backgroundcolor
|
|
@@ -47,21 +62,7 @@ export function ShareButtonView(props, children) {
|
|
|
47
62
|
border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
|
|
48
63
|
}
|
|
49
64
|
|
|
50
|
-
*::part(base):hover {
|
|
51
|
-
border-color: ${props.backgroundcolor
|
|
52
|
-
? props.backgroundcolor
|
|
53
|
-
: props.medium
|
|
54
|
-
? medium[props.medium].color
|
|
55
|
-
: ""}D1!important;
|
|
56
|
-
}
|
|
57
65
|
|
|
58
|
-
*::part(base):focus {
|
|
59
|
-
border-color: ${props.backgroundcolor
|
|
60
|
-
? props.backgroundcolor
|
|
61
|
-
: props.medium
|
|
62
|
-
? medium[props.medium].color
|
|
63
|
-
: ""}D1!important;
|
|
64
|
-
}
|
|
65
66
|
|
|
66
67
|
*::part(label) {
|
|
67
68
|
position: relative;
|
|
@@ -71,7 +72,7 @@ export function ShareButtonView(props, children) {
|
|
|
71
72
|
return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
|
|
72
73
|
h("style", { type: "text/css" }, styleString),
|
|
73
74
|
h("style", { type: "text/css" }, vanillaStyle),
|
|
74
|
-
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}
|
|
75
|
+
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` },
|
|
75
76
|
!props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
|
|
76
77
|
!props.hidetext && children)));
|
|
77
78
|
}
|