Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@justeattakeaway/pie-button

Package Overview
Dependencies
Maintainers
12
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeattakeaway/pie-button - npm Package Compare versions

Comparing version 0.0.0-snapshot-release-20231219091122 to 0.0.0-snapshot-release-20231220145526

14

dist/index.d.ts

@@ -10,11 +10,11 @@ import type { CSSResult } from 'lit';

*/
size?: typeof sizes[number];
size: typeof sizes[number];
/**
* What type attribute should be applied to the button. For example submit, button.
*/
type?: typeof types[number];
type: typeof types[number];
/**
* What style variant the button should be such as primary, outline or ghost.
*/
variant?: Variant;
variant: Variant;
/**

@@ -27,15 +27,15 @@ * The placement of the icon slot, if provided, such as leading or trailing

*/
disabled?: boolean;
disabled: boolean;
/**
* When true, the button element will occupy the full width of its container.
*/
isFullWidth?: boolean;
isFullWidth: boolean;
/**
* When true, displays a loading indicator inside the button.
*/
isLoading?: boolean;
isLoading: boolean;
/**
* When true, enables the responsive size feature.
*/
isResponsive?: boolean;
isResponsive: boolean;
/**

@@ -42,0 +42,0 @@ * The name of the button, submitted as a pair with the button's value as part of the form data, when that button is used to submit the form.

@@ -1,5 +0,5 @@

import { unsafeCSS as xt, LitElement as Et, html as N, nothing as H } from "lit";
import { unsafeCSS as wt, LitElement as xt, html as N, nothing as W } from "lit";
import { property as h } from "lit/decorators.js";
import { ifDefined as R } from "lit/directives/if-defined.js";
import { validPropertyValues as _, defineCustomElement as kt } from "@justeattakeaway/pie-webc-core";
import { ifDefined as Et } from "lit/directives/if-defined.js";
import { validPropertyValues as R, defineCustomElement as kt } from "@justeattakeaway/pie-webc-core";
import "@justeattakeaway/pie-spinner";

@@ -16,6 +16,6 @@ const zt = ["xsmall", "small-productive", "small-expressive", "medium", "large"], _t = ["productive", "expressive"], Mt = ["submit", "button", "reset"], Ct = [

"destructive-ghost"
], Lt = ["leading", "trailing"], Pt = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], Dt = ["post", "get", "dialog"], $t = ["_self", "_blank", "_parent", "_top"], Ft = `*,*:before,*:after{box-sizing:border-box}.o-btn{--btn-border-radius: var(--dt-radius-rounded-e);--btn-font-family: var(--dt-font-interactive-m-family);--btn-font-weight: var(--dt-font-interactive-m-weight);--btn-bg-color: var(--dt-color-interactive-brand);--btn-text-color: var(--dt-color-content-interactive-primary);--btn-height--xsmall: 32px;--btn-height--small: 40px;--btn-height--medium: 48px;--btn-height--large: 56px;position:relative;display:flex;gap:var(--dt-spacing-b);align-items:center;justify-content:center;box-sizing:border-box;height:var(--btn-height);padding:var(--btn-padding);border:none;border-radius:var(--btn-border-radius);outline:none;background-color:var(--btn-bg-color);font-family:var(--btn-font-family);font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-text-color);line-height:var(--btn-line-height);cursor:pointer;user-select:none;inline-size:var(--btn-inline-size)}.o-btn[variant=primary]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn[variant=primary]:active:not(:disabled),.o-btn[variant=primary][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}.o-btn[variant=primary][size=xsmall],.o-btn[variant=primary][size=small-productive]{--btn-bg-color: var(--dt-color-interactive-primary)}.o-btn[variant=primary][size=xsmall]:hover:not(:disabled),.o-btn[variant=primary][size=small-productive]:hover:not(:disabled){--hover-modifier: var(--dt-color-hover-02);--btn-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn[variant=primary][size=xsmall]:active:not(:disabled),.o-btn[variant=primary][size=xsmall][isLoading]:not(:disabled),.o-btn[variant=primary][size=small-productive]:active:not(:disabled),.o-btn[variant=primary][size=small-productive][isLoading]:not(:disabled){--active-modifier: var(--dt-color-active-02);--btn-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}.o-btn[variant=secondary]{--btn-bg-color: var(--dt-color-interactive-secondary);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn[variant=secondary]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--hover-modifier)))}.o-btn[variant=secondary]:active:not(:disabled),.o-btn[variant=secondary][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--active-modifier)))}.o-btn[variant=outline]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-secondary);border:1px solid var(--dt-color-border-strong)}.o-btn[variant=outline]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=outline]:active:not(:disabled),.o-btn[variant=outline][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[variant=ghost]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-link)}.o-btn[variant=ghost]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=ghost]:active:not(:disabled),.o-btn[variant=ghost][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[variant=inverse]{--btn-bg-color: var(--dt-color-interactive-inverse);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn[variant=inverse]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--hover-modifier)))}.o-btn[variant=inverse]:active:not(:disabled),.o-btn[variant=inverse][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--active-modifier)))}.o-btn[variant=ghost-inverse],.o-btn[variant=outline-inverse]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn[variant=ghost-inverse]:hover:not(:disabled),.o-btn[variant=outline-inverse]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), var(--dt-color-container-default-l), var(--hover-modifier))}.o-btn[variant=ghost-inverse]:active:not(:disabled),.o-btn[variant=ghost-inverse][isLoading]:not(:disabled),.o-btn[variant=outline-inverse]:active:not(:disabled),.o-btn[variant=outline-inverse][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), var(--dt-color-container-default-l), var(--active-modifier))}.o-btn[variant=outline-inverse]:not([disabled]){border:1px solid var(--dt-color-border-strong)}.o-btn[variant=destructive]{--btn-bg-color: var(--dt-color-support-error)}.o-btn[variant=destructive]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--hover-modifier)))}.o-btn[variant=destructive]:active:not(:disabled),.o-btn[variant=destructive][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--active-modifier)))}.o-btn[variant=destructive-ghost]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-error)}.o-btn[variant=destructive-ghost]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=destructive-ghost]:active:not(:disabled),.o-btn[variant=destructive-ghost][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[isFullWidth]{--btn-inline-size: 100%}.o-btn[disabled]{--btn-text-color: var(--dt-color-content-disabled) !important;cursor:not-allowed}.o-btn[disabled]:not([variant=ghost],[variant=ghost-inverse],[variant=destructive-ghost]){--btn-bg-color: var(--dt-color-disabled-01) !important}.o-btn[disabled][variant=outline]{border-color:var(--dt-color-disabled-01)!important}.o-btn[size=xsmall]{--btn-height: var(--btn-height--xsmall);--btn-padding: 6px var(--dt-spacing-b);--btn-font-size: calc(var(--dt-font-size-14) * 1px);--btn-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--btn-icon-size: 16px}@media (min-width: 768px){.o-btn[size=xsmall][isResponsive]{--btn-height: var(--btn-height--small);--btn-padding: 8px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--btn-icon-size: 20px}.o-btn[size=xsmall][isResponsive][responsiveSize=expressive]{--btn-height: var(--btn-height--small);--btn-padding: 6px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 20px}}.o-btn[size=small-expressive]{--btn-height: var(--btn-height--small);--btn-padding: 6px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 20px}@media (min-width: 768px){.o-btn[size=small-expressive][isResponsive]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=small-productive]{--btn-height: var(--btn-height--small);--btn-padding: 8px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--btn-icon-size: 20px}@media (min-width: 768px){.o-btn[size=small-productive][isResponsive]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=medium]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}@media (min-width: 768px){.o-btn[size=medium][isResponsive]{--btn-height: var(--btn-height--large);--btn-padding: 14px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=large]{--btn-height: var(--btn-height--large);--btn-padding: 14px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}.o-btn[isLoading]>*:not(pie-spinner){visibility:hidden}.o-btn[isLoading] pie-spinner{position:absolute}.o-btn:focus-visible{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}::slotted(svg){height:var(--btn-icon-size);width:var(--btn-icon-size)}
], Lt = ["leading", "trailing"], Pt = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], Dt = ["post", "get", "dialog"], $t = ["_self", "_blank", "_parent", "_top"], Ft = `*,*:before,*:after{box-sizing:border-box}.o-btn{--btn-border-radius: var(--dt-radius-rounded-e);--btn-font-family: var(--dt-font-interactive-m-family);--btn-font-weight: var(--dt-font-interactive-m-weight);--btn-bg-color: var(--dt-color-interactive-brand);--btn-text-color: var(--dt-color-content-interactive-primary);--btn-height--xsmall: 32px;--btn-height--small: 40px;--btn-height--medium: 48px;--btn-height--large: 56px;--btn-icon-display: block;position:relative;display:flex;gap:var(--dt-spacing-b);align-items:center;justify-content:center;box-sizing:border-box;height:var(--btn-height);padding:var(--btn-padding);border:none;border-radius:var(--btn-border-radius);outline:none;background-color:var(--btn-bg-color);font-family:var(--btn-font-family);font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-text-color);line-height:var(--btn-line-height);cursor:pointer;user-select:none;inline-size:var(--btn-inline-size)}.o-btn[variant=primary]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn[variant=primary]:active:not(:disabled),.o-btn[variant=primary][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}.o-btn[variant=primary][size=xsmall],.o-btn[variant=primary][size=small-productive]{--btn-bg-color: var(--dt-color-interactive-primary)}.o-btn[variant=primary][size=xsmall]:hover:not(:disabled),.o-btn[variant=primary][size=small-productive]:hover:not(:disabled){--hover-modifier: var(--dt-color-hover-02);--btn-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn[variant=primary][size=xsmall]:active:not(:disabled),.o-btn[variant=primary][size=xsmall][isLoading]:not(:disabled),.o-btn[variant=primary][size=small-productive]:active:not(:disabled),.o-btn[variant=primary][size=small-productive][isLoading]:not(:disabled){--active-modifier: var(--dt-color-active-02);--btn-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}.o-btn[variant=secondary]{--btn-bg-color: var(--dt-color-interactive-secondary);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn[variant=secondary]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--hover-modifier)))}.o-btn[variant=secondary]:active:not(:disabled),.o-btn[variant=secondary][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--active-modifier)))}.o-btn[variant=outline]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-secondary);border:1px solid var(--dt-color-border-strong)}.o-btn[variant=outline]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=outline]:active:not(:disabled),.o-btn[variant=outline][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[variant=ghost]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-link)}.o-btn[variant=ghost]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=ghost]:active:not(:disabled),.o-btn[variant=ghost][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[variant=inverse]{--btn-bg-color: var(--dt-color-interactive-inverse);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn[variant=inverse]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--hover-modifier)))}.o-btn[variant=inverse]:active:not(:disabled),.o-btn[variant=inverse][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--active-modifier)))}.o-btn[variant=ghost-inverse],.o-btn[variant=outline-inverse]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn[variant=ghost-inverse]:hover:not(:disabled),.o-btn[variant=outline-inverse]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), var(--dt-color-container-default-l), var(--hover-modifier))}.o-btn[variant=ghost-inverse]:active:not(:disabled),.o-btn[variant=ghost-inverse][isLoading]:not(:disabled),.o-btn[variant=outline-inverse]:active:not(:disabled),.o-btn[variant=outline-inverse][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), var(--dt-color-container-default-l), var(--active-modifier))}.o-btn[variant=outline-inverse]:not([disabled]){border:1px solid var(--dt-color-border-strong)}.o-btn[variant=destructive]{--btn-bg-color: var(--dt-color-support-error)}.o-btn[variant=destructive]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--btn-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--hover-modifier)))}.o-btn[variant=destructive]:active:not(:disabled),.o-btn[variant=destructive][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--btn-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--active-modifier)))}.o-btn[variant=destructive-ghost]{--btn-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-error)}.o-btn[variant=destructive-ghost]:hover:not(:disabled){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier))}.o-btn[variant=destructive-ghost]:active:not(:disabled),.o-btn[variant=destructive-ghost][isLoading]:not(:disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--btn-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier))}.o-btn[isFullWidth]{--btn-inline-size: 100%}.o-btn[disabled]{--btn-text-color: var(--dt-color-content-disabled) !important;cursor:not-allowed}.o-btn[disabled]:not([variant=ghost],[variant=ghost-inverse],[variant=destructive-ghost]){--btn-bg-color: var(--dt-color-disabled-01) !important}.o-btn[disabled][variant=outline]{border-color:var(--dt-color-disabled-01)!important}.o-btn[size=xsmall]{--btn-height: var(--btn-height--xsmall);--btn-padding: 6px var(--dt-spacing-b);--btn-font-size: calc(var(--dt-font-size-14) * 1px);--btn-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--btn-icon-size: 16px}@media (min-width: 768px){.o-btn[size=xsmall][isResponsive]{--btn-height: var(--btn-height--small);--btn-padding: 8px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--btn-icon-size: 20px}.o-btn[size=xsmall][isResponsive][responsiveSize=expressive]{--btn-height: var(--btn-height--small);--btn-padding: 6px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 20px}}.o-btn[size=small-expressive]{--btn-height: var(--btn-height--small);--btn-padding: 6px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 20px}@media (min-width: 768px){.o-btn[size=small-expressive][isResponsive]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=small-productive]{--btn-height: var(--btn-height--small);--btn-padding: 8px var(--dt-spacing-d);--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--btn-icon-size: 20px}@media (min-width: 768px){.o-btn[size=small-productive][isResponsive]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=medium]{--btn-height: var(--btn-height--medium);--btn-padding: 10px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}@media (min-width: 768px){.o-btn[size=medium][isResponsive]{--btn-height: var(--btn-height--large);--btn-padding: 14px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}}.o-btn[size=large]{--btn-height: var(--btn-height--large);--btn-padding: 14px var(--dt-spacing-e);--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--btn-icon-size: 24px}.o-btn[isLoading]>*:not(pie-spinner){visibility:hidden}.o-btn[isLoading] pie-spinner{position:absolute}.o-btn:focus-visible{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}::slotted(svg){height:var(--btn-icon-size);width:var(--btn-icon-size)}
`;
(function() {
const p = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), S = {
const p = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), S = {
ariaAtomic: "aria-atomic",

@@ -62,3 +62,3 @@ ariaAutoComplete: "aria-autocomplete",

role: "role"
}, at = (i, t) => {
}, ot = (i, t) => {
for (let e in S) {

@@ -78,7 +78,7 @@ t[e] = null;

};
function j(i) {
function U(i) {
const t = c.get(i), { form: e } = t;
Z(i, e, t), Y(i, t.labels);
Y(i, e, t), X(i, t.labels);
}
const G = (i, t = !1) => {
const j = (i, t = !1) => {
const e = document.createTreeWalker(i, NodeFilter.SHOW_ELEMENT, {

@@ -92,7 +92,7 @@ acceptNode(l) {

for (; r; )
r.formDisabledCallback && o && $(r, i.disabled), r = e.nextNode();
}, J = { attributes: !0, attributeFilter: ["disabled", "name"] }, z = T() ? new MutationObserver((i) => {
r.formDisabledCallback && o && D(r, i.disabled), r = e.nextNode();
}, G = { attributes: !0, attributeFilter: ["disabled", "name"] }, z = T() ? new MutationObserver((i) => {
for (const t of i) {
const e = t.target;
if (t.attributeName === "disabled" && (e.constructor.formAssociated ? $(e, e.hasAttribute("disabled")) : e.localName === "fieldset" && G(e)), t.attributeName === "name" && e.constructor.formAssociated) {
if (t.attributeName === "disabled" && (e.constructor.formAssociated ? D(e, e.hasAttribute("disabled")) : e.localName === "fieldset" && j(e)), t.attributeName === "name" && e.constructor.formAssociated) {
const r = c.get(e), o = M.get(e);

@@ -103,3 +103,3 @@ r.setFormValue(o);

}) : {};
function P(i) {
function _(i) {
i.forEach((t) => {

@@ -109,3 +109,3 @@ const { addedNodes: e, removedNodes: r } = t, o = Array.from(e), l = Array.from(r);

var u;
if (c.has(n) && n.constructor.formAssociated && j(n), k.has(n)) {
if (c.has(n) && n.constructor.formAssociated && U(n), k.has(n)) {
const d = k.get(n);

@@ -122,4 +122,4 @@ Object.keys(S).filter((w) => d[w] !== null).forEach((w) => {

const d = y.get(n), E = document.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, {
acceptNode(W) {
return c.has(W) && W.constructor.formAssociated && !(d && d.has(W)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
acceptNode(O) {
return c.has(O) && O.constructor.formAssociated && !(d && d.has(O)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}

@@ -129,42 +129,42 @@ });

for (; w; )
j(w), w = E.nextNode();
U(w), w = E.nextNode();
}
n.localName === "fieldset" && ((u = z.observe) == null || u.call(z, n, J), G(n, !0));
n.localName === "fieldset" && ((u = z.observe) == null || u.call(z, n, G), j(n, !0));
}), l.forEach((n) => {
const u = c.get(n);
u && a.get(u) && Q(u), g.has(n) && g.get(n).disconnect();
u && a.get(u) && J(u), g.has(n) && g.get(n).disconnect();
});
});
}
function nt(i) {
function at(i) {
i.forEach((t) => {
const { removedNodes: e } = t;
e.forEach((r) => {
const o = q.get(t.target);
c.has(r) && et(r), o.disconnect();
const o = K.get(t.target);
c.has(r) && tt(r), o.disconnect();
});
});
}
const st = (i) => {
const nt = (i) => {
var e;
const t = new MutationObserver(nt);
(e = t.observe) == null || e.call(t, i, { childList: !0 }), q.set(i, t);
const t = new MutationObserver(at);
(e = t.observe) == null || e.call(t, i, { childList: !0 }), K.set(i, t);
};
T() && new MutationObserver(P);
const D = {
T() && new MutationObserver(_);
const P = {
childList: !0,
subtree: !0
}, $ = (i, t) => {
}, D = (i, t) => {
i.toggleAttribute("internals-disabled", t), t ? i.setAttribute("aria-disabled", "true") : i.removeAttribute("aria-disabled"), i.formDisabledCallback && i.formDisabledCallback.apply(i, [t]);
}, Q = (i) => {
}, J = (i) => {
a.get(i).forEach((e) => {
e.remove();
}), a.set(i, []);
}, X = (i, t) => {
}, Q = (i, t) => {
const e = document.createElement("input");
return e.type = "hidden", e.name = i.getAttribute("name"), i.after(e), a.get(t).push(e), e;
}, lt = (i, t) => {
}, st = (i, t) => {
var e;
a.set(t, []), (e = z.observe) == null || e.call(z, i, J);
}, Y = (i, t) => {
a.set(t, []), (e = z.observe) == null || e.call(z, i, G);
}, X = (i, t) => {
if (t.length) {

@@ -178,7 +178,7 @@ Array.from(t).forEach((r) => r.addEventListener("click", i.click.bind(i)));

i.toggleAttribute("internals-invalid", o), i.toggleAttribute("internals-valid", !o);
}, lt = (i) => {
A(I(i.target));
}, ct = (i) => {
A(I(i.target));
}, dt = (i) => {
A(I(i.target));
}, vt = (i) => {
const t = ["button[type=submit]", "input[type=submit]", "button:not([type])"].map((e) => `${e}:not([disabled])`).map((e) => `${e}:not([form])${i.id ? `,${e}[form='${i.id}']` : ""}`).join(",");

@@ -193,3 +193,3 @@ i.addEventListener("click", (e) => {

});
}, ht = (i) => {
}, vt = (i) => {
const t = y.get(i.target);

@@ -199,3 +199,3 @@ t && t.size && t.forEach((e) => {

});
}, Z = (i, t, e) => {
}, Y = (i, t, e) => {
if (t) {

@@ -207,3 +207,3 @@ const r = y.get(t);

const o = /* @__PURE__ */ new Set();
o.add(i), y.set(t, o), vt(t), t.addEventListener("reset", ht), t.addEventListener("input", ct), t.addEventListener("change", dt);
o.add(i), y.set(t, o), dt(t), t.addEventListener("reset", vt), t.addEventListener("input", lt), t.addEventListener("change", ct);
}

