@saasquatch/mint-components 1.5.0-113 → 1.5.0-114
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/{GenericTableView-f947b749.js → GenericTableView-a69fddb5.js} +4 -2
- package/dist/cjs/{ShadowViewAddon-79dd6c07.js → ShadowViewAddon-b0dc2cbf.js} +14 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_30.cjs.entry.js +20 -8
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +9 -12
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +42 -50
- package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +1 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +1 -1
- package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +2 -2
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +0 -5
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -1
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +0 -1
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +10 -10
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +8 -24
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +1 -26
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
- package/dist/collection/components/sqm-scroll/Scroll.stories.js +14 -23
- package/dist/collection/components/sqm-scroll/sqm-scroll.js +101 -147
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +8 -8
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +13 -13
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +21 -21
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +3 -1
- package/dist/collection/tables/GenericTableView.js +4 -2
- package/dist/esm/{GenericTableView-6b7b537b.js → GenericTableView-042ed0ca.js} +4 -2
- package/dist/esm/{ShadowViewAddon-9c382e30.js → ShadowViewAddon-1c28d584.js} +14 -19
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_30.entry.js +20 -8
- package/dist/esm/sqm-referral-table_11.entry.js +1 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +9 -12
- package/dist/esm/sqm-stencilbook.entry.js +42 -50
- package/dist/esm-es5/GenericTableView-042ed0ca.js +1 -0
- package/dist/esm-es5/ShadowViewAddon-1c28d584.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_30.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-46c31936.entry.js +1 -0
- package/dist/mint-components/p-55f3d841.system.js +1 -1
- package/dist/mint-components/{p-e16186c0.system.entry.js → p-660e371f.system.entry.js} +1 -1
- package/dist/mint-components/{p-1cd23e56.system.entry.js → p-6918a207.system.entry.js} +1 -1
- package/dist/mint-components/{p-bb497e73.entry.js → p-920a2900.entry.js} +2 -2
- package/dist/mint-components/p-9a2b9ff8.system.entry.js +1 -0
- package/dist/mint-components/p-a11e1cb1.system.js +1 -0
- package/dist/mint-components/p-b74de10f.js +1 -0
- package/dist/mint-components/p-b7f5d9e7.entry.js +9 -0
- package/dist/mint-components/p-bf49f17f.system.js +1 -0
- package/dist/mint-components/{p-eb61462d.entry.js → p-d79e1aa4.entry.js} +8 -8
- package/dist/mint-components/{p-2c5d7a20.js → p-f017e3da.js} +3 -3
- package/dist/mint-components/{p-e2731437.system.entry.js → p-fa68591b.system.entry.js} +1 -1
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +0 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +0 -4
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +1 -1
- package/dist/types/components/sqm-scroll/Scroll.stories.d.ts +1 -0
- package/dist/types/components/sqm-scroll/sqm-scroll.d.ts +56 -8
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +6 -6
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +9 -9
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +2 -0
- package/dist/types/components.d.ts +116 -42
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/shoelace/assets/icons/123.svg +3 -0
- package/shoelace/assets/icons/activity.svg +3 -0
- package/shoelace/assets/icons/apple.svg +4 -0
- package/shoelace/assets/icons/bandaid-fill.svg +3 -0
- package/shoelace/assets/icons/bandaid.svg +4 -0
- package/shoelace/assets/icons/bank.svg +3 -0
- package/shoelace/assets/icons/bank2.svg +3 -0
- package/shoelace/assets/icons/behance.svg +3 -0
- package/shoelace/assets/icons/bell-slash-fill.svg +3 -0
- package/shoelace/assets/icons/bell-slash.svg +3 -0
- package/shoelace/assets/icons/bluetooth.svg +3 -0
- package/shoelace/assets/icons/body-text.svg +3 -0
- package/shoelace/assets/icons/boombox-fill.svg +4 -0
- package/shoelace/assets/icons/boombox.svg +6 -0
- package/shoelace/assets/icons/boxes.svg +3 -0
- package/shoelace/assets/icons/cash-coin.svg +6 -0
- package/shoelace/assets/icons/check-lg.svg +3 -0
- package/shoelace/assets/icons/cloud-haze2.svg +3 -0
- package/shoelace/assets/icons/coin.svg +5 -0
- package/shoelace/assets/icons/currency-bitcoin.svg +3 -0
- package/shoelace/assets/icons/currency-dollar.svg +3 -0
- package/shoelace/assets/icons/currency-euro.svg +3 -0
- package/shoelace/assets/icons/currency-exchange.svg +3 -0
- package/shoelace/assets/icons/currency-pound.svg +3 -0
- package/shoelace/assets/icons/currency-yen.svg +3 -0
- package/shoelace/assets/icons/dash-lg.svg +3 -0
- package/shoelace/assets/icons/device-hdd-fill.svg +4 -0
- package/shoelace/assets/icons/device-hdd.svg +5 -0
- package/shoelace/assets/icons/device-ssd-fill.svg +4 -0
- package/shoelace/assets/icons/device-ssd.svg +4 -0
- package/shoelace/assets/icons/displayport-fill.svg +3 -0
- package/shoelace/assets/icons/displayport.svg +4 -0
- package/shoelace/assets/icons/dpad-fill.svg +3 -0
- package/shoelace/assets/icons/dpad.svg +4 -0
- package/shoelace/assets/icons/dribbble.svg +3 -0
- package/shoelace/assets/icons/ear-fill.svg +3 -0
- package/shoelace/assets/icons/ear.svg +3 -0
- package/shoelace/assets/icons/easel2-fill.svg +4 -0
- package/shoelace/assets/icons/easel2.svg +3 -0
- package/shoelace/assets/icons/easel3-fill.svg +3 -0
- package/shoelace/assets/icons/easel3.svg +3 -0
- package/shoelace/assets/icons/envelope-check-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-check.svg +4 -0
- package/shoelace/assets/icons/envelope-dash-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-dash.svg +4 -0
- package/shoelace/assets/icons/envelope-exclamation-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-exclamation.svg +4 -0
- package/shoelace/assets/icons/envelope-plus-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-plus.svg +4 -0
- package/shoelace/assets/icons/envelope-slash-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-slash.svg +4 -0
- package/shoelace/assets/icons/envelope-x-fill.svg +4 -0
- package/shoelace/assets/icons/envelope-x.svg +4 -0
- package/shoelace/assets/icons/ethernet.svg +4 -0
- package/shoelace/assets/icons/exclamation-lg.svg +3 -0
- package/shoelace/assets/icons/explicit-fill.svg +3 -0
- package/shoelace/assets/icons/explicit.svg +4 -0
- package/shoelace/assets/icons/fan.svg +4 -0
- package/shoelace/assets/icons/file-earmark-pdf-fill.svg +4 -0
- package/shoelace/assets/icons/file-earmark-pdf.svg +4 -0
- package/shoelace/assets/icons/file-pdf-fill.svg +4 -0
- package/shoelace/assets/icons/file-pdf.svg +4 -0
- package/shoelace/assets/icons/fingerprint.svg +7 -0
- package/shoelace/assets/icons/gender-ambiguous.svg +3 -0
- package/shoelace/assets/icons/gender-female.svg +3 -0
- package/shoelace/assets/icons/gender-male.svg +3 -0
- package/shoelace/assets/icons/gender-trans.svg +3 -0
- package/shoelace/assets/icons/git.svg +3 -0
- package/shoelace/assets/icons/gpu-card.svg +5 -0
- package/shoelace/assets/icons/graph-down-arrow.svg +3 -0
- package/shoelace/assets/icons/graph-up-arrow.svg +3 -0
- package/shoelace/assets/icons/hdmi-fill.svg +3 -0
- package/shoelace/assets/icons/hdmi.svg +4 -0
- package/shoelace/assets/icons/headset-vr.svg +4 -0
- package/shoelace/assets/icons/hypnotize.svg +4 -0
- package/shoelace/assets/icons/infinity.svg +3 -0
- package/shoelace/assets/icons/info-lg.svg +3 -0
- package/shoelace/assets/icons/line.svg +3 -0
- package/shoelace/assets/icons/list-columns-reverse.svg +3 -0
- package/shoelace/assets/icons/list-columns.svg +3 -0
- package/shoelace/assets/icons/magic.svg +3 -0
- package/shoelace/assets/icons/mastodon.svg +3 -0
- package/shoelace/assets/icons/medium.svg +3 -0
- package/shoelace/assets/icons/memory.svg +3 -0
- package/shoelace/assets/icons/messenger.svg +3 -0
- package/shoelace/assets/icons/meta.svg +3 -0
- package/shoelace/assets/icons/microsoft.svg +3 -0
- package/shoelace/assets/icons/modem-fill.svg +3 -0
- package/shoelace/assets/icons/modem.svg +4 -0
- package/shoelace/assets/icons/mortarboard-fill.svg +4 -0
- package/shoelace/assets/icons/mortarboard.svg +4 -0
- package/shoelace/assets/icons/motherboard-fill.svg +4 -0
- package/shoelace/assets/icons/motherboard.svg +4 -0
- package/shoelace/assets/icons/nintendo-switch.svg +4 -0
- package/shoelace/assets/icons/optical-audio-fill.svg +4 -0
- package/shoelace/assets/icons/optical-audio.svg +5 -0
- package/shoelace/assets/icons/paypal.svg +3 -0
- package/shoelace/assets/icons/pc-display-horizontal.svg +3 -0
- package/shoelace/assets/icons/pc-display.svg +3 -0
- package/shoelace/assets/icons/pc-horizontal.svg +3 -0
- package/shoelace/assets/icons/pc.svg +3 -0
- package/shoelace/assets/icons/pci-card.svg +4 -0
- package/shoelace/assets/icons/person-rolodex.svg +4 -0
- package/shoelace/assets/icons/person-video.svg +4 -0
- package/shoelace/assets/icons/person-video2.svg +4 -0
- package/shoelace/assets/icons/person-video3.svg +4 -0
- package/shoelace/assets/icons/person-workspace.svg +4 -0
- package/shoelace/assets/icons/piggy-bank-fill.svg +3 -0
- package/shoelace/assets/icons/piggy-bank.svg +4 -0
- package/shoelace/assets/icons/pin-map-fill.svg +4 -0
- package/shoelace/assets/icons/pin-map.svg +4 -0
- package/shoelace/assets/icons/pinterest.svg +3 -0
- package/shoelace/assets/icons/playstation.svg +3 -0
- package/shoelace/assets/icons/plus-lg.svg +3 -0
- package/shoelace/assets/icons/plus-slash-minus.svg +3 -0
- package/shoelace/assets/icons/projector-fill.svg +3 -0
- package/shoelace/assets/icons/projector.svg +4 -0
- package/shoelace/assets/icons/qr-code-scan.svg +7 -0
- package/shoelace/assets/icons/qr-code.svg +7 -0
- package/shoelace/assets/icons/question-lg.svg +3 -0
- package/shoelace/assets/icons/quora.svg +3 -0
- package/shoelace/assets/icons/quote.svg +3 -0
- package/shoelace/assets/icons/radioactive.svg +4 -0
- package/shoelace/assets/icons/recycle.svg +3 -0
- package/shoelace/assets/icons/reddit.svg +4 -0
- package/shoelace/assets/icons/robot.svg +4 -0
- package/shoelace/assets/icons/router-fill.svg +6 -0
- package/shoelace/assets/icons/router.svg +6 -0
- package/shoelace/assets/icons/safe-fill.svg +4 -0
- package/shoelace/assets/icons/safe.svg +4 -0
- package/shoelace/assets/icons/safe2-fill.svg +4 -0
- package/shoelace/assets/icons/safe2.svg +4 -0
- package/shoelace/assets/icons/sd-card-fill.svg +3 -0
- package/shoelace/assets/icons/sd-card.svg +4 -0
- package/shoelace/assets/icons/send-check-fill.svg +4 -0
- package/shoelace/assets/icons/send-check.svg +4 -0
- package/shoelace/assets/icons/send-dash-fill.svg +4 -0
- package/shoelace/assets/icons/send-dash.svg +4 -0
- package/shoelace/assets/icons/send-exclamation-fill.svg +4 -0
- package/shoelace/assets/icons/send-exclamation.svg +4 -0
- package/shoelace/assets/icons/send-fill.svg +3 -0
- package/shoelace/assets/icons/send-plus-fill.svg +4 -0
- package/shoelace/assets/icons/send-plus.svg +4 -0
- package/shoelace/assets/icons/send-slash-fill.svg +4 -0
- package/shoelace/assets/icons/send-slash.svg +4 -0
- package/shoelace/assets/icons/send-x-fill.svg +4 -0
- package/shoelace/assets/icons/send-x.svg +4 -0
- package/shoelace/assets/icons/send.svg +3 -0
- package/shoelace/assets/icons/signal.svg +3 -0
- package/shoelace/assets/icons/skype.svg +3 -0
- package/shoelace/assets/icons/slash-lg.svg +3 -0
- package/shoelace/assets/icons/snapchat.svg +3 -0
- package/shoelace/assets/icons/spotify.svg +3 -0
- package/shoelace/assets/icons/stack-overflow.svg +4 -0
- package/shoelace/assets/icons/steam.svg +4 -0
- package/shoelace/assets/icons/strava.svg +3 -0
- package/shoelace/assets/icons/terminal-dash.svg +4 -0
- package/shoelace/assets/icons/terminal-plus.svg +4 -0
- package/shoelace/assets/icons/terminal-split.svg +4 -0
- package/shoelace/assets/icons/terminal-x.svg +4 -0
- package/shoelace/assets/icons/thunderbolt-fill.svg +3 -0
- package/shoelace/assets/icons/thunderbolt.svg +4 -0
- package/shoelace/assets/icons/ticket-detailed-fill.svg +3 -0
- package/shoelace/assets/icons/ticket-detailed.svg +4 -0
- package/shoelace/assets/icons/ticket-fill.svg +3 -0
- package/shoelace/assets/icons/ticket-perforated-fill.svg +3 -0
- package/shoelace/assets/icons/ticket-perforated.svg +4 -0
- package/shoelace/assets/icons/ticket.svg +3 -0
- package/shoelace/assets/icons/tiktok.svg +3 -0
- package/shoelace/assets/icons/translate.svg +4 -0
- package/shoelace/assets/icons/usb-c-fill.svg +3 -0
- package/shoelace/assets/icons/usb-c.svg +4 -0
- package/shoelace/assets/icons/usb-drive-fill.svg +3 -0
- package/shoelace/assets/icons/usb-drive.svg +3 -0
- package/shoelace/assets/icons/usb-fill.svg +3 -0
- package/shoelace/assets/icons/usb-micro-fill.svg +3 -0
- package/shoelace/assets/icons/usb-micro.svg +4 -0
- package/shoelace/assets/icons/usb-mini-fill.svg +3 -0
- package/shoelace/assets/icons/usb-mini.svg +4 -0
- package/shoelace/assets/icons/usb-plug-fill.svg +3 -0
- package/shoelace/assets/icons/usb-plug.svg +3 -0
- package/shoelace/assets/icons/usb-symbol.svg +3 -0
- package/shoelace/assets/icons/usb.svg +4 -0
- package/shoelace/assets/icons/vimeo.svg +3 -0
- package/shoelace/assets/icons/webcam-fill.svg +4 -0
- package/shoelace/assets/icons/webcam.svg +4 -0
- package/shoelace/assets/icons/window-dash.svg +5 -0
- package/shoelace/assets/icons/window-desktop.svg +4 -0
- package/shoelace/assets/icons/window-fullscreen.svg +4 -0
- package/shoelace/assets/icons/window-plus.svg +5 -0
- package/shoelace/assets/icons/window-split.svg +4 -0
- package/shoelace/assets/icons/window-stack.svg +4 -0
- package/shoelace/assets/icons/window-x.svg +5 -0
- package/shoelace/assets/icons/windows.svg +3 -0
- package/shoelace/assets/icons/wordpress.svg +5 -0
- package/shoelace/assets/icons/x-lg.svg +4 -0
- package/shoelace/assets/icons/xbox.svg +3 -0
- package/shoelace/assets/icons/yin-yang.svg +4 -0
- package/shoelace/themes/themes/dark.styles.d.ts +2 -0
- package/shoelace/themes/themes/dark.styles.js +531 -0
- package/shoelace/themes/themes/light.css +439 -0
- package/shoelace/themes/themes/light.styles.d.ts +2 -0
- package/shoelace/themes/themes/light.styles.js +531 -0
- package/dist/esm-es5/GenericTableView-6b7b537b.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-9c382e30.js +0 -1
- package/dist/mint-components/p-1b71a09e.system.entry.js +0 -1
- package/dist/mint-components/p-3f88f8eb.system.js +0 -1
- package/dist/mint-components/p-45581e0b.entry.js +0 -9
- package/dist/mint-components/p-48161ba8.js +0 -1
- package/dist/mint-components/p-546ee840.entry.js +0 -1
- package/dist/mint-components/p-ac303785.system.js +0 -1
|
@@ -9,7 +9,7 @@ import { useChildElements } from "../../tables/useChildElements";
|
|
|
9
9
|
import mockRewardData from "./mockRewardData";
|
|
10
10
|
import { tryMethod, useRewardsTable } from "./useRewardsTable";
|
|
11
11
|
/**
|
|
12
|
-
* @uiName
|
|
12
|
+
* @uiName Reward Table
|
|
13
13
|
*/
|
|
14
14
|
export class RewardsTable {
|
|
15
15
|
constructor() {
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
};
|
|
5
5
|
export const ScrollTag = () => {
|
|
6
6
|
return (h("div", { style: { position: "relative", height: "2000px" } },
|
|
7
|
-
h("sqm-scroll", { "scroll-tag-name": "sqm-text", "button-text": "Scroll" }),
|
|
7
|
+
h("sqm-scroll", { "scroll-tag-name": "sqm-text", "button-text": "Scroll", "scroll-animation": "smooth" }),
|
|
8
8
|
h("div", { style: { position: "absolute", bottom: "0" } },
|
|
9
9
|
h("sqm-text", { slot: "label" },
|
|
10
10
|
h("h3", null, "Earn more rewards"),
|
|
@@ -12,7 +12,15 @@ export const ScrollTag = () => {
|
|
|
12
12
|
};
|
|
13
13
|
export const ScrollId = () => {
|
|
14
14
|
return (h("div", { style: { position: "relative", height: "2000px" } },
|
|
15
|
-
h("sqm-scroll", { "button-text": "Scroll", "scroll-id": "my-id" }),
|
|
15
|
+
h("sqm-scroll", { "button-text": "Scroll", "scroll-id": "my-id", "scroll-animation": "smooth" }),
|
|
16
|
+
h("div", { style: { position: "absolute", bottom: "0" } },
|
|
17
|
+
h("sqm-text", { slot: "label", id: "my-id" },
|
|
18
|
+
h("h3", null, "Earn more rewards"),
|
|
19
|
+
h("p", null, "Get points while using Klip. Use those points to redeem rewards like one free month of Klip Enterprise or two plane tickets to anywhere in North America")))));
|
|
20
|
+
};
|
|
21
|
+
export const ScrollAutoAnimation = () => {
|
|
22
|
+
return (h("div", { style: { position: "relative", height: "2000px" } },
|
|
23
|
+
h("sqm-scroll", { "button-text": "Scroll", "scroll-id": "my-id", "scroll-animation": "auto" }),
|
|
16
24
|
h("div", { style: { position: "absolute", bottom: "0" } },
|
|
17
25
|
h("sqm-text", { slot: "label", id: "my-id" },
|
|
18
26
|
h("h3", null, "Earn more rewards"),
|
|
@@ -20,7 +28,7 @@ export const ScrollId = () => {
|
|
|
20
28
|
};
|
|
21
29
|
export const ScrollTabGroup = () => {
|
|
22
30
|
return (h("div", { style: { position: "relative", height: "2000px" } },
|
|
23
|
-
h("sqm-scroll", { "button-text": "Redeem rewards", "scroll-id": "tab-3" }),
|
|
31
|
+
h("sqm-scroll", { "button-text": "Redeem rewards", "scroll-id": "tab-3", "scroll-animation": "smooth" }),
|
|
24
32
|
h("div", { style: { position: "absolute", bottom: "0" }, innerHTML: `
|
|
25
33
|
<sqm-tabs>
|
|
26
34
|
<sqm-tab header="Leaderboard">
|
|
@@ -109,12 +117,9 @@ export const ShoelaceProps = () => {
|
|
|
109
117
|
h("br", null),
|
|
110
118
|
" ",
|
|
111
119
|
h("hr", null),
|
|
112
|
-
h("h3", null, "Caret:"),
|
|
113
|
-
h("sqm-scroll", { caret: true }, "Button"),
|
|
114
|
-
h("br", null),
|
|
115
|
-
" ",
|
|
116
|
-
h("hr", null),
|
|
117
120
|
h("h3", null, "Icon:"),
|
|
121
|
+
h("sqm-scroll", { "button-type": "primary", iconName: "facebook" }, "Icon Name"),
|
|
122
|
+
h("br", null),
|
|
118
123
|
h("sqm-scroll", { iconName: "gear", iconSlot: "prefix" }, "Icon Slot Prefix"),
|
|
119
124
|
h("br", null),
|
|
120
125
|
h("sqm-scroll", { iconName: "gear", iconSlot: "suffix" }, "Icon Slot Suffix"),
|
|
@@ -131,22 +136,8 @@ export const ShoelaceProps = () => {
|
|
|
131
136
|
h("br", null),
|
|
132
137
|
" ",
|
|
133
138
|
h("hr", null),
|
|
134
|
-
h("h3", null, "Disabled:"),
|
|
135
|
-
h("sqm-scroll", { disabled: true }, "Button"),
|
|
136
|
-
h("br", null),
|
|
137
|
-
" ",
|
|
138
|
-
h("hr", null),
|
|
139
|
-
h("h3", null, "Link:"),
|
|
140
|
-
h("sqm-scroll", { href: "https://example.com/" }, "Link"),
|
|
141
|
-
h("br", null),
|
|
142
|
-
h("sqm-scroll", { href: "https://example.com/", target: "_self" }, "Same Window"),
|
|
143
|
-
h("br", null),
|
|
144
|
-
h("sqm-scroll", { href: "/assets/images/wordmark.svg", download: "shoelace.svg" }, "Download"),
|
|
145
|
-
h("br", null),
|
|
146
|
-
" ",
|
|
147
|
-
h("hr", null),
|
|
148
139
|
h("h3", null, "Mobile Friendly:"),
|
|
149
|
-
h("sqm-scroll", {
|
|
140
|
+
h("sqm-scroll", { mobile: true }, "Button"),
|
|
150
141
|
h("br", null),
|
|
151
142
|
" ",
|
|
152
143
|
h("hr", null)));
|
|
@@ -2,10 +2,23 @@ import { withHooks } from "@saasquatch/stencil-hooks";
|
|
|
2
2
|
import { Component, h, Prop, State } from "@stencil/core";
|
|
3
3
|
import { useScroll } from "./useScroll";
|
|
4
4
|
import { createStyleSheet } from "../../styling/JSS";
|
|
5
|
+
/**
|
|
6
|
+
* @uiName Scroll
|
|
7
|
+
*/
|
|
5
8
|
export class Scroll {
|
|
6
9
|
constructor() {
|
|
7
10
|
this.ignored = true;
|
|
11
|
+
/**
|
|
12
|
+
* @uiName Button Type
|
|
13
|
+
* @uiType string
|
|
14
|
+
* @uiEnum ["default", "primary", "success", "neutral", "warning", "danger", "text"]
|
|
15
|
+
*/
|
|
8
16
|
this.buttonType = "default";
|
|
17
|
+
/**
|
|
18
|
+
* @uiName Scroll Animation Style
|
|
19
|
+
* @uiType string
|
|
20
|
+
* @uiEnum ["smooth", "auto"]
|
|
21
|
+
*/
|
|
9
22
|
this.scrollAnimation = "smooth";
|
|
10
23
|
withHooks(this);
|
|
11
24
|
}
|
|
@@ -36,9 +49,9 @@ export class Scroll {
|
|
|
36
49
|
const styleString = sheet.toString();
|
|
37
50
|
const vanillaStyle = `
|
|
38
51
|
:host{
|
|
39
|
-
display:
|
|
52
|
+
display: contents;
|
|
40
53
|
}
|
|
41
|
-
${this.
|
|
54
|
+
${this.mobile &&
|
|
42
55
|
`
|
|
43
56
|
@media only screen and (max-width: 499px) {
|
|
44
57
|
:host {
|
|
@@ -50,14 +63,14 @@ export class Scroll {
|
|
|
50
63
|
let classStack = "";
|
|
51
64
|
if (this.outline)
|
|
52
65
|
classStack += "outline ";
|
|
53
|
-
if (this.
|
|
66
|
+
if (this.mobile)
|
|
54
67
|
classStack += "mobile ";
|
|
55
68
|
return (h("div", { class: sheet.classes.Button },
|
|
56
69
|
h("style", { type: "text/css" },
|
|
57
70
|
vanillaStyle,
|
|
58
71
|
styleString),
|
|
59
|
-
h("sl-button", { type: this.outline ? "primary" : this.buttonType, onClick: callbacks.scroll, size: this.size, pill: this.pill,
|
|
60
|
-
this.iconSlot
|
|
72
|
+
h("sl-button", { type: this.outline ? "primary" : this.buttonType, onClick: callbacks.scroll, size: this.size, pill: this.pill, circle: this.circle, class: classStack },
|
|
73
|
+
(this.iconSlot || this.iconName) && (h("sl-icon", { slot: this.iconSlot || "prefix", name: this.iconName })),
|
|
61
74
|
this.buttonText,
|
|
62
75
|
h("slot", null))));
|
|
63
76
|
}
|
|
@@ -75,7 +88,16 @@ export class Scroll {
|
|
|
75
88
|
"required": false,
|
|
76
89
|
"optional": false,
|
|
77
90
|
"docs": {
|
|
78
|
-
"tags": [
|
|
91
|
+
"tags": [{
|
|
92
|
+
"text": "Button Type",
|
|
93
|
+
"name": "uiName"
|
|
94
|
+
}, {
|
|
95
|
+
"text": "string",
|
|
96
|
+
"name": "uiType"
|
|
97
|
+
}, {
|
|
98
|
+
"text": "[\"default\", \"primary\", \"success\", \"neutral\", \"warning\", \"danger\", \"text\"]",
|
|
99
|
+
"name": "uiEnum"
|
|
100
|
+
}],
|
|
79
101
|
"text": ""
|
|
80
102
|
},
|
|
81
103
|
"attribute": "button-type",
|
|
@@ -93,7 +115,10 @@ export class Scroll {
|
|
|
93
115
|
"required": false,
|
|
94
116
|
"optional": false,
|
|
95
117
|
"docs": {
|
|
96
|
-
"tags": [
|
|
118
|
+
"tags": [{
|
|
119
|
+
"text": "Button Text",
|
|
120
|
+
"name": "uiName"
|
|
121
|
+
}],
|
|
97
122
|
"text": ""
|
|
98
123
|
},
|
|
99
124
|
"attribute": "button-text",
|
|
@@ -110,7 +135,10 @@ export class Scroll {
|
|
|
110
135
|
"required": false,
|
|
111
136
|
"optional": true,
|
|
112
137
|
"docs": {
|
|
113
|
-
"tags": [
|
|
138
|
+
"tags": [{
|
|
139
|
+
"text": "Scroll Tag Name",
|
|
140
|
+
"name": "uiName"
|
|
141
|
+
}],
|
|
114
142
|
"text": ""
|
|
115
143
|
},
|
|
116
144
|
"attribute": "scroll-tag-name",
|
|
@@ -127,7 +155,10 @@ export class Scroll {
|
|
|
127
155
|
"required": false,
|
|
128
156
|
"optional": true,
|
|
129
157
|
"docs": {
|
|
130
|
-
"tags": [
|
|
158
|
+
"tags": [{
|
|
159
|
+
"text": "Scroll Id",
|
|
160
|
+
"name": "uiName"
|
|
161
|
+
}],
|
|
131
162
|
"text": ""
|
|
132
163
|
},
|
|
133
164
|
"attribute": "scroll-id",
|
|
@@ -144,30 +175,22 @@ export class Scroll {
|
|
|
144
175
|
"required": false,
|
|
145
176
|
"optional": false,
|
|
146
177
|
"docs": {
|
|
147
|
-
"tags": [
|
|
178
|
+
"tags": [{
|
|
179
|
+
"text": "Scroll Animation Style",
|
|
180
|
+
"name": "uiName"
|
|
181
|
+
}, {
|
|
182
|
+
"text": "string",
|
|
183
|
+
"name": "uiType"
|
|
184
|
+
}, {
|
|
185
|
+
"text": "[\"smooth\", \"auto\"]",
|
|
186
|
+
"name": "uiEnum"
|
|
187
|
+
}],
|
|
148
188
|
"text": ""
|
|
149
189
|
},
|
|
150
190
|
"attribute": "scroll-animation",
|
|
151
191
|
"reflect": false,
|
|
152
192
|
"defaultValue": "\"smooth\""
|
|
153
193
|
},
|
|
154
|
-
"mobileFriendly": {
|
|
155
|
-
"type": "boolean",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "boolean",
|
|
159
|
-
"resolved": "boolean",
|
|
160
|
-
"references": {}
|
|
161
|
-
},
|
|
162
|
-
"required": false,
|
|
163
|
-
"optional": true,
|
|
164
|
-
"docs": {
|
|
165
|
-
"tags": [],
|
|
166
|
-
"text": ""
|
|
167
|
-
},
|
|
168
|
-
"attribute": "mobile-friendly",
|
|
169
|
-
"reflect": false
|
|
170
|
-
},
|
|
171
194
|
"size": {
|
|
172
195
|
"type": "string",
|
|
173
196
|
"mutable": false,
|
|
@@ -179,7 +202,16 @@ export class Scroll {
|
|
|
179
202
|
"required": false,
|
|
180
203
|
"optional": false,
|
|
181
204
|
"docs": {
|
|
182
|
-
"tags": [
|
|
205
|
+
"tags": [{
|
|
206
|
+
"text": "Size",
|
|
207
|
+
"name": "uiName"
|
|
208
|
+
}, {
|
|
209
|
+
"text": "string",
|
|
210
|
+
"name": "uiType"
|
|
211
|
+
}, {
|
|
212
|
+
"text": "[\"small\", \"medium\", \"large\"]",
|
|
213
|
+
"name": "uiEnum"
|
|
214
|
+
}],
|
|
183
215
|
"text": ""
|
|
184
216
|
},
|
|
185
217
|
"attribute": "size",
|
|
@@ -196,8 +228,11 @@ export class Scroll {
|
|
|
196
228
|
"required": false,
|
|
197
229
|
"optional": false,
|
|
198
230
|
"docs": {
|
|
199
|
-
"tags": [
|
|
200
|
-
|
|
231
|
+
"tags": [{
|
|
232
|
+
"text": "Outline",
|
|
233
|
+
"name": "uiName"
|
|
234
|
+
}],
|
|
235
|
+
"text": "Draws an outlined button with primary color."
|
|
201
236
|
},
|
|
202
237
|
"attribute": "outline",
|
|
203
238
|
"reflect": false
|
|
@@ -213,29 +248,15 @@ export class Scroll {
|
|
|
213
248
|
"required": false,
|
|
214
249
|
"optional": false,
|
|
215
250
|
"docs": {
|
|
216
|
-
"tags": [
|
|
217
|
-
|
|
251
|
+
"tags": [{
|
|
252
|
+
"text": "Pill",
|
|
253
|
+
"name": "uiName"
|
|
254
|
+
}],
|
|
255
|
+
"text": "Draws a pill-style button with rounded edges."
|
|
218
256
|
},
|
|
219
257
|
"attribute": "pill",
|
|
220
258
|
"reflect": false
|
|
221
259
|
},
|
|
222
|
-
"href": {
|
|
223
|
-
"type": "string",
|
|
224
|
-
"mutable": false,
|
|
225
|
-
"complexType": {
|
|
226
|
-
"original": "string",
|
|
227
|
-
"resolved": "string",
|
|
228
|
-
"references": {}
|
|
229
|
-
},
|
|
230
|
-
"required": false,
|
|
231
|
-
"optional": false,
|
|
232
|
-
"docs": {
|
|
233
|
-
"tags": [],
|
|
234
|
-
"text": ""
|
|
235
|
-
},
|
|
236
|
-
"attribute": "href",
|
|
237
|
-
"reflect": false
|
|
238
|
-
},
|
|
239
260
|
"circle": {
|
|
240
261
|
"type": "boolean",
|
|
241
262
|
"mutable": false,
|
|
@@ -247,30 +268,16 @@ export class Scroll {
|
|
|
247
268
|
"required": false,
|
|
248
269
|
"optional": false,
|
|
249
270
|
"docs": {
|
|
250
|
-
"tags": [
|
|
251
|
-
|
|
271
|
+
"tags": [{
|
|
272
|
+
"text": "Circle",
|
|
273
|
+
"name": "uiName"
|
|
274
|
+
}],
|
|
275
|
+
"text": "Draws a circle button."
|
|
252
276
|
},
|
|
253
277
|
"attribute": "circle",
|
|
254
278
|
"reflect": false
|
|
255
279
|
},
|
|
256
|
-
"
|
|
257
|
-
"type": "string",
|
|
258
|
-
"mutable": false,
|
|
259
|
-
"complexType": {
|
|
260
|
-
"original": "string",
|
|
261
|
-
"resolved": "string",
|
|
262
|
-
"references": {}
|
|
263
|
-
},
|
|
264
|
-
"required": false,
|
|
265
|
-
"optional": false,
|
|
266
|
-
"docs": {
|
|
267
|
-
"tags": [],
|
|
268
|
-
"text": ""
|
|
269
|
-
},
|
|
270
|
-
"attribute": "name",
|
|
271
|
-
"reflect": false
|
|
272
|
-
},
|
|
273
|
-
"target": {
|
|
280
|
+
"iconSlot": {
|
|
274
281
|
"type": "string",
|
|
275
282
|
"mutable": false,
|
|
276
283
|
"complexType": {
|
|
@@ -281,13 +288,22 @@ export class Scroll {
|
|
|
281
288
|
"required": false,
|
|
282
289
|
"optional": false,
|
|
283
290
|
"docs": {
|
|
284
|
-
"tags": [
|
|
291
|
+
"tags": [{
|
|
292
|
+
"text": "Icon Slot",
|
|
293
|
+
"name": "uiName"
|
|
294
|
+
}, {
|
|
295
|
+
"text": "string",
|
|
296
|
+
"name": "uiType"
|
|
297
|
+
}, {
|
|
298
|
+
"text": "[\"prefix\", \"suffix\"]",
|
|
299
|
+
"name": "uiEnum"
|
|
300
|
+
}],
|
|
285
301
|
"text": ""
|
|
286
302
|
},
|
|
287
|
-
"attribute": "
|
|
303
|
+
"attribute": "icon-slot",
|
|
288
304
|
"reflect": false
|
|
289
305
|
},
|
|
290
|
-
"
|
|
306
|
+
"iconName": {
|
|
291
307
|
"type": "string",
|
|
292
308
|
"mutable": false,
|
|
293
309
|
"complexType": {
|
|
@@ -298,47 +314,16 @@ export class Scroll {
|
|
|
298
314
|
"required": false,
|
|
299
315
|
"optional": false,
|
|
300
316
|
"docs": {
|
|
301
|
-
"tags": [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
"reflect": false
|
|
306
|
-
},
|
|
307
|
-
"disabled": {
|
|
308
|
-
"type": "boolean",
|
|
309
|
-
"mutable": false,
|
|
310
|
-
"complexType": {
|
|
311
|
-
"original": "boolean",
|
|
312
|
-
"resolved": "boolean",
|
|
313
|
-
"references": {}
|
|
314
|
-
},
|
|
315
|
-
"required": false,
|
|
316
|
-
"optional": false,
|
|
317
|
-
"docs": {
|
|
318
|
-
"tags": [],
|
|
319
|
-
"text": ""
|
|
320
|
-
},
|
|
321
|
-
"attribute": "disabled",
|
|
322
|
-
"reflect": false
|
|
323
|
-
},
|
|
324
|
-
"caret": {
|
|
325
|
-
"type": "boolean",
|
|
326
|
-
"mutable": false,
|
|
327
|
-
"complexType": {
|
|
328
|
-
"original": "boolean",
|
|
329
|
-
"resolved": "boolean",
|
|
330
|
-
"references": {}
|
|
331
|
-
},
|
|
332
|
-
"required": false,
|
|
333
|
-
"optional": false,
|
|
334
|
-
"docs": {
|
|
335
|
-
"tags": [],
|
|
317
|
+
"tags": [{
|
|
318
|
+
"text": "Icon Name",
|
|
319
|
+
"name": "uiName"
|
|
320
|
+
}],
|
|
336
321
|
"text": ""
|
|
337
322
|
},
|
|
338
|
-
"attribute": "
|
|
323
|
+
"attribute": "icon-name",
|
|
339
324
|
"reflect": false
|
|
340
325
|
},
|
|
341
|
-
"
|
|
326
|
+
"mobile": {
|
|
342
327
|
"type": "boolean",
|
|
343
328
|
"mutable": false,
|
|
344
329
|
"complexType": {
|
|
@@ -347,46 +332,15 @@ export class Scroll {
|
|
|
347
332
|
"references": {}
|
|
348
333
|
},
|
|
349
334
|
"required": false,
|
|
350
|
-
"optional":
|
|
351
|
-
"docs": {
|
|
352
|
-
"tags": [],
|
|
353
|
-
"text": ""
|
|
354
|
-
},
|
|
355
|
-
"attribute": "loading",
|
|
356
|
-
"reflect": false
|
|
357
|
-
},
|
|
358
|
-
"iconSlot": {
|
|
359
|
-
"type": "string",
|
|
360
|
-
"mutable": false,
|
|
361
|
-
"complexType": {
|
|
362
|
-
"original": "string",
|
|
363
|
-
"resolved": "string",
|
|
364
|
-
"references": {}
|
|
365
|
-
},
|
|
366
|
-
"required": false,
|
|
367
|
-
"optional": false,
|
|
368
|
-
"docs": {
|
|
369
|
-
"tags": [],
|
|
370
|
-
"text": ""
|
|
371
|
-
},
|
|
372
|
-
"attribute": "icon-slot",
|
|
373
|
-
"reflect": false
|
|
374
|
-
},
|
|
375
|
-
"iconName": {
|
|
376
|
-
"type": "string",
|
|
377
|
-
"mutable": false,
|
|
378
|
-
"complexType": {
|
|
379
|
-
"original": "string",
|
|
380
|
-
"resolved": "string",
|
|
381
|
-
"references": {}
|
|
382
|
-
},
|
|
383
|
-
"required": false,
|
|
384
|
-
"optional": false,
|
|
335
|
+
"optional": true,
|
|
385
336
|
"docs": {
|
|
386
|
-
"tags": [
|
|
387
|
-
|
|
337
|
+
"tags": [{
|
|
338
|
+
"text": "Mobile Button",
|
|
339
|
+
"name": "uiName"
|
|
340
|
+
}],
|
|
341
|
+
"text": "Sets button to be full width in mobile resolutions"
|
|
388
342
|
},
|
|
389
|
-
"attribute": "
|
|
343
|
+
"attribute": "mobile",
|
|
390
344
|
"reflect": false
|
|
391
345
|
}
|
|
392
346
|
}; }
|
|
@@ -8,11 +8,11 @@ export default {
|
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
10
|
export const WithIconPrefix = () => {
|
|
11
|
-
const props = { medium: "whatsapp",
|
|
11
|
+
const props = { medium: "whatsapp", iconSlot: "prefix" };
|
|
12
12
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
13
13
|
};
|
|
14
14
|
export const WithIconSuffix = () => {
|
|
15
|
-
const props = { medium: "whatsapp",
|
|
15
|
+
const props = { medium: "whatsapp", iconSlot: "suffix" };
|
|
16
16
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
17
17
|
};
|
|
18
18
|
export const WithIconOverride = () => {
|
|
@@ -30,15 +30,15 @@ export const TextStyle = () => {
|
|
|
30
30
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
31
31
|
};
|
|
32
32
|
export const WithoutIcon = () => {
|
|
33
|
-
const props = { medium: "facebook",
|
|
33
|
+
const props = { medium: "facebook", hideIcon: true };
|
|
34
34
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
35
35
|
};
|
|
36
36
|
export const WithoutText = () => {
|
|
37
|
-
const props = { medium: "facebook",
|
|
37
|
+
const props = { medium: "facebook", hideText: true };
|
|
38
38
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
39
39
|
};
|
|
40
40
|
export const TextStyleWithoutIcon = () => {
|
|
41
|
-
const props = { medium: "facebook", type: "text",
|
|
41
|
+
const props = { medium: "facebook", type: "text", hideIcon: true };
|
|
42
42
|
return h(ShareButtonView, Object.assign({}, props), "Share");
|
|
43
43
|
};
|
|
44
44
|
export const WithCustomColors = () => {
|
|
@@ -47,7 +47,7 @@ export const WithCustomColors = () => {
|
|
|
47
47
|
type: "text",
|
|
48
48
|
backgroundcolor: "red",
|
|
49
49
|
textcolor: "yellow",
|
|
50
|
-
|
|
50
|
+
iconSlot: "prefix",
|
|
51
51
|
};
|
|
52
52
|
return h(ShareButtonView, Object.assign({}, props), "Facebook");
|
|
53
53
|
};
|
|
@@ -55,8 +55,8 @@ export const WithCustomBorderRadius = () => {
|
|
|
55
55
|
const props = {
|
|
56
56
|
medium: "facebook",
|
|
57
57
|
type: "text",
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
borderRadius: 8,
|
|
59
|
+
iconSlot: "prefix",
|
|
60
60
|
};
|
|
61
61
|
return h(ShareButtonView, Object.assign({}, props), "Facebook");
|
|
62
62
|
};
|
|
@@ -17,36 +17,36 @@ export function ShareButtonView(props, children) {
|
|
|
17
17
|
const vanillaStyle = `
|
|
18
18
|
*::part(base) {
|
|
19
19
|
border: none;
|
|
20
|
-
--sl-focus-ring-color-primary: ${props.
|
|
21
|
-
? props.
|
|
20
|
+
--sl-focus-ring-color-primary: ${props.backgroundColor
|
|
21
|
+
? props.backgroundColor
|
|
22
22
|
: props.medium
|
|
23
23
|
? medium[props.medium].color
|
|
24
24
|
: ""}80!important;
|
|
25
25
|
|
|
26
|
-
background: ${props.
|
|
27
|
-
? props.
|
|
26
|
+
background: ${props.backgroundColor
|
|
27
|
+
? props.backgroundColor
|
|
28
28
|
: props.medium
|
|
29
29
|
? medium[props.medium].color
|
|
30
30
|
: ""};
|
|
31
|
-
color: ${props.
|
|
32
|
-
? props.
|
|
31
|
+
color: ${props.textColor
|
|
32
|
+
? props.textColor
|
|
33
33
|
: props.medium
|
|
34
34
|
? medium[props.medium].text
|
|
35
35
|
: ""};
|
|
36
|
-
border-radius: ${props.
|
|
36
|
+
border-radius: ${props.borderRadius ? props.borderRadius + "px" : ""};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
*::part(base):hover {
|
|
40
|
-
border-color: ${props.
|
|
41
|
-
? props.
|
|
40
|
+
border-color: ${props.backgroundColor
|
|
41
|
+
? props.backgroundColor
|
|
42
42
|
: props.medium
|
|
43
43
|
? medium[props.medium].color
|
|
44
44
|
: ""}D1!important;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
*::part(base):focus {
|
|
48
|
-
border-color: ${props.
|
|
49
|
-
? props.
|
|
48
|
+
border-color: ${props.backgroundColor
|
|
49
|
+
? props.backgroundColor
|
|
50
50
|
: props.medium
|
|
51
51
|
? medium[props.medium].color
|
|
52
52
|
: ""}D1!important;
|
|
@@ -72,6 +72,6 @@ export function ShareButtonView(props, children) {
|
|
|
72
72
|
h("style", { type: "text/css" }, styleString),
|
|
73
73
|
h("style", { type: "text/css" }, vanillaStyle),
|
|
74
74
|
h("sl-button", { class: sheet.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
|
|
75
|
-
!props.
|
|
76
|
-
!props.
|
|
75
|
+
!props.hideIcon && (h("sl-icon", { slot: props.iconSlot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "icon" })),
|
|
76
|
+
!props.hideText && children)));
|
|
77
77
|
}
|