{"version":3,"names":["scAlertCss","ScAlertStyle0","ScAlert","Infinity","show","this","open","hide","restartAutoHide","clearTimeout","autoHideTimeout","duration","setTimeout","handleMouseMove","handleCloseClick","handleOpenChange","scShow","emit","scHide","scrollOnOpen","el","scrollIntoView","behavior","componentDidLoad","iconName","type","icon","h","name","render","Host","key","style","scrollMargin","class","alert","isRtl","part","role","hidden","onMouseMove","title","closable","onClick","xmlns","viewBox","fill","d","scBlockUiCss","ScBlockUiStyle0","ScBlockUi","overlay","transparent","zIndex","toString","spinner","scButtonCss","ScButtonStyle0","ScButton","componentWillLoad","handleSlotChange","click","button","focus","options","blur","hasLabel","children","hasPrefix","querySelector","hasSuffix","handleBlur","hasFocus","scBlur","handleFocus","scFocus","handleClick","event","disabled","loading","busy","preventDefault","stopPropagation","submit","submitForm","form","_b","_a","closest","shadowRoot","document","createElement","position","width","height","clip","clipPath","overflow","whiteSpace","append","remove","Tag","href","interior","Fragment","onSlotchange","caret","stroke","points","exportparts","size","circle","pill","outline","target","download","autoFocus","autofocus","rel","undefined","tabindex","value","onBlur","onFocus","e","scDashboardModuleCss","ScDashboardModuleStyle0","wp","i18n","__","error","heading","locks","Set","lockBodyScrolling","lockingEl","add","body","classList","unlockBodyScrolling","delete","scDialogCss","ScDialogStyle0","setDefaultAnimation","scFlexCss","ScFlexStyle0","ScFlex","flex","justifyContent","alignItems","flexDirection","columnGap","flexWrap","stack","iconFiles","Map","requestIcon","url","has","get","request","fetch","then","async","response","ok","div","innerHTML","text","svg","firstElementChild","status","tagName","toLowerCase","outerHTML","set","scIconCss","ScIconStyle0","LABEL_MAPPINGS","parser","DOMParser","scSkeletonCss","ScSkeletonStyle0","ScSkeleton","skeleton","effect","scSpinnerCss","ScSpinnerStyle0","ScSpinner","renderLoading","slot","upcomingPeriod","checkout","_c","end_at_date","reactivateSubscription","color","scRequestClose","scTextCss","ScTextStyle0","ScText","CustomTag","tag","truncate"],"sources":["src/components/ui/alert/sc-alert.scss?tag=sc-alert&encapsulation=shadow","src/components/ui/alert/sc-alert.tsx","src/components/ui/block-ui/sc-block-ui.scss?tag=sc-block-ui&encapsulation=shadow","src/components/ui/block-ui/sc-block-ui.tsx","src/components/ui/button/sc-button.scss?tag=sc-button&encapsulation=shadow","src/components/ui/button/sc-button.tsx","src/components/ui/dashboard-module/sc-dashboard-module.scss?tag=sc-dashboard-module&encapsulation=shadow","src/components/ui/dashboard-module/sc-dashboard-module.tsx","src/functions/scroll.ts","src/components/ui/sc-dialog/sc-dialog.scss?tag=sc-dialog&encapsulation=shadow","src/components/ui/sc-dialog/sc-dialog.tsx","src/components/ui/flex/sc-flex.scss?tag=sc-flex&encapsulation=shadow","src/components/ui/flex/sc-flex.tsx","src/components/ui/icon/request.ts","src/components/ui/icon/sc-icon.css?tag=sc-icon&encapsulation=shadow","src/components/ui/icon/sc-icon.tsx","src/components/ui/skeleton/sc-skeleton.scss?tag=sc-skeleton&encapsulation=shadow","src/components/ui/skeleton/sc-skeleton.tsx","src/components/ui/spinner/sc-spinner.scss?tag=sc-spinner&encapsulation=shadow","src/components/ui/spinner/sc-spinner.tsx","src/components/controllers/dashboard/subscription-reactivate/sc-subscription-reactivate.tsx","src/components/ui/text/sc-text.scss?tag=sc-text&encapsulation=shadow","src/components/ui/text/sc-text.tsx"],"sourcesContent":[":host {\n display: block;\n}\n[hidden] {\n display: none !important;\n}\n\n::slotted(*:not(:first-child)) {\n margin-top: 0.5rem;\n margin-bottom: 0;\n}\n\n::slotted(ul) {\n line-height: 1.4em;\n list-style-type: disc;\n margin: 0;\n padding: 0;\n padding-left: 20px;\n}\n\n.alert {\n font-family: var(--sc-input-font-family);\n font-weight: var(--sc-font-weight-normal);\n font-size: var(--sc-button-font-size-medium);\n line-height: var(--sc-line-height-dense);\n border-radius: var(--sc-alert-border-radius, var(--sc-border-radius-medium));\n padding: var(--sc-spacing-large);\n margin-bottom: var(--sc-spacing-large);\n display: flex;\n align-items: flex-start;\n border: var(--sc-alert-border, var(--sc-input-border));\n border-top: solid var(--sc-alert-border-width, 3px);\n color: var(--sc-alert-color, var(--sc-input-label-color));\n background: var(--sc-alert-background-color, var(--sc-color-white));\n box-shadow: var(--sc-shadow-small);\n\n &__text {\n flex: 1;\n }\n\n &.alert--primary {\n border-top-color: var(--sc-alert-primary-border-color, var(--sc-color-primary-500));\n a {\n color: var(--sc-color-primary-900);\n }\n .alert__title {\n color: var(--sc-alert-title-color, var(--sc-color-gray-800));\n }\n .alert__icon {\n color: var(--sc-alert-primary-icon-color, var(--sc-color-primary-500));\n }\n }\n &.alert--info {\n border-top-color: var(--sc-alert-info-border-color, var(--sc-color-info-500));\n a {\n color: var(--sc-color-info-900);\n }\n .alert__title {\n color: var(--sc-alert-title-color, var(--sc-color-gray-800));\n }\n .alert__icon {\n color: var(--sc-alert-info-icon-color, var(--sc-color-info-500));\n }\n }\n &.alert--danger {\n border-top-color: var(--sc-alert-danger-border-color, var(--sc-color-danger-500));\n a {\n color: var(--sc-color-danger-900);\n }\n .alert__title {\n color: var(--sc-alert-title-color, var(--sc-color-gray-800));\n }\n .alert__icon {\n color: var(--sc-alert-danger-icon-color, var(--sc-color-danger-500));\n }\n }\n &.alert--warning {\n border-top-color: var(--sc-alert-warning-border-color, var(--sc-color-warning-500));\n a {\n color: var(--sc-color-warning-900);\n }\n .alert__title {\n color: var(--sc-alert-title-color, var(--sc-color-gray-800));\n }\n .alert__icon {\n color: var(--sc-alert-warning-icon-color, var(--sc-color-warning-500));\n }\n }\n &.alert--success {\n border-top-color: var(--sc-alert-success-border-color, var(--sc-color-success-500));\n a {\n color: var(--sc-color-success-900);\n }\n .alert__title {\n color: var(--sc-alert-title-color, var(--sc-color-gray-800));\n }\n .alert__icon {\n color: var(--sc-alert-success-icon-color, var(--sc-color-success-500));\n }\n }\n}\n\n.alert__icon {\n flex: 1;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--sc-font-size-large);\n padding-inline-end: var(--sc-spacing-medium);\n}\n\n.alert__title {\n font-weight: var(--sc-font-weight-semibold);\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.alert__close {\n transition: background-color var(--sc-transition-fast) ease;\n display: inline-flex;\n border-radius: var(--sc-border-radius-small);\n padding: var(--sc-spacing-x-small);\n margin-left: auto;\n cursor: pointer;\n svg {\n width: 1em;\n height: 1em;\n }\n}\n\n.alert--is-rtl {\n text-align: right;\n\n &.alert-close {\n margin-right: auto;\n margin-left: unset;\n }\n\n ::slotted(ul) {\n margin: 0;\n padding: 0;\n padding-right: 20px;\n }\n}\n","import { Component, Prop, Method, State, Event, EventEmitter, Watch, h, Element, Host } from '@stencil/core';\nimport { isRtl } from '../../../functions/page-align';\n\n/**\n * @part base - The elements base wrapper.\n * @part icon - The alert icon.\n * @part text - The alert text.\n * @part title - The alert title.\n * @part message - The alert message.\n * @part close - The close icon.\n */\n@Component({\n tag: 'sc-alert',\n styleUrl: 'sc-alert.scss',\n shadow: true,\n})\nexport class ScAlert {\n @Element() el: HTMLScAlertElement;\n\n /** Indicates whether or not the alert is open. You can use this in lieu of the show/hide methods. */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n\n /** The title. */\n @Prop() title: string;\n\n /** Makes the alert closable. */\n @Prop({ reflect: true }) closable: boolean = false;\n\n /** The type of alert. */\n @Prop({ reflect: true }) type: 'primary' | 'success' | 'info' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\n * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`.\n */\n @Prop() duration: number = Infinity;\n\n /** Scroll into view. */\n @Prop() scrollOnOpen: boolean;\n\n /** Scroll margin */\n @Prop() scrollMargin: string = '0px';\n\n /** No icon */\n @Prop() noIcon: boolean;\n\n @State() autoHideTimeout: any;\n\n /** When alert is hidden */\n @Event() scHide: EventEmitter;\n\n /** When alert is shown */\n @Event() scShow: EventEmitter;\n\n /** Shows the alert. */\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n this.open = true;\n }\n\n /** Hides the alert */\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n this.open = false;\n }\n\n restartAutoHide() {\n clearTimeout(this.autoHideTimeout);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = setTimeout(() => this.hide(), this.duration);\n }\n }\n\n handleMouseMove() {\n this.restartAutoHide();\n }\n\n handleCloseClick() {\n this.hide();\n }\n\n /** Emit event when showing or hiding changes */\n @Watch('open')\n handleOpenChange() {\n this.open ? this.scShow.emit() : this.scHide.emit();\n if (this.open && this.scrollOnOpen) {\n this.el.scrollIntoView({ behavior: 'smooth' });\n }\n }\n\n componentDidLoad() {\n this.handleOpenChange();\n }\n\n iconName() {\n switch (this.type) {\n case 'danger':\n return 'alert-circle';\n case 'success':\n return 'check-circle';\n case 'warning':\n return 'alert-triangle';\n default:\n return 'info';\n }\n }\n\n icon() {\n return ;\n }\n\n render() {\n return (\n \n \n );\n }\n}\n",":host {\n display: block;\n position: var(--sc-block-ui-position, absolute);\n top: -5px;\n left: -5px;\n right: -5px;\n bottom: -5px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n\n > * {\n z-index: 1;\n }\n\n &:after {\n content: '';\n position: var(--sc-block-ui-position, absolute);\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n cursor: var(--sc-block-ui-cursor, wait);\n background: var(--sc-block-ui-background-color, var(--sc-color-white));\n opacity: var(--sc-block-ui-opacity, 0.15);\n }\n\n &.transparent:after {\n background: transparent;\n }\n}\n\n.overlay__content {\n font-size: var(--sc-font-size-large);\n font-weight: var(--sc-font-weight-semibold);\n display: grid;\n gap: 0.5em;\n text-align: center;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @part base - The elements base wrapper.\n * @part content - The content (spinner)\n */\n@Component({\n tag: 'sc-block-ui',\n styleUrl: 'sc-block-ui.scss',\n shadow: true,\n})\nexport class ScBlockUi {\n @Prop() zIndex: number = 1;\n @Prop() transparent: boolean;\n @Prop() spinner: boolean;\n render() {\n return (\n
\n
\n {!this.transparent && this.spinner && }\n \n
\n
\n );\n }\n}\n",":host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n --primary-color: var(--sc-color-primary-text);\n --primary-background: var(--sc-color-primary-500);\n}\n:host([full]) {\n display: block;\n}\n\n// This is necessary to make sure clicks happen on button component, not children.\n// Without this, forms may not submit.\n::slotted(*) {\n pointer-events: none;\n}\n\n.button {\n box-sizing: border-box;\n z-index: 10;\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--sc-input-border-width);\n font-family: var(--sc-input-font-family);\n font-weight: var(--sc-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition: var(--sc-input-transition, var(--sc-transition-medium)) background-color, var(--sc-input-transition, var(--sc-transition-medium)) color,\n var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow,\n var(--sc-input-transition, var(--sc-transition-medium)) opacity;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);\n }\n\n &.button--disabled {\n cursor: not-allowed;\n\n // When disabled, prevent mouse events from bubbling up\n * {\n pointer-events: none;\n }\n\n .button__label,\n .button__suffix,\n .button__prefix {\n opacity: 0.5;\n }\n }\n\n // Clicks on icons shouldn't prevent the button from gaining focus\n ::slotted(.sc--icon) {\n pointer-events: none;\n }\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n.button__label {\n display: flex;\n align-items: center;\n\n ::slotted(sc-icon) {\n vertical-align: -2px;\n }\n}\n\n.button {\n &:not(.button--text):not(.button--link) {\n box-shadow: var(--sc-shadow-small);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button.button--standard {\n &.button--default {\n background-color: var(--sc-button-default-background-color, var(--sc-color-white));\n border-color: var(--sc-button-default-border-color, var(--sc-color-gray-300));\n color: var(--sc-button-default-color, var(--sc-color-gray-600));\n\n &:hover:not(.button--disabled) {\n background-color: var(--sc-button-default-hover-background-color, var(--sc-color-white));\n border-color: var(--sc-button-default-focus-border-color, var(--primary-background));\n color: var(--primary-background);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--sc-button-default-focus-background-color, var(--sc-color-white));\n border-color: var(--sc-button-default-focus-border-color, var(--sc-color-white));\n color: var(--primary-background);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--sc-button-default-active-background-color, var(--sc-color-white));\n border-color: var(--sc-button-default-active-border-color, var(--sc-color-white));\n color: var(--primary-background);\n }\n }\n\n &.button--primary {\n background-color: var(--primary-background);\n border-color: var(--primary-background);\n color: var(--primary-color);\n\n &:hover:not(.button--disabled) {\n opacity: 0.8;\n }\n\n &:focus:not(.button--disabled) {\n opacity: 0.8;\n color: var(--primary-color);\n border-color: var(--sc-color-white);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--primary-background);\n border-color: var(--sc-color-white);\n color: var(--primary-color);\n }\n }\n\n &.button--success {\n background-color: var(--sc-color-success-500);\n border-color: var(--sc-color-success-500);\n color: var(--sc-color-success-text);\n\n &:hover:not(.button--disabled) {\n background-color: var(--sc-color-success-400);\n border-color: var(--sc-color-success-400);\n color: var(--sc-color-success-text);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--sc-color-success-400);\n border-color: var(--sc-color-success-400);\n color: var(--sc-color-success-text);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-success);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--sc-color-success-500);\n border-color: var(--sc-color-success-500);\n color: var(--sc-color-success-text);\n }\n }\n\n &.button--info {\n background-color: var(--sc-color-info-500);\n border-color: var(--sc-color-info-500);\n color: var(--sc-color-info-text);\n\n &:hover:not(.button--disabled) {\n background-color: var(--sc-color-info-400);\n border-color: var(--sc-color-info-400);\n color: var(--sc-color-info-text);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--sc-color-info-400);\n border-color: var(--sc-color-info-400);\n color: var(--sc-color-info-text);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-info);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--sc-color-info-500);\n border-color: var(--sc-color-info-500);\n color: var(--sc-color-info-text);\n }\n }\n\n &.button--warning {\n background-color: var(--sc-color-warning-500);\n border-color: var(--sc-color-warning-500);\n color: var(--sc-color-warning-text);\n\n &:hover:not(.button--disabled) {\n background-color: var(--sc-color-warning-400);\n border-color: var(--sc-color-warning-400);\n color: var(--sc-color-warning-text);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--sc-color-warning-400);\n border-color: var(--sc-color-warning-400);\n color: var(--sc-color-warning-text);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-warning);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--sc-color-warning-500);\n border-color: var(--sc-color-warning-500);\n color: var(--sc-color-warning-text);\n }\n }\n\n &.button--danger {\n background-color: var(--sc-color-danger-500);\n border-color: var(--sc-color-danger-500);\n color: var(--sc-color-danger-text);\n\n &:hover:not(.button--disabled) {\n background-color: var(--sc-color-danger-400);\n border-color: var(--sc-color-danger-400);\n color: var(--sc-color-danger-text);\n }\n\n &:focus:not(.button--disabled) {\n background-color: var(--sc-color-danger-400);\n border-color: var(--sc-color-danger-400);\n color: var(--sc-color-danger-text);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-danger);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--sc-color-danger-500);\n border-color: var(--sc-color-danger-500);\n color: var(--sc-color-danger-text);\n }\n }\n}\n\n/*\n* Outline buttons\n*/\n.button--outline {\n background: none;\n border: solid 1px;\n}\n\n/* Default */\n.button--outline.button--default {\n border-color: var(--sc-color-gray-300);\n color: var(--sc-color-gray-700);\n}\n.button--outline.button--default:hover:not(.button--disabled) {\n border-color: var(--primary-background);\n background-color: var(--primary-background);\n color: var(--sc-color-white);\n}\n.button--outline.button--default:focus:not(.button--disabled) {\n border-color: var(--primary-background);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--primary-background) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--default:active:not(.button--disabled) {\n opacity: 0.8;\n color: var(--sc-color-white);\n}\n/* Primary */\n.button--outline.button--primary {\n border-color: var(--primary-background);\n color: var(--primary-background);\n}\n.button--outline.button--primary:hover:not(.button--disabled) {\n background-color: var(--primary-background);\n opacity: 0.8;\n color: var(--sc-color-white);\n}\n.button--outline.button--primary:focus:not(.button--disabled) {\n border-color: var(--primary-background);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--primary-background) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--primary-background);\n background-color: var(--primary-background);\n opacity: 0.9;\n color: var(--sc-color-white);\n}\n/* Success */\n.button--outline.button--success {\n border-color: var(--sc-color-success-500);\n color: var(--sc-color-success-500);\n}\n.button--outline.button--success:hover:not(.button--disabled) {\n background-color: var(--sc-color-success-500);\n color: var(--sc-color-white);\n}\n.button--outline.button--success:focus:not(.button--disabled) {\n border-color: var(--sc-color-success-500);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-color-success-500) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--sc-color-success-700);\n background-color: var(--sc-color-success-700);\n color: var(--sc-color-white);\n}\n/* Info */\n.button--outline.button--info {\n border-color: var(--sc-color-gray-500);\n color: var(--sc-color-gray-500);\n}\n.button--outline.button--info:hover:not(.button--disabled) {\n background-color: var(--sc-color-gray-500);\n color: var(--sc-color-white);\n}\n.button--outline.button--info:focus:not(.button--disabled) {\n border-color: var(--sc-color-gray-500);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-color-gray-500) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--info:active:not(.button--disabled) {\n border-color: var(--sc-color-gray-700);\n background-color: var(--sc-color-gray-700);\n color: var(--sc-color-white);\n}\n/* Warning */\n.button--outline.button--warning {\n border-color: var(--sc-color-warning-500);\n color: var(--sc-color-warning-500);\n}\n.button--outline.button--warning:hover:not(.button--disabled) {\n background-color: var(--sc-color-warning-500);\n color: var(--sc-color-white);\n}\n.button--outline.button--warning:focus:not(.button--disabled) {\n border-color: var(--sc-color-warning-500);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-color-warning-500) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--sc-color-warning-700);\n background-color: var(--sc-color-warning-700);\n color: var(--sc-color-white);\n}\n/* Danger */\n.button--outline.button--danger {\n border-color: var(--sc-color-danger-500);\n color: var(--sc-color-danger-500);\n}\n.button--outline.button--danger:hover:not(.button--disabled) {\n background-color: var(--sc-color-danger-500);\n color: var(--sc-color-white);\n}\n.button--outline.button--danger:focus:not(.button--disabled) {\n border-color: var(--sc-color-danger-500);\n box-shadow: 0 0 0 var(--sc-focus-ring-width) var(--sc-color-danger-500) / var(--sc-focus-ring-alpha);\n}\n.button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--sc-color-danger-700);\n background-color: var(--sc-color-danger-700);\n color: var(--sc-color-white);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Text buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--text {\n background-color: transparent;\n border-color: transparent;\n color: inherit;\n\n &:hover:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--sc-color-gray-600);\n }\n\n &:focus:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n box-shadow: 0; //0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);\n }\n\n &:active:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n box-shadow: 0; // 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary);\n }\n\n &.button--caret.button--has-label {\n padding-right: var(--sc-spacing-xx-small);\n .button__label {\n padding: 0 var(--sc-spacing-xx-small) !important;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Link buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.button--link {\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n color: var(--sc-button-link-color, var(--primary-background));\n transition: opacity var(--sc-input-transition, var(--sc-transition-medium)) ease;\n text-decoration: var(--sc-button-link-text-decoration, none);\n\n &.button--has-label {\n &.button--small,\n &.button--medium,\n &.button--large {\n .button__label {\n padding: 0;\n }\n }\n }\n\n &:hover:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n opacity: 0.75;\n }\n\n &:focus:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n }\n\n &:active:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n }\n\n &.button--has-prefix:not(.button--text) {\n &.button--small,\n &.button--medium,\n &.button--large {\n padding-left: 0;\n .button__label {\n padding-left: var(--sc-spacing-xx-small);\n }\n }\n }\n &.button--has-suffix:not(.button--text) {\n &.button--small,\n &.button--medium,\n &.button--large {\n padding-right: 0;\n .button__label {\n padding-right: var(--sc-spacing-xx-small);\n }\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--sc-button-font-size-small);\n height: var(--sc-input-height-small);\n line-height: calc(var(--sc-input-height-small) - var(--sc-input-border-width) * 2);\n border-radius: var(--button-border-radius, var(--sc-input-border-radius-small));\n}\n\n.button--medium {\n font-size: var(--sc-button-font-size-medium);\n height: var(--sc-input-height-medium);\n line-height: calc(var(--sc-input-height-medium) - var(--sc-input-border-width) * 2);\n border-radius: var(--button-border-radius, var(--sc-input-border-radius-medium));\n}\n\n.button--large {\n font-size: var(--sc-button-font-size-large);\n height: var(--sc-input-height-large);\n line-height: calc(var(--sc-input-height-large) - var(--sc-input-border-width) * 2);\n border-radius: var(--button-border-radius, var(--sc-input-border-radius-large));\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Full modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.button--full {\n display: block;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--sc-input-height-small);\n }\n\n &.button--medium {\n border-radius: var(--sc-input-height-medium);\n }\n\n &.button--large {\n border-radius: var(--sc-input-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n\n &.button--small {\n width: var(--sc-input-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--sc-input-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--sc-input-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n width: 1em;\n height: 1em;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Busy modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.button--busy {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n // When disabled, prevent mouse events from bubbling up\n * {\n pointer-events: none;\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n}\n\nsc-spinner::part(base) {\n --indicator-color: currentColor;\n --spinner-size: 12px;\n position: absolute;\n top: calc(50% - var(--spinner-size) + (var(--spinner-size) / 4));\n left: calc(50% - var(--spinner-size) + (var(--spinner-size) / 4));\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(sc-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--sc-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--sc-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--sc-spacing-large);\n }\n}\n\n.button--has-prefix:not(.button--text) {\n &.button--small {\n padding-left: var(--sc-spacing-x-small);\n\n .button__label {\n padding-left: var(--sc-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--sc-spacing-small);\n\n .button__label {\n padding-left: var(--sc-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--sc-spacing-small);\n\n .button__label {\n padding-left: var(--sc-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--sc-spacing-x-small);\n\n .button__label {\n padding-right: var(--sc-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--sc-spacing-small);\n\n .button__label {\n padding-right: var(--sc-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--sc-spacing-small);\n\n .button__label {\n padding-right: var(--sc-spacing-small);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).\n// This means buttons aren't always direct descendants of the button group, thus we can't target them with the ::slotted\n// selector. To work around this, the button group component does some magic to add these special classes to buttons and\n// we style them here instead.\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n:host(.sc-button-group__button--first) .button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n:host(.sc-button-group__button--inner) .button {\n border-radius: 0;\n}\n\n:host(.sc-button-group__button--last) .button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n// All except the first\n:host(.sc-button-group__button:not(.sc-button-group__button--first)) {\n margin-left: calc(-1 * var(--sc-input-border-width));\n}\n\n// Add a visual separator between solid buttons\n:host(.sc-button-group__button:not(.sc-button-group__button--focus, .sc-button-group__button--first, [type='default']):not(:hover, :active, :focus)) .button:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n border-left: solid 1px #fff4;\n mix-blend-mode: lighten;\n}\n\n// Bump focused buttons up so their focus ring isn't clipped\n:host(.sc-button-group__button--hover) {\n z-index: 1;\n}\n\n:host(.sc-button-group__button--focus) {\n z-index: 2;\n}\n\n@keyframes busy-animation {\n 0% {\n background-position: 200px 0;\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// RTL support\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.button--is-rtl {\n &.button--has-prefix {\n &.button--small,\n &.button--medium,\n &.button--large {\n padding-left: 0;\n .button__label {\n padding-left: 0;\n padding-right: var(--sc-spacing-xx-small);\n }\n }\n }\n &.button--has-suffix {\n &.button--small,\n &.button--medium,\n &.button--large {\n padding-right: 0;\n .button__label {\n padding-right: 0;\n padding-left: var(--sc-spacing-xx-small);\n }\n }\n }\n}\n","import { Component, Prop, Event, EventEmitter, State, Element, Fragment, h } from '@stencil/core';\nimport { isRtl } from '../../../functions/page-align';\n\n/**\n * @part base - The elements base wrapper.\n * @part label - The button label.\n * @part prefix - The button prefix.\n * @part suffix - The button suffix.\n * @part caret - The button caret.\n * @part spinner - The button spinner.\n */\n@Component({\n tag: 'sc-button',\n styleUrl: 'sc-button.scss',\n shadow: true,\n})\nexport class ScButton {\n @Element() button: HTMLElement | HTMLAnchorElement;\n\n @State() private hasFocus = false;\n @State() private hasLabel = false;\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'text' | 'link' = 'default';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws the button with a caret for use with dropdowns, popovers, etc. */\n @Prop({ reflect: true }) caret?: boolean = false;\n\n /** Draws the button full-width. */\n @Prop({ reflect: true }) full?: boolean = false;\n\n /** Disables the button. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** Draws the button in a loading state. */\n @Prop({ reflect: true }) loading?: boolean = false;\n\n /** Draws an outlined button. */\n @Prop({ reflect: true }) outline?: boolean = false;\n\n /** Draws the button in a busy state. */\n @Prop({ reflect: true }) busy?: boolean = false;\n\n /** Draws a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill?: boolean = false;\n\n /** Draws a circle button. */\n @Prop({ reflect: true }) circle?: boolean = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit?: boolean = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name: string;\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value: string;\n\n /** When set, the underlying button will be rendered as an `` with this `href` instead of a `