@@ -220,3 +220,3 @@ f.set(t, { ref: i, internals: e }), i.constructor.formAssociated && i.formAssociatedCallback && setTimeout(() => {

throw new e(t);
}, tt = (i, t, e) => {
}, Z = (i, t, e) => {
const r = y.get(i);

@@ -226,6 +226,6 @@ return r && r.size && r.forEach((o) => {

}), t;
}, et = (i) => {
}, tt = (i) => {
if (i.constructor.formAssociated) {
const t = c.get(i), { labels: e, form: r } = t;
Y(i, e), Z(i, r, t);
X(i, e), Y(i, r, t);
}

@@ -236,3 +236,3 @@ };

}
class mt {
class ht {
constructor() {

@@ -242,3 +242,3 @@ this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);

}
const pt = (i) => (i.badInput = !1, i.customError = !1, i.patternMismatch = !1, i.rangeOverflow = !1, i.rangeUnderflow = !1, i.stepMismatch = !1, i.tooLong = !1, i.tooShort = !1, i.typeMismatch = !1, i.valid = !0, i.valueMissing = !1, i), bt = (i, t, e) => (i.valid = ut(t), Object.keys(t).forEach((r) => i[r] = t[r]), e && A(e), i), ut = (i) => {
const mt = (i) => (i.badInput = !1, i.customError = !1, i.patternMismatch = !1, i.rangeOverflow = !1, i.rangeUnderflow = !1, i.stepMismatch = !1, i.tooLong = !1, i.tooShort = !1, i.typeMismatch = !1, i.valid = !0, i.valueMissing = !1, i), pt = (i, t, e) => (i.valid = bt(t), Object.keys(t).forEach((r) => i[r] = t[r]), e && A(e), i), bt = (i) => {
let t = !0;

@@ -248,4 +248,4 @@ for (let e in i)

return t;
}, O = /* @__PURE__ */ new WeakMap();
function it(i, t) {
}, $ = /* @__PURE__ */ new WeakMap();
function et(i, t) {
i.toggleAttribute(t, !0), i.part && i.part.add(t);

@@ -260,3 +260,3 @@ }

throw new TypeError("Illegal constructor");
O.set(this, t);
$.set(this, t);
}

@@ -266,5 +266,5 @@ add(t) {

throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);
const e = super.add(t), r = O.get(this), o = `state${t}`;
return r.isConnected ? it(r, o) : setTimeout(() => {
it(r, o);
const e = super.add(t), r = $.get(this), o = `state${t}`;
return r.isConnected ? et(r, o) : setTimeout(() => {
et(r, o);
}), e;

@@ -278,3 +278,3 @@ }

delete(t) {
const e = super.delete(t), r = O.get(this);
const e = super.delete(t), r = $.get(this);
return r.isConnected ? (r.toggleAttribute(`state${t}`, !1), r.part && r.part.remove(`state${t}`)) : setTimeout(() => {

@@ -285,3 +285,3 @@ r.toggleAttribute(`state${t}`, !1), r.part && r.part.remove(`state${t}`);

}
function rt(i, t, e, r) {
function it(i, t, e, r) {
if (e === "a" && !r)

@@ -293,3 +293,3 @@ throw new TypeError("Private accessor was defined without a getter");

}
function ft(i, t, e, r, o) {
function ut(i, t, e, r, o) {
if (r === "m")

@@ -304,5 +304,5 @@ throw new TypeError("Private method is not writable");

var C;
class gt {
class ft {
constructor(t) {
C.set(this, void 0), ft(this, C, t, "f");
C.set(this, void 0), ut(this, C, t, "f");
for (let e = 0; e < t.length; e++) {

@@ -315,6 +315,6 @@ let r = t[e];

get length() {
return rt(this, C, "f").length;
return it(this, C, "f").length;
}
[(C = /* @__PURE__ */ new WeakMap(), Symbol.iterator)]() {
return rt(this, C, "f")[Symbol.iterator]();
return it(this, C, "f")[Symbol.iterator]();
}

@@ -328,3 +328,3 @@ item(t) {

}
function yt() {
function gt() {
const i = HTMLFormElement.prototype.checkValidity;

@@ -336,7 +336,7 @@ HTMLFormElement.prototype.checkValidity = e;

let n = i.apply(this, l);
return tt(this, n, "checkValidity");
return Z(this, n, "checkValidity");
}
function r(...l) {
let n = t.apply(this, l);
return tt(this, n, "reportValidity");
return Z(this, n, "reportValidity");
}

@@ -350,7 +350,7 @@ const { get: o } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "elements");

const d = Array.from(n).concat(u).sort((E, w) => E.compareDocumentPosition ? E.compareDocumentPosition(w) & 2 ? 1 : -1 : 0);
return new gt(d);
return new ft(d);
}
});
}
class ot {
class rt {
static get isPolyfilled() {

@@ -362,4 +362,4 @@ return !0;

throw new TypeError("Illegal constructor");
const e = t.getRootNode(), r = new mt();
this.states = new V(t), p.set(this, t), s.set(this, r), c.set(t, this), at(t, this), lt(t, this), Object.seal(this), e instanceof DocumentFragment && st(e);
const e = t.getRootNode(), r = new ht();
this.states = new V(t), p.set(this, t), s.set(this, r), c.set(t, this), ot(t, this), st(t, this), Object.seal(this), e instanceof DocumentFragment && nt(e);
}

@@ -397,3 +397,3 @@ checkValidity() {

return !0;
const e = this.checkValidity(), r = K.get(this);
const e = this.checkValidity(), r = B.get(this);
if (r && !t.constructor.formAssociated)

@@ -405,5 +405,5 @@ throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");

const e = p.get(this);
if (x(e, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), Q(this), t != null && !(t instanceof FormData)) {
if (x(e, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), J(this), t != null && !(t instanceof FormData)) {
if (e.getAttribute("name")) {
const r = X(e, this);
const r = Q(e, this);
r.value = t;

@@ -414,3 +414,3 @@ }

if (typeof o == "string") {
const l = X(e, this);
const l = Q(e, this);
l.name = r, l.value = o;

@@ -425,10 +425,10 @@ }

throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
K.set(this, r);
B.set(this, r);
const l = s.get(this), n = {};
for (const E in t)
n[E] = t[E];
Object.keys(n).length === 0 && pt(l);
Object.keys(n).length === 0 && mt(l);
const u = { ...l, ...n };
delete u.valid;
const { valid: d } = bt(l, u, this.form);
const { valid: d } = pt(l, u, this.form);
if (!d && !e)

@@ -439,3 +439,3 @@ throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");

get shadowRoot() {
const t = p.get(this), e = B.get(t);
const t = p.get(this), e = H.get(t);
return e || null;

@@ -456,3 +456,3 @@ }

}
function wt() {
function yt() {
if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals)

@@ -481,3 +481,3 @@ return !1;

}
if (wt()) {
if (yt()) {
if (typeof window < "u" && !window.CustomStateSet) {

@@ -492,3 +492,3 @@ window.CustomStateSet = V;

} else {
if (typeof window < "u" && (window.ElementInternals = ot), typeof CustomElementRegistry < "u") {
if (typeof window < "u" && (window.ElementInternals = rt), typeof CustomElementRegistry < "u") {
const i = CustomElementRegistry.prototype.define;

@@ -499,3 +499,3 @@ CustomElementRegistry.prototype.define = function(t, e, r) {

e.prototype.connectedCallback = function() {
U.has(this) || (U.set(this, !0), this.hasAttribute("disabled") && $(this, !0)), o != null && o.apply(this), et(this);
q.has(this) || (q.set(this, !0), this.hasAttribute("disabled") && D(this, !0)), o != null && o.apply(this), tt(this);
};

@@ -514,9 +514,9 @@ }

throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
return new ot(this);
return new rt(this);
}), typeof Element < "u") {
let i = function(...e) {
const r = t.apply(this, e);
if (B.set(this, r), T()) {
const o = new MutationObserver(P);
window.ShadyDOM ? o.observe(this, D) : o.observe(r, D), g.set(this, o);
if (H.set(this, r), T()) {
const o = new MutationObserver(_);
window.ShadyDOM ? o.observe(this, P) : o.observe(r, P), g.set(this, o);
}

@@ -528,3 +528,3 @@ return r;

}
T() && typeof document < "u" && new MutationObserver(P).observe(document.documentElement, D), typeof HTMLFormElement < "u" && yt(), typeof window < "u" && !window.CustomStateSet && (window.CustomStateSet = V);
T() && typeof document < "u" && new MutationObserver(_).observe(document.documentElement, P), typeof HTMLFormElement < "u" && gt(), typeof window < "u" && !window.CustomStateSet && (window.CustomStateSet = V);
}

@@ -538,3 +538,3 @@ })();

const L = "pie-button";
class v extends Et {
class v extends xt {
constructor() {

@@ -590,3 +590,3 @@ super(), this.size = "medium", this.type = "submit", this.variant = "primary", this.iconPlacement = "leading", this.disabled = !1, this.isLoading = !1, this.isFullWidth = !1, this.isResponsive = !1, this._handleFormKeyDown = (s) => {

renderSpinner() {
const { size: s, variant: a, disabled: c } = this, b = s && s.includes("small") ? "small" : "medium";
const { size: s, variant: a, disabled: c } = this, b = s.includes("small") ? "small" : "medium";
let f;

@@ -615,6 +615,6 @@ return c ? f = a === "ghost-inverse" ? "inverse" : "secondary" : f = ["primary", "destructive", "outline-inverse", "ghost-inverse"].includes(this.variant) ? "inverse" : "secondary", N`

class="o-btn"
type=${R(s)}
variant=${R(b)}
size=${R(f)}
responsiveSize=${R(k)}
type=${s}
variant=${b}
size=${f}
responsiveSize=${Et(k)}
?disabled=${a}

@@ -624,6 +624,6 @@ ?isFullWidth=${c}

?isLoading=${g}>
${g ? this.renderSpinner() : H}
${M === "leading" ? N`<slot name="icon"></slot>` : H}
${g ? this.renderSpinner() : W}
${M === "leading" ? N`<slot name="icon"></slot>` : W}
<slot></slot>
${M === "trailing" ? N`<slot name="icon"></slot>` : H}
${M === "trailing" ? N`<slot name="icon"></slot>` : W}
</button>`;

@@ -637,18 +637,18 @@ }

v.formAssociated = !0;
v.styles = xt(Ft);
v.styles = wt(Ft);
m([
h(),
_(L, zt, "medium")
R(L, zt, "medium")
], v.prototype, "size", 2);
m([
h(),
_(L, Mt, "submit")
R(L, Mt, "submit")
], v.prototype, "type", 2);
m([
h(),
_(L, Ct, "primary")
R(L, Ct, "primary")
], v.prototype, "variant", 2);
m([
h({ type: String }),
_(L, Lt, "leading")
R(L, Lt, "leading")
], v.prototype, "iconPlacement", 2);

@@ -655,0 +655,0 @@ m([

import type { CSSResult } from 'lit';
import type { LitElement } from 'lit';
import type { PropertyValues } from 'lit';
import * as React_2 from 'react';
import type { ReactWebComponent } from '@lit/react';
import type { TemplateResult } from 'lit';

@@ -11,11 +11,11 @@

*/
size?: typeof sizes[number];
size: typeof sizes[number];
/**
* What type attribute should be applied to the button. For example submit, button.
*/
type?: typeof types[number];
type: typeof types[number];
/**
* What style variant the button should be such as primary, outline or ghost.
*/
variant?: Variant;
variant: Variant;
/**

@@ -28,15 +28,15 @@ * The placement of the icon slot, if provided, such as leading or trailing

*/
disabled?: boolean;
disabled: boolean;
/**
* When true, the button element will occupy the full width of its container.
*/
isFullWidth?: boolean;
isFullWidth: boolean;
/**
* When true, displays a loading indicator inside the button.
*/
isLoading?: boolean;
isLoading: boolean;
/**
* When true, enables the responsive size feature.
*/
isResponsive?: boolean;
isResponsive: boolean;
/**

@@ -94,3 +94,3 @@ * The name of the button, submitted as a pair with the button's value as part of the form data, when that button is used to submit the form.

export declare const PieButton: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<PieButton_2> & ReactBaseType>;
export declare const PieButton: ReactWebComponent<PieButton_2, {}>;

@@ -148,4 +148,2 @@ /**

declare type ReactBaseType = Pick<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick'>;
export declare const responsiveSizes: readonly ["productive", "expressive"];

@@ -152,0 +150,0 @@

import * as t from "react";
import { createComponent as e } from "@lit/react";
import { PieButton as o } from "./index.js";
import { formEncodingtypes as y, formMethodTypes as B, formTargetTypes as l, iconPlacements as d, responsiveSizes as g, sizes as v, types as T, variants as x } from "./index.js";
import { formEncodingtypes as y, formMethodTypes as P, formTargetTypes as l, iconPlacements as B, responsiveSizes as d, sizes as g, types as v, variants as T } from "./index.js";
import "lit";

@@ -10,3 +10,3 @@ import "lit/decorators.js";

import "@justeattakeaway/pie-spinner";
const r = e({
const c = e({
displayName: "PieButton",

@@ -17,13 +17,13 @@ elementClass: o,

events: {}
}), f = r;
});
export {
f as PieButton,
c as PieButton,
y as formEncodingtypes,
B as formMethodTypes,
P as formMethodTypes,
l as formTargetTypes,
d as iconPlacements,
g as responsiveSizes,
v as sizes,
T as types,
x as variants
B as iconPlacements,
d as responsiveSizes,
g as sizes,
v as types,
T as variants
};
{
"name": "@justeattakeaway/pie-button",
"version": "0.0.0-snapshot-release-20231219091122",
"version": "0.0.0-snapshot-release-20231220145526",
"description": "PIE design system button built using web components",

@@ -40,3 +40,3 @@ "type": "module",

"dependencies": {
"@justeattakeaway/pie-spinner": "0.0.0-snapshot-release-20231219091122",
"@justeattakeaway/pie-spinner": "0.3.1",
"@justeattakeaway/pie-webc-core": "0.13.0",

@@ -43,0 +43,0 @@ "element-internals-polyfill": "1.3.9"

@@ -20,11 +20,11 @@ export const sizes = ['xsmall', 'small-productive', 'small-expressive', 'medium', 'large'] as const;

*/
size?: typeof sizes[number];
size: typeof sizes[number];
/**
* What type attribute should be applied to the button. For example submit, button.
*/
type?: typeof types[number];
type: typeof types[number];
/**
* What style variant the button should be such as primary, outline or ghost.
*/
variant?: Variant;
variant: Variant;
/**

@@ -37,11 +37,11 @@ * The placement of the icon slot, if provided, such as leading or trailing

*/
disabled?: boolean;
disabled: boolean;
/**
* When true, the button element will occupy the full width of its container.
*/
isFullWidth?: boolean;
isFullWidth: boolean;
/**
* When true, displays a loading indicator inside the button.
*/
isLoading?: boolean;
isLoading: boolean;

@@ -51,3 +51,3 @@ /**

*/
isResponsive?: boolean;
isResponsive: boolean;

@@ -54,0 +54,0 @@ /**

@@ -214,3 +214,3 @@ import {

const { size, variant, disabled } = this;
const spinnerSize = size && size.includes('small') ? 'small' : 'medium'; // includes("small") matches for any small size value and xsmall
const spinnerSize = size.includes('small') ? 'small' : 'medium'; // includes("small") matches for any small size value and xsmall
let spinnerVariant;

@@ -248,5 +248,5 @@ if (disabled) {

class="o-btn"
type=${ifDefined(type)}
variant=${ifDefined(variant)}
size=${ifDefined(size)}
type=${type}
variant=${variant}
size=${size}
responsiveSize=${ifDefined(responsiveSize)}

@@ -253,0 +253,0 @@ ?disabled=${disabled}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc