+
{statusText}
diff --git a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.tsx b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.tsx
index 32863f2751..ce447c1150 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.tsx
@@ -7,7 +7,7 @@ import { RewardTableColumn } from "./RewardTableColumn";
* @uiName Reward Table Date Column
* @validParents ["sqm-rewards-table"]
* @exampleGroup Rewards
- * @example Reward Table Date Column -
+ * @example Date Column -
*/
@Component({
tag: "sqm-rewards-table-date-column",
diff --git a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.tsx b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.tsx
index 9194c7e005..86bcb78226 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.tsx
@@ -4,10 +4,10 @@ import { useRequestRerender } from "../../../tables/re-render";
import { RewardTableColumn } from "./RewardTableColumn";
/**
- * @uiName Reward Table Customer Note Column
+ * @uiName Rewards Table Customer Note Column
* @validParents ["sqm-rewards-table"]
* @exampleGroup Rewards
- * @example Reward Table Customer Note Column -
+ * @example Customer Note Column -
*/
@Component({
tag: "sqm-rewards-table-customer-note-column",
diff --git a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.tsx b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.tsx
index f61378edff..6be53440c7 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.tsx
@@ -6,7 +6,7 @@ import { RewardTableColumn } from "./RewardTableColumn";
* @uiName Rewards Table Reward Column
* @validParents ["sqm-rewards-table"]
* @exampleGroup Rewards
- * @example Rewards Table Reward Column -
+ * @example Reward Column -
*/
@Component({
tag: "sqm-rewards-table-reward-column",
diff --git a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.tsx b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.tsx
index d1e01c11ac..ffce816572 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.tsx
@@ -4,10 +4,10 @@ import { useRequestRerender } from "../../../tables/re-render";
import { RewardTableColumn } from "./RewardTableColumn";
/**
- * @uiName Reward Table Source Column
+ * @uiName Rewards Table Source Column
* @validParents ["sqm-rewards-table"]
* @exampleGroup Rewards
- * @example Reward Table Source Column -
+ * @example Source Column -
*/
@Component({
tag: "sqm-rewards-table-source-column",
diff --git a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx
index 69938c06f8..9f6636ee70 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx
@@ -7,7 +7,7 @@ import { RewardTableColumn } from "./RewardTableColumn";
* @uiName Reward Table Status Column
* @validParents ["sqm-rewards-table"]
* @exampleGroup Rewards
- * @example Reward Table Status Column -
+ * @example Status Column -
*/
@Component({
tag: "sqm-rewards-table-status-column",
diff --git a/packages/mint-components/src/components/sqm-rewards-table/sqm-rewards-table.tsx b/packages/mint-components/src/components/sqm-rewards-table/sqm-rewards-table.tsx
index 001701bb36..3f1ec95267 100644
--- a/packages/mint-components/src/components/sqm-rewards-table/sqm-rewards-table.tsx
+++ b/packages/mint-components/src/components/sqm-rewards-table/sqm-rewards-table.tsx
@@ -19,6 +19,7 @@ import { tryMethod, useRewardsTable } from "./useRewardsTable";
/**
* @uiName Reward Table
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero","sqm-tab","sqb-program-section","sqb-conditional-section"]
* @exampleGroup Rewards
* @slots [{"name":"", "title":"Table Row"},{"name":"empty", "title":"Empty"},{"name":"loading","title":"Loading"}]
* @example Reward Table -
diff --git a/packages/mint-components/src/components/sqm-route/sqm-route.tsx b/packages/mint-components/src/components/sqm-route/sqm-route.tsx
index b2408cc4d6..b8f5d3ec4e 100644
--- a/packages/mint-components/src/components/sqm-route/sqm-route.tsx
+++ b/packages/mint-components/src/components/sqm-route/sqm-route.tsx
@@ -5,6 +5,7 @@ export interface RouteProps {
/**
* @uiName Route
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero","sqm-tab"]
* @slots [{"name":"","title":"Content"}]
*/
@Component({
diff --git a/packages/mint-components/src/components/sqm-router/sqm-router.tsx b/packages/mint-components/src/components/sqm-router/sqm-router.tsx
index d180528112..6df2e86c51 100644
--- a/packages/mint-components/src/components/sqm-router/sqm-router.tsx
+++ b/packages/mint-components/src/components/sqm-router/sqm-router.tsx
@@ -4,6 +4,8 @@ import { useRouter } from "./useRouter";
/**
* @uiName Router
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero","sqm-tab", "sqb-program-section", "sqb-conditional-section"]
+ * @validChildren ["sqm-route"]
* @slots [{"name":"","title":"Routes"}]
*/
@Component({
diff --git a/packages/mint-components/src/components/sqm-scroll/sqm-scroll.tsx b/packages/mint-components/src/components/sqm-scroll/sqm-scroll.tsx
index f683ce85be..304ed1d371 100644
--- a/packages/mint-components/src/components/sqm-scroll/sqm-scroll.tsx
+++ b/packages/mint-components/src/components/sqm-scroll/sqm-scroll.tsx
@@ -5,6 +5,7 @@ import { createStyleSheet } from "../../styling/JSS";
/**
* @uiName Scroll Button
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero","sqm-tab","sqb-program-section","sqb-conditional-section"]
* @slots [{"name":"", "title":"Button Content"}]
* @slotEditor richText
*/
diff --git a/packages/mint-components/src/components/sqm-share-button/ShareButton.stories.tsx b/packages/mint-components/src/components/sqm-share-button/ShareButton.stories.tsx
index cf451b65c8..64ef0bab80 100644
--- a/packages/mint-components/src/components/sqm-share-button/ShareButton.stories.tsx
+++ b/packages/mint-components/src/components/sqm-share-button/ShareButton.stories.tsx
@@ -53,13 +53,15 @@ export const TextStyleWithoutIcon = () => {
return Share;
};
-export const WithCustomColors = () => {
+export const WithCustomColorsAndBranding = () => {
const props = {
medium: "facebook",
type: "text",
backgroundcolor: "red",
textcolor: "yellow",
iconslot: "prefix",
+ border: "2px solid yellow",
+ borderradius: 30,
} as const;
return Facebook;
};
diff --git a/packages/mint-components/src/components/sqm-share-button/readme.md b/packages/mint-components/src/components/sqm-share-button/readme.md
index 2ecd38695c..843e30b5e8 100644
--- a/packages/mint-components/src/components/sqm-share-button/readme.md
+++ b/packages/mint-components/src/components/sqm-share-button/readme.md
@@ -7,26 +7,27 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| ------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
-| `backgroundcolor` | `backgroundcolor` | | `string` | `undefined` |
-| `borderradius` | `borderradius` | Configure border radius with pixel amount | `number` | `undefined` |
-| `demoData` | -- | | `{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: "facebook" \| "twitter" \| "email" \| "direct" \| "linkedin" \| "sms" \| "fbmessenger" \| "whatsapp" \| "linemessenger" \| "pinterest" \| "reminder" \| "unknown"; pill?: boolean; type?: "text" \| "warning" \| "info" \| "success" \| "default" \| "primary" \| "danger"; size?: "small" \| "medium" \| "large"; hideicon?: boolean; hidetext?: boolean; iconslot?: "prefix" \| "suffix"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; isPlainLink?: boolean; }` | `undefined` |
-| `disabled` | `disabled` | | `boolean` | `undefined` |
-| `hideicon` | `hideicon` | | `boolean` | `false` |
-| `hidetext` | `hidetext` | | `boolean` | `false` |
-| `icon` | `icon` | Options available at https://shoelace.style/components/icon Icon used in button. Will try to select an icon based on the share medium if left empty. | `string` | `undefined` |
-| `iconslot` | `iconslot` | | `"prefix" \| "suffix"` | `"prefix"` |
-| `medium` | `medium` | The social medium to share on. Share messages and links will be pulled from your program config and tagged for analytics. | `"direct" \| "email" \| "facebook" \| "fbmessenger" \| "linemessenger" \| "linkedin" \| "pinterest" \| "reminder" \| "sms" \| "twitter" \| "unknown" \| "whatsapp"` | `undefined` |
-| `pill` | `pill` | | `boolean` | `undefined` |
-| `programId` | `program-id` | Optional programId, or uses the programId context where this button is rendered. | `string` | `undefined` |
-| `sharetext` | `sharetext` | Text used for native sharing (mobile only) | `string` | `undefined` |
-| `sharetitle` | `sharetitle` | Title used for native sharing (mobile only) | `string` | `undefined` |
-| `size` | `size` | | `"large" \| "medium" \| "small"` | `undefined` |
-| `textcolor` | `textcolor` | | `string` | `undefined` |
-| `type` | `type` | | `"danger" \| "default" \| "info" \| "primary" \| "success" \| "text" \| "warning"` | `"default"` |
-| `undefinedLinkText` | `undefined-link-text` | Alert text shown if the share link is undefined | `string` | `"Error: message link undefined!"` |
-| `unsupportedPlatformText` | `unsupported-platform-text` | Alert text shown if the user's device does not support native sharing | `string` | `"Error: not on a supported device"` |
+| Property | Attribute | Description | Type | Default |
+| ------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
+| `backgroundcolor` | `backgroundcolor` | | `string` | `undefined` |
+| `border` | `border` | | `string` | `undefined` |
+| `borderradius` | `borderradius` | Configure border radius with pixel amount | `number` | `undefined` |
+| `demoData` | -- | | `{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: "facebook" \| "twitter" \| "email" \| "direct" \| "linkedin" \| "sms" \| "fbmessenger" \| "whatsapp" \| "linemessenger" \| "pinterest" \| "reminder" \| "unknown"; border?: string; pill?: boolean; type?: "text" \| "primary" \| "secondary" \| "warning" \| "info" \| "success" \| "default" \| "danger"; size?: "small" \| "medium" \| "large"; hideicon?: boolean; hidetext?: boolean; iconslot?: "prefix" \| "suffix"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; isPlainLink?: boolean; }` | `undefined` |
+| `disabled` | `disabled` | | `boolean` | `undefined` |
+| `hideicon` | `hideicon` | | `boolean` | `false` |
+| `hidetext` | `hidetext` | | `boolean` | `false` |
+| `icon` | `icon` | Options available at https://shoelace.style/components/icon Icon used in button. Will try to select an icon based on the share medium if left empty. | `string` | `undefined` |
+| `iconslot` | `iconslot` | | `"prefix" \| "suffix"` | `"prefix"` |
+| `medium` | `medium` | The social medium to share on. Share messages and links will be pulled from your program config and tagged for analytics. | `"direct" \| "email" \| "facebook" \| "fbmessenger" \| "linemessenger" \| "linkedin" \| "pinterest" \| "reminder" \| "sms" \| "twitter" \| "unknown" \| "whatsapp"` | `undefined` |
+| `pill` | `pill` | | `boolean` | `undefined` |
+| `programId` | `program-id` | Optional programId, or uses the programId context where this button is rendered. | `string` | `undefined` |
+| `sharetext` | `sharetext` | Text used for native sharing (mobile only) | `string` | `undefined` |
+| `sharetitle` | `sharetitle` | Title used for native sharing (mobile only) | `string` | `undefined` |
+| `size` | `size` | | `"large" \| "medium" \| "small"` | `undefined` |
+| `textcolor` | `textcolor` | | `string` | `undefined` |
+| `type` | `type` | | `"danger" \| "default" \| "info" \| "primary" \| "secondary" \| "success" \| "text" \| "warning"` | `"default"` |
+| `undefinedLinkText` | `undefined-link-text` | Alert text shown if the share link is undefined | `string` | `"Error: message link undefined!"` |
+| `unsupportedPlatformText` | `unsupported-platform-text` | Alert text shown if the user's device does not support native sharing | `string` | `"Error: not on a supported device"` |
## Dependencies
diff --git a/packages/mint-components/src/components/sqm-share-button/sqm-share-button-view.tsx b/packages/mint-components/src/components/sqm-share-button/sqm-share-button-view.tsx
index ca77f43b8d..b4813e2f9f 100644
--- a/packages/mint-components/src/components/sqm-share-button/sqm-share-button-view.tsx
+++ b/packages/mint-components/src/components/sqm-share-button/sqm-share-button-view.tsx
@@ -21,6 +21,7 @@ export interface ShareButtonViewProps {
pill?: boolean;
type?:
| "primary"
+ | "secondary"
| "success"
| "info"
| "warning"
@@ -28,7 +29,7 @@ export interface ShareButtonViewProps {
| "default"
| "text";
size?: "small" | "medium" | "large";
-
+ border?: string;
icon?: string;
hideicon?: boolean;
hidetext?: boolean;
@@ -69,17 +70,32 @@ const style = {
const sheet = createStyleSheet(style);
const styleString = sheet.toString();
+// TODO: Figure out hover and active states
+// *::part(base):hover {
+// border-color: ${
+// props.backgroundcolor
+// ? props.backgroundcolor
+// : props.medium
+// ? medium[props.medium].color
+// : ""
+// }!important;
+// }
+
+// *::part(base):focus {
+// border-color: ${
+// props.backgroundcolor
+// ? props.backgroundcolor
+// : props.medium
+// ? medium[props.medium].color
+// : ""
+// }!important;
+// }
+
export function ShareButtonView(props: ShareButtonViewProps, children: VNode) {
const vanillaStyle = `
- *::part(base) {
- border: none;
- --sl-focus-ring-color-primary: ${
- props.backgroundcolor
- ? props.backgroundcolor
- : props.medium
- ? medium[props.medium].color
- : ""
- }80!important;
+ sl-button::part(base) {
+ border: ${props.border || "none"};
+
background: ${
props.backgroundcolor
@@ -98,25 +114,7 @@ export function ShareButtonView(props: ShareButtonViewProps, children: VNode) {
border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
}
- *::part(base):hover {
- border-color: ${
- props.backgroundcolor
- ? props.backgroundcolor
- : props.medium
- ? medium[props.medium].color
- : ""
- }D1!important;
- }
- *::part(base):focus {
- border-color: ${
- props.backgroundcolor
- ? props.backgroundcolor
- : props.medium
- ? medium[props.medium].color
- : ""
- }D1!important;
- }
*::part(label) {
position: relative;
@@ -140,7 +138,7 @@ export function ShareButtonView(props: ShareButtonViewProps, children: VNode) {
type={props.type}
onClick={!props.isPlainLink ? props.onClick : undefined}
href={props.isPlainLink ? props.messageLink : undefined}
- exportparts={`base: ${props.type}sharebutton-base`}
+ exportparts={`base: ${props.type}button-base`}
>
{!props.hideicon && (
Share on Facebook
* @example X Share Button - Share via X
* @example Email Share Button - Share via Email
- * @example Web Share Sheet Share Button - Share
+ * @example Mobile Share Sheet Button - Share
* @example LinkedIn Share Button - Share on LinkedIn
* @example SMS Share Button - Text a friend
- * @example Facebook Messenger Share Button - Share via Messenger
+ * @example Messenger Share Button - Share via Messenger
* @example WhatsApp Share Button - Share via WhatsApp
- * @example Line Messenger Share Button - Share via Line Messenger
+ * @example LINE Share Button - Share via Line Messenger
* @example Pinterest Share Button - Share on Pinterest
*/
@Component({
@@ -68,24 +69,35 @@ export class ShareButton {
/**
* Configure border radius with pixel amount
* @uiName Border radius
+ * @uiGroup Style
*/
@Prop() borderradius?: number;
/**
* @uiName Button background color
* @uiWidget color
* @format color
+ * @uiGroup Style
*/
@Prop() backgroundcolor?: string;
+
+ /**
+ * @uiName Border
+ * @uiGroup Style
+ */
+ @Prop() border?: string;
/**
* @uiName Button text color
* @uiWidget color
* @format color
+ * @uiGroup Style
*/
@Prop() textcolor?: string;
/**
* @uiName Display pill
+ * @uiGroup Style
*/
@Prop() pill?: boolean;
+
/**
* @uiName Disabled
*/
@@ -93,11 +105,12 @@ export class ShareButton {
/**
* @uiType string
* @uiName Button style
- * @uiEnum ["primary" , "success", "info", "warning", "danger", "default", "text" ]
- * @uiEnumNames ["Primary", "Success", "Info", "Warning", "Danger", "Default", "Text"]
+ * @uiEnum ["primary", "secondary", "success", "info", "warning", "danger", "default", "text" ]
+ * @uiEnumNames ["Primary", "Secondary", "Success", "Info", "Warning", "Danger", "Default", "Text"]
*/
@Prop() type?:
| "primary"
+ | "secondary"
| "success"
| "info"
| "warning"
@@ -109,6 +122,7 @@ export class ShareButton {
* @uiType string
* @uiEnum ["small", "medium", "large" ]
* @uiEnumNames ["Small", "Medium", "Large"]
+ * @uiGroup Style
*/
@Prop() size?: "small" | "medium" | "large";
/**
@@ -128,11 +142,13 @@ export class ShareButton {
@Prop() icon?: string;
/**
* @uiName Hide icon
+ * @uiGroup Style
* @default
*/
@Prop() hideicon?: boolean = false;
/**
* @uiName Hide text
+ * @uiGroup Style
* @default
*/
@Prop() hidetext?: boolean = false;
diff --git a/packages/mint-components/src/components/sqm-share-code/readme.md b/packages/mint-components/src/components/sqm-share-code/readme.md
index ea021d3630..025b23d5f7 100644
--- a/packages/mint-components/src/components/sqm-share-code/readme.md
+++ b/packages/mint-components/src/components/sqm-share-code/readme.md
@@ -5,15 +5,20 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| `buttonStyle` | `copy-button-style` | Set the copy button style and placement | `"button-below" \| "button-outside" \| "icon"` | `"icon"` |
-| `copyButtonLabel` | `copy-button-label` | | `string` | `"Copy Code"` |
-| `demoData` | -- | | `{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: "left" \| "right" \| "center"; buttonStyle?: "icon" \| "button-outside" \| "button-below"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }` | `undefined` |
-| `programId` | `program-id` | The ID of the program that should generate the code. Defaults to the program ID in context where this widget is loaded. | `string` | `undefined` |
-| `textAlign` | `text-align` | Change the text alignment | `"center" \| "left" \| "right"` | `"left"` |
-| `tooltiplifespan` | `tooltip-lifespan` | The number of milliseconds that the tooltip appears for | `number` | `1000` |
-| `tooltiptext` | `tooltip-text` | Shown inside a tooltip after someone has successfully copied the link to their clipboard | `string` | `"Copied to Clipboard"` |
+| Property | Attribute | Description | Type | Default |
+| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
+| `backgroundColor` | `background-color` | Background color of share link container | `string` | `undefined` |
+| `borderColor` | `border-color` | Border color of share link container (default is set to 1px solid transparent) | `string` | `undefined` |
+| `borderRadius` | `border-radius` | The border radius on the share link container (in pixels) | `string` | `undefined` |
+| `buttonStyle` | `copy-button-style` | Set the copy button style and placement | `"button-below" \| "button-outside" \| "icon"` | `"icon"` |
+| `buttonType` | `button-type` | The type of the button that is used (primary, secondary, or tertiary). | `"primary" \| "secondary" \| "tertiary"` | `"primary"` |
+| `copyButtonLabel` | `copy-button-label` | | `string` | `"Copy Code"` |
+| `demoData` | -- | | `{ loading?: boolean; textColor?: string; buttonType?: "primary" \| "secondary" \| "tertiary"; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: "left" \| "right" \| "center"; buttonStyle?: "icon" \| "button-outside" \| "button-below"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; backgroundColor?: string; borderRadius?: string; borderColor?: string; onClick?: () => void; }` | `undefined` |
+| `programId` | `program-id` | The ID of the program that should generate the code. Defaults to the program ID in context where this widget is loaded. | `string` | `undefined` |
+| `textAlign` | `text-align` | Change the text alignment | `"center" \| "left" \| "right"` | `"left"` |
+| `textColor` | `text-color` | Color of the text and copy icon | `string` | `undefined` |
+| `tooltiplifespan` | `tooltip-lifespan` | The number of milliseconds that the tooltip appears for | `number` | `1000` |
+| `tooltiptext` | `tooltip-text` | Shown inside a tooltip after someone has successfully copied the link to their clipboard | `string` | `"Copied to Clipboard"` |
## Dependencies
diff --git a/packages/mint-components/src/components/sqm-share-code/sqm-share-code.tsx b/packages/mint-components/src/components/sqm-share-code/sqm-share-code.tsx
index c1920d1872..4bf9ad909c 100644
--- a/packages/mint-components/src/components/sqm-share-code/sqm-share-code.tsx
+++ b/packages/mint-components/src/components/sqm-share-code/sqm-share-code.tsx
@@ -9,6 +9,7 @@ import { useShareCode } from "./useShareCode";
/**
* @uiName Share Code
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqb-program-section","sqb-conditional-section"]
* @exampleGroup Sharing
* @example Share Code -
*/
@@ -49,12 +50,39 @@ export class ShareCode {
* @uiType string
* @uiEnum ["left", "center", "right"]
* @uiEnumNames ["Left", "Center", "Right"]
+ * @uiGroup Style
*/
@Prop({
attribute: "text-align",
})
textAlign: "left" | "center" | "right" = "left";
+ /**
+ * Background color of share link container
+ * @uiName Background color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() backgroundColor?: string;
+
+ /**
+ * Color of the text and copy icon
+ * @uiName Text color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() textColor?: string;
+
+ /**
+ * The border radius on the share link container (in pixels)
+ * @uiName Border Radius
+ * @uiType number
+ * @uiGroup Style
+ */
+ @Prop() borderRadius?: string;
+
/**
* @uiName Copy button label
*/
@@ -70,12 +98,33 @@ export class ShareCode {
* @uiType string
* @uiEnum ["icon", "button-outside", "button-below"]
* @uiEnumNames ["Icon", "Button outside", "Button below"]
+ * @uiGroup Style
*/
@Prop({
attribute: "copy-button-style",
})
buttonStyle?: "icon" | "button-outside" | "button-below" = "icon";
+ /**
+ * The type of the button that is used (primary, secondary, or tertiary).
+ * @uiName Button Type
+ * @uiType string
+ * @uiEnum ["primary", "secondary", "tertiary"]
+ * @uiEnumNames ["Primary", "Secondary", "Tertiary"]
+ * @uiGroup Style
+ */
+ @Prop()
+ buttonType?: "primary" | "secondary" | "tertiary" = "primary";
+
+ /**
+ * Border color of share link container (default is set to 1px solid transparent)
+ * @uiName Border color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() borderColor?: string;
+
/**
* @undocumented
* @uiType object
@@ -106,6 +155,11 @@ function useDemoShareCode(props: ShareCode): CopyTextViewProps {
textAlign: props.textAlign,
copyButtonLabel: props.copyButtonLabel,
buttonStyle: props.buttonStyle,
+ backgroundColor: props.backgroundColor,
+ textColor: props.textColor,
+ borderRadius: props.borderRadius,
+ borderColor: props.borderColor,
+ buttonType: props.buttonType,
rewardStatus: "AVAILABLE",
open,
onClick: () => {
diff --git a/packages/mint-components/src/components/sqm-share-link/ShareLink.stories.tsx b/packages/mint-components/src/components/sqm-share-link/ShareLink.stories.tsx
index 9e5cafd1d2..8dc3933b6d 100644
--- a/packages/mint-components/src/components/sqm-share-link/ShareLink.stories.tsx
+++ b/packages/mint-components/src/components/sqm-share-link/ShareLink.stories.tsx
@@ -77,6 +77,19 @@ export const CopyButtonBelow = () => {
>
);
};
+
+export const CustomStyles = () => {
+ const props = {
+ copyString: "https://noah.example.com",
+ open: false,
+ tooltiptext: "Copied!",
+ backgroundColor: "#1ed760",
+ borderRadius: "30px",
+ textColor: "#121212",
+ buttonType: "primary" as const,
+ };
+ return ;
+};
export const FullStack = () => {
return ;
};
diff --git a/packages/mint-components/src/components/sqm-share-link/readme.md b/packages/mint-components/src/components/sqm-share-link/readme.md
index 0355dcd0f1..74159b07f1 100644
--- a/packages/mint-components/src/components/sqm-share-link/readme.md
+++ b/packages/mint-components/src/components/sqm-share-link/readme.md
@@ -5,15 +5,20 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| `buttonStyle` | `copy-button-style` | Set the copy button style and placement | `"button-below" \| "button-outside" \| "icon"` | `"icon"` |
-| `copyButtonLabel` | `copy-button-label` | | `string` | `"Copy Link"` |
-| `demoData` | -- | | `{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: "left" \| "right" \| "center"; buttonStyle?: "icon" \| "button-outside" \| "button-below"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }` | `undefined` |
-| `programId` | `program-id` | The ID of the program that should generate the link. Defaults to the program ID in context where this widget is loaded. | `string` | `undefined` |
-| `textAlign` | `text-align` | Change the text alignment | `"center" \| "left" \| "right"` | `"left"` |
-| `tooltiplifespan` | `tooltip-lifespan` | The number of milliseconds that the tooltip appears for | `number` | `1000` |
-| `tooltiptext` | `tooltip-text` | Shown inside a tooltip after someone has successfully copied the link to their clipboard | `string` | `"Copied to Clipboard"` |
+| Property | Attribute | Description | Type | Default |
+| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
+| `backgroundColor` | `background-color` | Background color of share link container | `string` | `undefined` |
+| `borderColor` | `border-color` | Border color of share link container (default is set to 1px solid transparent) | `string` | `undefined` |
+| `borderRadius` | `border-radius` | The border radius on the share link container (in pixels) | `string` | `undefined` |
+| `buttonStyle` | `copy-button-style` | Set the copy button style and placement | `"button-below" \| "button-outside" \| "icon"` | `"icon"` |
+| `buttonType` | `button-type` | The type of the button that is used (primary, secondary, or tertiary). | `"primary" \| "secondary" \| "tertiary"` | `"primary"` |
+| `copyButtonLabel` | `copy-button-label` | | `string` | `"Copy Link"` |
+| `demoData` | -- | | `{ loading?: boolean; textColor?: string; buttonType?: "primary" \| "secondary" \| "tertiary"; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: "left" \| "right" \| "center"; buttonStyle?: "icon" \| "button-outside" \| "button-below"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; backgroundColor?: string; borderRadius?: string; borderColor?: string; onClick?: () => void; }` | `undefined` |
+| `programId` | `program-id` | The ID of the program that should generate the link. Defaults to the program ID in context where this widget is loaded. | `string` | `undefined` |
+| `textAlign` | `text-align` | Change the text alignment | `"center" \| "left" \| "right"` | `"left"` |
+| `textColor` | `text-color` | Color of the text and copy icon | `string` | `undefined` |
+| `tooltiplifespan` | `tooltip-lifespan` | The number of milliseconds that the tooltip appears for | `number` | `1000` |
+| `tooltiptext` | `tooltip-text` | Shown inside a tooltip after someone has successfully copied the link to their clipboard | `string` | `"Copied to Clipboard"` |
## Dependencies
diff --git a/packages/mint-components/src/components/sqm-share-link/sqm-share-link.tsx b/packages/mint-components/src/components/sqm-share-link/sqm-share-link.tsx
index 7b2940be7b..e7cb1fc6c2 100644
--- a/packages/mint-components/src/components/sqm-share-link/sqm-share-link.tsx
+++ b/packages/mint-components/src/components/sqm-share-link/sqm-share-link.tsx
@@ -52,6 +52,7 @@ export class ShareLink {
* @uiType string
* @uiEnum ["left", "center", "right"]
* @uiEnumNames ["Left", "Center", "Right"]
+ * @uiGroup Style
*/
@Prop({
attribute: "text-align",
@@ -66,13 +67,60 @@ export class ShareLink {
})
copyButtonLabel: string = "Copy Link";
+ /**
+ * Background color of share link container
+ * @uiName Background color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() backgroundColor?: string;
+
+ /**
+ * Border color of share link container (default is set to 1px solid transparent)
+ * @uiName Border color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() borderColor?: string;
+
+ /**
+ * Color of the text and copy icon
+ * @uiName Text color
+ * @uiWidget color
+ * @format color
+ * @uiGroup Style
+ */
+ @Prop() textColor?: string;
+
+ /**
+ * The border radius on the share link container (in pixels)
+ * @uiName Border Radius
+ * @uiType number
+ * @uiGroup Style
+ */
+ @Prop() borderRadius?: string;
+
+ /**
+ * The type of the button that is used (primary, secondary, or tertiary).
+ * @uiName Button Type
+ * @uiType string
+ * @uiEnum ["primary", "secondary", "tertiary"]
+ * @uiEnumNames ["Primary", "Secondary", "Tertiary"]
+ * @uiGroup Style
+ */
+ @Prop()
+ buttonType?: "primary" | "secondary" | "tertiary" = "primary";
+
/**
* Set the copy button style and placement
*
- * @uiName Style
+ * @uiName Button style
* @uiType string
* @uiEnum ["icon", "button-outside", "button-below"]
* @uiEnumNames ["Icon", "Button outside", "Button below"]
+ * @uiGroup Style
*/
@Prop({
attribute: "copy-button-style",
@@ -108,7 +156,12 @@ function useDemoShareLink(props: ShareLink): CopyTextViewProps {
tooltiptext: props.tooltiptext,
textAlign: props.textAlign,
buttonStyle: props.buttonStyle,
+ backgroundColor: props.backgroundColor,
+ textColor: props.textColor,
+ borderRadius: props.borderRadius,
+ buttonType: props.buttonType,
copyButtonLabel: props.copyButtonLabel,
+ borderColor: props.borderColor,
rewardStatus: "AVAILABLE",
open,
onClick: () => {
diff --git a/packages/mint-components/src/components/sqm-stat-container/readme.md b/packages/mint-components/src/components/sqm-stat-container/readme.md
index 872d4aa4cd..6c2c90e472 100644
--- a/packages/mint-components/src/components/sqm-stat-container/readme.md
+++ b/packages/mint-components/src/components/sqm-stat-container/readme.md
@@ -7,10 +7,13 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| --------- | --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
-| `display` | `display` | | `"flex" \| "grid"` | `"grid"` |
-| `space` | `space` | | `"large" \| "medium" \| "none" \| "small" \| "x-large" \| "x-small" \| "xx-large" \| "xx-small" \| "xxx-large" \| "xxx-small" \| "xxxx-large"` | `"xxx-large"` |
+| Property | Attribute | Description | Type | Default |
+| ------------ | ------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
+| `alignment` | `alignment` | Controls the alignment of the flexbox | `"center" \| "left" \| "right"` | `"center"` |
+| `display` | `display` | | `"flex" \| "grid"` | `"flex"` |
+| `gap` | `gap` | | `"large" \| "medium" \| "none" \| "small" \| "x-large" \| "x-small" \| "xx-large" \| "xx-small" \| "xxx-large" \| "xxx-small" \| "xxxx-large"` | `"x-large"` |
+| `hideBorder` | `hide-border` | Hide the seperating border between stats | `boolean` | `undefined` |
+| `space` | `space` | | `"large" \| "medium" \| "none" \| "small" \| "x-large" \| "x-small" \| "xx-large" \| "xx-small" \| "xxx-large" \| "xxx-small" \| "xxxx-large"` | `"xxx-large"` |
## Dependencies
diff --git a/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container-view.tsx b/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container-view.tsx
index d8d68c10d9..e98685aff6 100644
--- a/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container-view.tsx
+++ b/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container-view.tsx
@@ -4,6 +4,9 @@ import { createStyleSheet } from "../../styling/JSS";
export interface StatContainerProps {
space: string;
display?: "grid" | "flex";
+ alignment?: "left" | "right" | "center";
+ hideBorder?: boolean;
+ gap?: string;
}
export function StatContainerView(props: StatContainerProps, children: VNode) {
@@ -14,25 +17,40 @@ export function StatContainerView(props: StatContainerProps, children: VNode) {
return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
};
- // Dependent on props, not feasiable to move out
+ // take alignment variable and convert it to CSS flexbox alignment
+ const alignment =
+ props.alignment === "center"
+ ? "center"
+ : props.alignment === "right"
+ ? "flex-end"
+ : "flex-start";
+
+ // Dependent on props, not feasible to move out
const style = {
StatContainer: {
width: "100%",
- display: props.display || "grid",
- "grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
- gap: divideSpace(),
- // First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
+ display: "flex",
+ flexWrap: "wrap",
+ alignItems: "center",
+ justifyContent: alignment,
+ flexDirection: "row",
+ gap: `var(--sl-spacing-${props.gap})`,
+
+ // Apply border styles conditionally based on the hideBorder prop
"& > *": {
- "border-right": "1px solid #EAEAEA",
+ "border-right": props.hideBorder
+ ? "none"
+ : "1px solid var(--sqm-text-subdued)",
"padding-right": divideSpace(),
},
"& > :last-child": {
"border-right": "none",
},
"& > ::slotted(*)": {
- "border-right": "1px solid #EAEAEA",
+ "border-right": props.hideBorder
+ ? "none"
+ : "1px solid var(--sqm-text-subdued)",
"padding-right": divideSpace(),
- height: "100%",
},
"& > ::slotted(*:last-child)": {
"border-right": "none",
diff --git a/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container.tsx b/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container.tsx
index 5ac5514a92..4081c1235d 100644
--- a/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container.tsx
+++ b/packages/mint-components/src/components/sqm-stat-container/sqm-stat-container.tsx
@@ -6,6 +6,8 @@ import { Spacing } from "../../global/mixins";
/**
* @uiName Stat Container
+ * @validParents ["sqm-portal-container","div","sqm-divided-layout","sqm-brand","template","sqm-hero", "sqb-program-section", "sqb-conditional-section"]
+ * @validChildren ["sqm-big-stat"]
* @slots [{"name":"", "title":"Stats"}]
* @exampleGroup Statistics
* @example Container with Three Stats - Points Balance
Giftcards Earned
Referrals
@@ -27,12 +29,38 @@ export class StatContainer {
@Prop() space: Spacing = "xxx-large";
/**
+ * @undocumented
* @uiName Display
* @uiType string
* @uiEnum ["grid", "flex"]
* @uiEnumNames ["Grid", "Flex"]
*/
- @Prop() display: "grid" | "flex" = "grid";
+ @Prop() display: "grid" | "flex" = "flex";
+
+ /**
+ * Hide the seperating border between stats
+ * @uiName Hide border
+ * @uiType boolean
+ */
+ @Prop() hideBorder?: boolean;
+
+ /**
+ * Controls the alignment of the flexbox
+ *
+ * @uiName Alignment
+ * @uiType string
+ * @uiEnum ["left", "right", "center"]
+ * @uiEnumNames ["Left", "Right", "Center"]
+ */
+ @Prop() alignment?: "left" | "right" | "center" = "center";
+
+ /**
+ * @uiName Gap
+ * @uiType string
+ * @uiEnum ["none", "xxx-small", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "xxxx-large"]
+ * @uiEnumNames ["None", "XXX-Small", "XX-Small", "X-Small", "Small", "Medium", "Large", "X-Large", "XX-Large", "XXX-Large", "XXXX-Large"]
+ */
+ @Prop() gap: Spacing = "x-large";
constructor() {
withHooks(this);
diff --git a/packages/mint-components/src/components/sqm-stencilbook/BrandSelector.tsx b/packages/mint-components/src/components/sqm-stencilbook/BrandSelector.tsx
new file mode 100644
index 0000000000..87f8dc9a4e
--- /dev/null
+++ b/packages/mint-components/src/components/sqm-stencilbook/BrandSelector.tsx
@@ -0,0 +1,242 @@
+import { Component, State, h, Host } from "@stencil/core";
+import * as Themes from "./Themes";
+
+const LOCAL_STORAGE_BRAND_KEY = "localStorageBrandKey";
+const LOCAL_STORAGE_BRAND_CONFIG_KEY = "localStorageBrandConfigKey";
+
+@Component({
+ tag: "sqm-brand-selector",
+ shadow: false,
+})
+export class SqmBrandSelector {
+ @State() selectedBrand: string = "Netflix";
+
+ constructor() {
+ const storedBrand = localStorage.getItem(LOCAL_STORAGE_BRAND_KEY);
+ const initialBrandName = storedBrand;
+
+ this.selectedBrand = initialBrandName;
+
+ // Initialize window.SquatchBrandingConfig based on the loaded brand
+ const initialConfig =
+ Themes[initialBrandName as keyof typeof Themes] || Themes.Netflix;
+
+ window.SquatchBrandingConfig = initialConfig;
+ const event = new CustomEvent("brandingConfigUpdated", {
+ detail: window.SquatchBrandingConfig,
+ });
+ window.dispatchEvent(event);
+ }
+
+ componentDidLoad() {
+ const storedBrand = localStorage.getItem(LOCAL_STORAGE_BRAND_KEY);
+ const initialBrandName = storedBrand;
+
+ this.selectedBrand = initialBrandName;
+ }
+
+ disconnectedCallback() {}
+
+ private brands = [
+ {
+ name: "Netflix",
+ logoUrl:
+ "https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803365/netflix_ftjbrr.png",
+ },
+ {
+ name: "Amazon",
+ logoUrl:
+ "https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803366/amazon_mc22fr.png",
+ },
+ {
+ name: "Spotify",
+ logoUrl:
+ "https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803510/spotify_j5qi1r.png",
+ },
+ {
+ name: "Google",
+ logoUrl:
+ "https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803168/pngimg.com_-_google_PNG19644_jvypwl.png",
+ },
+ ];
+
+ private updateBrand(brandName: string) {
+ this.selectedBrand = brandName;
+ const configToSet: BrandingConfig =
+ Themes[brandName as keyof typeof Themes] || Themes.Netflix;
+ const brandConfigString = JSON.stringify(configToSet);
+
+ localStorage.setItem(LOCAL_STORAGE_BRAND_KEY, brandName);
+ localStorage.setItem(LOCAL_STORAGE_BRAND_CONFIG_KEY, brandConfigString);
+
+ window.SquatchBrandingConfig = configToSet;
+ window.location.reload();
+
+ const event = new CustomEvent("brandingConfigUpdated", {
+ detail: window.SquatchBrandingConfig,
+ });
+ window.dispatchEvent(event);
+ }
+
+ render() {
+ return (
+
+
+
+
Select Branding
+
+
+ {this.brands.map((brand) => (
+
this.updateBrand(brand.name)}
+ >
+

{
+ e.target.src =
+ "https://placehold.co/80x40/cccccc/000000?text=Logo";
+ }}
+ />
+
+ ))}
+
+
+
+ );
+ }
+}
diff --git a/packages/mint-components/src/components/sqm-stencilbook/Themes.tsx b/packages/mint-components/src/components/sqm-stencilbook/Themes.tsx
index 90d0a70eb7..e17666f5ea 100644
--- a/packages/mint-components/src/components/sqm-stencilbook/Themes.tsx
+++ b/packages/mint-components/src/components/sqm-stencilbook/Themes.tsx
@@ -13,39 +13,323 @@
import { autoColorScaleCss } from "./AutoColor";
//
-export const Default = `
- // No CSS
-`;
+export const Default = null;
-export const Orangey = `
-:root{
- ${autoColorScaleCss("orange")}
-}
-`;
+export const Netflix: BrandingConfig = {
+ font: {
+ font: "Netflix Sans, Arial, sans-serif",
+ textColor: "white",
+ secondaryTextColor: "#B3B3B3",
+ },
+ border: {
+ color: "#333333",
+ radius: "4px",
+ thickness: "1px",
+ },
+ color: {
+ primaryColor: "#E50914",
+ background: "#101010",
+ accentColorShades: {
+ text: "#E50914",
+ icon: "#E50914",
+ border: "#E50914",
+ background: "#300609",
+ iconAndBadge: "#E50914",
+ },
+ success: {
+ text: "#66BB6A",
+ icon: "#4CAF50",
+ border: "#4CAF50",
+ background: "#1B5E20",
+ iconAndBadge: "#4CAF50",
+ },
+ warning: {
+ text: "#FFCA28",
+ icon: "#FFA726",
+ border: "#FFA726",
+ background: "#F57C00",
+ iconAndBadge: "#FFA726",
+ },
+ critical: {
+ text: "#EF9A9A",
+ icon: "#E50914",
+ border: "#E50914",
+ background: "#B71C1C",
+ iconAndBadge: "#E50914",
+ },
+ informative: {
+ text: "#64B5F6",
+ icon: "#42A5F5",
+ border: "#42A5F5",
+ background: "#1976D2",
+ iconAndBadge: "#42A5F5",
+ },
+ neutral: {
+ text: "white",
+ icon: "#B3B3B3",
+ border: "#333333",
+ background: "#222222",
+ iconAndBadge: "#B3B3B3",
+ },
+ },
+ primaryButton: {
+ buttonColor: "#E50914",
+ buttonTextColor: "#FFFFFF",
+ borderRadius: "4px",
+ buttonBorderColor: "transparent",
+ hoverColor: "#CC0000",
+ hoverTextColor: "#FFFFFF",
+ },
+ secondaryButton: {
+ buttonColor: "transparent",
+ buttonTextColor: "#FFFFFF",
+ buttonBorderColor: "#B3B3B3",
+ borderRadius: "4px",
+ hoverColor: "#333333",
+ hoverTextColor: "#FFFFFF",
+ },
+ tertiaryButton: {
+ buttonColor: "transparent",
+ buttonTextColor: "#FFFFFF",
+ borderRadius: "4px",
+ },
+ inputs: {
+ background: "#222222",
+ borderColor: "#B3B3B3",
+ borderRadius: "4px",
+ textColor: "white",
+ labelColor: "#B3B3B3",
+ borderThickness: "1px",
+ disabledBackground: "#333333",
+ disabledTextColor: "#777777",
+ labelFontSize: "14px",
+ focusBorderColor: "#E50914",
+ hoverBorderColor: "#777777",
+ },
+};
-export const Netflix = `
-:root{
- ${autoColorScaleCss("#e50914")}
-}
-`;
+export const Amazon: BrandingConfig = {
+ font: {
+ font: "Amazon Ember, Arial, sans-serif",
+ textColor: "#2f2f2f",
+ secondaryTextColor: "#565959",
+ },
+ border: {
+ color: "#d5d9d9",
+ radius: "4px",
+ thickness: "1px",
+ },
+ color: {
+ primaryColor: "#FF9900",
+ background: "#ffffff",
+ accentColorShades: {
+ text: "#FF9900",
+ icon: "#FF9900",
+ border: "#FFBF66",
+ background: "#FFF4DD",
+ iconAndBadge: "#FF9900",
+ },
+ success: {
+ text: "#198754",
+ icon: "#28A745",
+ border: "#BCE8B2",
+ background: "#D4EDDA",
+ iconAndBadge: "#28A745",
+ },
+ warning: {
+ text: "#856404",
+ icon: "#FFC107",
+ border: "#FFEBA2",
+ background: "#FFF3CD",
+ iconAndBadge: "#FFC107",
+ },
+ critical: {
+ text: "#721C24",
+ icon: "#DC3545",
+ border: "#F5C6CB",
+ background: "#F8D7DA",
+ iconAndBadge: "#DC3545",
+ },
+ informative: {
+ text: "#004085",
+ icon: "#007BFF",
+ border: "#B8DAFF",
+ background: "#CCE5FF",
+ iconAndBadge: "#007BFF",
+ },
+ neutral: {
+ text: "#232F3E",
+ icon: "#565959",
+ border: "#D5D9D9",
+ background: "#F0F2F2",
+ iconAndBadge: "#565959",
+ },
+ },
+ primaryButton: {
+ buttonColor: "#FF9900",
+ buttonTextColor: "#FFFFFF",
+ borderRadius: "7px",
+ buttonBorderColor: "transparent",
+ hoverColor: "#EB9100",
+ hoverTextColor: "#FFFFFF",
+ },
+ secondaryButton: {
+ buttonColor: "#FFFFFF",
+ buttonTextColor: "#232F3E",
+ buttonBorderColor: "#888C8C",
+ borderRadius: "7px",
+ hoverColor: "#F0F2F2",
+ hoverTextColor: "#232F3E",
+ },
+ tertiaryButton: {
+ buttonColor: "transparent",
+ buttonTextColor: "#007185",
+ borderRadius: "7px",
+ },
+ inputs: {
+ background: "#FFFFFF",
+ borderColor: "#D5D9D9",
+ borderRadius: "3px",
+ textColor: "#2f2f2f",
+ labelColor: "#565959",
+ borderThickness: "1px",
+ disabledBackground: "#EAEDED",
+ disabledTextColor: "#888C8C",
+ labelFontSize: "14px",
+ focusBorderColor: "#007185",
+ hoverBorderColor: "#A2A2A2",
+ },
+ // widgetSize would need specific values based on context, so keeping as default if not provided
+ // widgetSize: {
+ // embeddedWidgets: {},
+ // popupWidgets: {},
+ // },
+};
-export const SaaSquatchCorporate = `
-:root{
- ${autoColorScaleCss("#65bd60")}
- --sl-font-sans: Arial;
-}
-`;
+export const Spotify: BrandingConfig = {
+ font: {
+ textColor: "white",
+ },
+ color: {
+ background: "#121212",
+ accentColorShades: {
+ iconAndBadge: "#1ed760",
+ },
+ },
+ primaryButton: {
+ buttonColor: "#1ed760",
+ buttonTextColor: "#121212",
+ borderRadius: "30px",
+ buttonBorderColor: "transparent",
+ hoverColor: "#1DB954",
+ hoverTextColor: "#121212",
+ },
+ secondaryButton: {
+ buttonColor: "#191414",
+ buttonTextColor: "#FFFFFF",
+ buttonBorderColor: "#FFFFFF",
+ borderRadius: "30px",
+ hoverColor: "#282828",
+ hoverTextColor: "#121212",
+ },
+ inputs: {
+ background: "#121212",
+ borderColor: "#7c7c7c",
+ borderThickness: "1px",
+ borderRadius: "30px",
+ textColor: "#fff",
+ focusBorderColor: "white",
+ labelColor: "white",
+ hoverBorderColor: "white",
+ labelFontSize: "18px",
+ disabledTextColor: "white",
+ disabledBackground: "#303030",
+ },
+};
-export const NYTimes = `
-:root{
- ${autoColorScaleCss("black")}
- --sl-font-sans: Georgia, 'Times New Roman', serif;
-}
-`;
-
-export const Klip = `
-:root{
- ${autoColorScaleCss("#4225C4")};
-}
-
-`;
+export const Google: BrandingConfig = {
+ color: {
+ primaryColor: "#4285F4",
+ background: "#FFFFFF",
+ accentColorShades: {
+ text: "#1A73E8",
+ border: "#8AB4F8",
+ background: "#E8F0FE",
+ iconAndBadge: "#4285F4",
+ },
+ success: {
+ text: "#044e1d",
+ border: "#A8DCD7",
+ background: "#E6F4EA",
+ iconAndBadge: "#34A853",
+ },
+ warning: {
+ text: "#996a3d",
+ border: "#FCD667",
+ background: "#FFF7EE",
+ iconAndBadge: "#FBBC04",
+ },
+ critical: {
+ text: "#760b09",
+ border: "#F28B82",
+ background: "#FCE8E6",
+ iconAndBadge: "#EA4335",
+ },
+ informative: {
+ text: "#01368c",
+ border: "#A8DCD7",
+ background: "#E8F0FE",
+ iconAndBadge: "#4285F4",
+ },
+ neutral: {
+ text: "#202124",
+ border: "#DADCE0",
+ background: "#F8F9FA",
+ iconAndBadge: "#5F6368",
+ },
+ },
+ border: {
+ color: "#DADCE0",
+ radius: "8px",
+ thickness: "1px",
+ },
+ font: {
+ font: "Roboto, Arial, sans-serif",
+ textColor: "#212124",
+ secondaryTextColor: "#5F6368",
+ },
+ primaryButton: {
+ buttonColor: "#4285F4",
+ buttonTextColor: "#FFFFFF",
+ borderRadius: "4px",
+ buttonBorderColor: "transparent",
+ hoverColor: "#3C7CD1",
+ hoverTextColor: "#FFFFFF",
+ },
+ secondaryButton: {
+ buttonColor: "#FFFFFF",
+ buttonTextColor: "#4285F4",
+ buttonBorderColor: "#DADCE0",
+ borderRadius: "4px",
+ hoverColor: "#E8F0FE",
+ hoverTextColor: "#4285F4",
+ },
+ tertiaryButton: {
+ buttonColor: "transparent",
+ buttonTextColor: "#4285F4",
+ borderRadius: "4px",
+ },
+ inputs: {
+ background: "#FFFFFF",
+ borderColor: "#DADCE0",
+ borderThickness: "1px",
+ borderRadius: "8px",
+ textColor: "#202124",
+ focusBorderColor: "#4285F4",
+ labelColor: "#5F6368",
+ hoverBorderColor: "#9AA0A6",
+ labelFontSize: "12px",
+ disabledTextColor: "#9AA0A6",
+ disabledBackground: "#F1F3F4",
+ },
+};
diff --git a/packages/mint-components/src/components/sqm-stencilbook/readme.md b/packages/mint-components/src/components/sqm-stencilbook/readme.md
index 739f10e3ee..803ce9d21a 100644
--- a/packages/mint-components/src/components/sqm-stencilbook/readme.md
+++ b/packages/mint-components/src/components/sqm-stencilbook/readme.md
@@ -9,12 +9,13 @@
### Depends on
+- [sqm-brand-selector](.)
- [sqm-share-button](../sqm-share-button)
- [sqm-empty](../sqm-empty)
- [sqm-pagination](../sqm-pagination)
- [sqm-share-link](../sqm-share-link)
-- [sqm-stat-container](../sqm-stat-container)
- [sqm-big-stat](../sqm-big-stat)
+- [sqm-stat-container](../sqm-stat-container)
- [sqm-text](../sqm-text)
- [sqm-image](../sqm-image)
- [sqm-leaderboard](../sqm-leaderboard)
@@ -101,12 +102,13 @@
### Graph
```mermaid
graph TD;
+ sqm-stencilbook --> sqm-brand-selector
sqm-stencilbook --> sqm-share-button
sqm-stencilbook --> sqm-empty
sqm-stencilbook --> sqm-pagination
sqm-stencilbook --> sqm-share-link
- sqm-stencilbook --> sqm-stat-container
sqm-stencilbook --> sqm-big-stat
+ sqm-stencilbook --> sqm-stat-container
sqm-stencilbook --> sqm-text
sqm-stencilbook --> sqm-image
sqm-stencilbook --> sqm-leaderboard
diff --git a/packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx b/packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx
index 26e12c6f9d..652d781313 100644
--- a/packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx
+++ b/packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx
@@ -32,7 +32,6 @@ import * as PortalForgotPassword from "../sqm-portal-forgot-password/PortalForgo
import * as PortalEmailVerification from "../sqm-portal-email-verification/PortalEmailVerification.stories";
import * as PortalResetPassword from "../sqm-portal-reset-password/PortalResetPassword.stories";
import * as PortalVerifyEmail from "../sqm-portal-verify-email/PortalVerifyEmail.stories";
-import * as AssetCard from "../sqm-asset-card/AssetCard.stories";
import * as DividedLayout from "../sqm-divided-layout/DividedLayout.stories";
import * as ChangePassword from "../sqm-portal-change-password/ChangePassword.stories";
import * as ChangeMarketing from "../sqm-portal-change-marketing/ChangeMarketing.stories";
@@ -95,9 +94,9 @@ import * as PayoutButtonScroll from "../sqm-payout-button-scroll/PayoutButtonScr
import * as PayoutStatusAlert from "../tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories";
import * as ReferralCodes from "../sqm-referral-codes/ReferralCodes.stories";
import * as BaseRegistrationForm from "../sqm-base-registration/BaseRegistrationForm.stories";
-import * as PortalRegistrationForm from "../sqm-portal-registration-form/PortalRegistrationForm.stories";
import * as PortalGoogleRegistrationFormStories from "../sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories";
import * as QRCode from "../sqm-qr-code/QRCode.stories";
+import * as Text from "../sqm-text/Text.stories";
import * as Themes from "./Themes";
import { CucumberAddon } from "./CucumberAddon";
@@ -137,7 +136,6 @@ const stories = [
PortalEmailVerification,
PortalResetPassword,
PortalVerifyEmail,
- AssetCard,
DividedLayout,
ChangePassword,
PortalProfile,
@@ -195,13 +193,13 @@ const stories = [
NewPortalRegistrationForm,
ChangeMarketing,
BaseRegistrationForm,
- PortalRegistrationForm,
PortalGoogleRegistrationFormStories,
WidgetEmailVerification,
WidgetCodeVerification,
PayoutButtonScroll,
PayoutStatusAlert,
QRCode,
+ Text,
];
/**
@@ -233,7 +231,7 @@ export class StencilStorybook {
const theme = Themes[selectedTheme];
return (
- {t}
))}
-
-
-
-
setCheckerboard(!checkerboard)}
- onChange={() =>
- document.documentElement.style.setProperty(
- "--checker-color-1",
- checkerboard ? "#ebebeb" : "#ffffff00"
- )
- }
- >
-
-
-
-
+