@justeattakeaway/pie-button
Advanced tools
Comparing version 0.0.0-snapshot-release-20240105125445 to 0.0.0-snapshot-release-20240105142421
@@ -12,11 +12,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; | ||
/** | ||
@@ -29,15 +29,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; | ||
/** | ||
@@ -44,0 +44,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. |
@@ -547,3 +547,3 @@ import { LitElement as wt, html as N, nothing as W, unsafeCSS as xt } from "lit"; | ||
renderSpinner() { | ||
const { size: s, variant: a, disabled: c } = this, u = s && s.includes("small") ? "small" : "medium"; | ||
const { size: s, variant: a, disabled: c } = this, u = s.includes("small") ? "small" : "medium"; | ||
let f; | ||
@@ -572,5 +572,5 @@ 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=${s || "submit"} | ||
variant=${u || "variant"} | ||
size=${f || "medium"} | ||
type=${s} | ||
variant=${u} | ||
size=${f} | ||
responsiveSize=${Et(k)} | ||
@@ -577,0 +577,0 @@ ?disabled=${a} |
@@ -6,3 +6,3 @@ import type { CSSResult } from 'lit'; | ||
import type { PropertyValues } from 'lit'; | ||
import * as React_2 from 'react'; | ||
import type { ReactWebComponent } from '@lit/react'; | ||
import type { TemplateResult } from 'lit'; | ||
@@ -14,11 +14,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; | ||
/** | ||
@@ -31,15 +31,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; | ||
/** | ||
@@ -97,3 +97,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, {}>; | ||
@@ -149,4 +149,2 @@ /** | ||
declare type ReactBaseType = React_2.ButtonHTMLAttributes<HTMLButtonElement>; | ||
export declare const responsiveSizes: readonly ["productive", "expressive"]; | ||
@@ -153,0 +151,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-20240105125445", | ||
"version": "0.0.0-snapshot-release-20240105142421", | ||
"description": "PIE design system button built using web components", | ||
@@ -40,6 +40,6 @@ "type": "module", | ||
"dependencies": { | ||
"@justeattakeaway/pie-spinner": "0.0.0-snapshot-release-20240105125445", | ||
"@justeattakeaway/pie-webc-core": "0.15.0", | ||
"@justeattakeaway/pie-spinner": "0.0.0-snapshot-release-20240105142421", | ||
"@justeattakeaway/pie-webc-core": "0.0.0-snapshot-release-20240105142421", | ||
"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 @@ /** |
@@ -200,3 +200,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; | ||
@@ -234,5 +234,5 @@ if (disabled) { | ||
class="o-btn" | ||
type=${type || 'submit'} | ||
variant=${variant || 'variant'} | ||
size=${size || 'medium'} | ||
type=${type} | ||
variant=${variant} | ||
size=${size} | ||
responsiveSize=${ifDefined(responsiveSize)} | ||
@@ -239,0 +239,0 @@ ?disabled=${disabled} |
76863
10
1323
+ Added@justeattakeaway/pie-spinner@0.0.0-snapshot-release-20240105142421(transitive)
+ Added@justeattakeaway/pie-webc-core@0.0.0-snapshot-release-20240105142421(transitive)
- Removed@justeattakeaway/pie-spinner@0.0.0-snapshot-release-20240105125445(transitive)
- Removed@justeattakeaway/pie-webc-core@0.15.0(transitive)
Updated@justeattakeaway/pie-spinner@0.0.0-snapshot-release-20240105142421
Updated@justeattakeaway/pie-webc-core@0.0.0-snapshot-release-20240105142421