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

@justeattakeaway/pie-spinner

Package Overview
Dependencies
Maintainers
13
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeattakeaway/pie-spinner - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

20

custom-elements.json

@@ -30,2 +30,10 @@ {

"default": "['brand', 'secondary', 'inverse']"
},
{
"kind": "variable",
"name": "defaultProps",
"type": {
"text": "DefaultProps"
},
"default": "{\n size: 'medium',\n variant: 'brand',\n}"
}

@@ -49,2 +57,10 @@ ],

}
},
{
"kind": "js",
"name": "defaultProps",
"declaration": {
"name": "defaultProps",
"module": "src/defs.js"
}
}

@@ -78,3 +94,2 @@ ]

"privacy": "public",
"default": "'medium'",
"attribute": "size"

@@ -89,3 +104,2 @@ },

"privacy": "public",
"default": "'brand'",
"attribute": "variant"

@@ -107,3 +121,2 @@ }

},
"default": "'medium'",
"fieldName": "size"

@@ -116,3 +129,2 @@ },

},
"default": "'brand'",
"fieldName": "variant"

@@ -119,0 +131,0 @@ }

@@ -0,1 +1,2 @@

import { ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
import type { CSSResult } from 'lit';

@@ -9,2 +10,6 @@ import type { LitElement } from 'lit';

export declare type DefaultProps = ComponentDefaultPropsGeneric<SpinnerProps, 'size' | 'variant'>;
export declare const defaultProps: DefaultProps;
/**

@@ -11,0 +16,0 @@ * @tagname pie-spinner

66

dist/index.js

@@ -1,15 +0,18 @@

import { unsafeCSS as b, LitElement as m, html as d, nothing as h } from "lit";
import { property as l } from "lit/decorators.js";
import { validPropertyValues as v, defineCustomElement as f } from "@justeattakeaway/pie-webc-core";
const z = `*,*:after,*:before{box-sizing:inherit}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-spinner{--spinner-size: 24px;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), .35);block-size:var(--spinner-size);inline-size:var(--spinner-size);border-radius:var(--dt-radius-rounded-e);border-width:calc(var(--spinner-size) / 8);border-style:solid;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);will-change:transform;animation:rotate360 1.15s linear infinite;--spinner-base-color-h: var(--dt-color-content-brand-h);--spinner-base-color-s: var(--dt-color-content-brand-s);--spinner-base-color-l: var(--dt-color-content-brand-l)}.c-spinner[variant=secondary]{--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l)}.c-spinner[variant=inverse]{--spinner-base-color-h: var(--dt-color-content-inverse-h);--spinner-base-color-s: var(--dt-color-content-inverse-s);--spinner-base-color-l: var(--dt-color-content-inverse-l)}.c-spinner[size=xsmall]{--spinner-size: 16px}.c-spinner[size=small]{--spinner-size: 20px}.c-spinner[size=large]{--spinner-size: 32px}.c-spinner[size=xlarge]{--spinner-size: 48px}.c-spinner-label{position:absolute;display:block;height:1px;width:1px;overflow:hidden;padding:1px;white-space:nowrap}
`, u = ["xsmall", "small", "medium", "large", "xlarge"], y = ["brand", "secondary", "inverse"];
var x = Object.defineProperty, g = Object.getOwnPropertyDescriptor, p = (i, n, s, e) => {
for (var r = e > 1 ? void 0 : e ? g(n, s) : n, a = i.length - 1, t; a >= 0; a--)
(t = i[a]) && (r = (e ? t(n, s, r) : t(r)) || r);
return e && r && x(n, s, r), r;
import { unsafeCSS as h, LitElement as m, html as d, nothing as z } from "lit";
import { property as p } from "lit/decorators.js";
import { validPropertyValues as b, defineCustomElement as f } from "@justeattakeaway/pie-webc-core";
const u = `*,*:after,*:before{box-sizing:inherit}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-spinner{--spinner-size: 24px;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), .35);block-size:var(--spinner-size);inline-size:var(--spinner-size);border-radius:var(--dt-radius-rounded-e);border-width:calc(var(--spinner-size) / 8);border-style:solid;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);will-change:transform;animation:rotate360 1.15s linear infinite;--spinner-base-color-h: var(--dt-color-content-brand-h);--spinner-base-color-s: var(--dt-color-content-brand-s);--spinner-base-color-l: var(--dt-color-content-brand-l)}.c-spinner[variant=secondary]{--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l)}.c-spinner[variant=inverse]{--spinner-base-color-h: var(--dt-color-content-inverse-h);--spinner-base-color-s: var(--dt-color-content-inverse-s);--spinner-base-color-l: var(--dt-color-content-inverse-l)}.c-spinner[size=xsmall]{--spinner-size: 16px}.c-spinner[size=small]{--spinner-size: 20px}.c-spinner[size=large]{--spinner-size: 32px}.c-spinner[size=xlarge]{--spinner-size: 48px}.c-spinner-label{position:absolute;display:block;height:1px;width:1px;overflow:hidden;padding:1px;white-space:nowrap}
`, y = ["xsmall", "small", "medium", "large", "xlarge"], x = ["brand", "secondary", "inverse"], o = {
size: "medium",
variant: "brand"
};
const c = "pie-spinner";
class o extends m {
var g = Object.defineProperty, w = Object.getOwnPropertyDescriptor, c = (a, n, s, e) => {
for (var r = e > 1 ? void 0 : e ? w(n, s) : n, t = a.length - 1, l; t >= 0; t--)
(l = a[t]) && (r = (e ? l(n, s, r) : l(r)) || r);
return e && r && g(n, s, r), r;
};
const v = "pie-spinner";
class i extends m {
constructor() {
super(...arguments), this.size = "medium", this.variant = "brand";
super(...arguments), this.size = o.size, this.variant = o.variant;
}

@@ -24,25 +27,26 @@ render() {

aria-live="polite"
size="${s || "medium"}"
variant="${n || "brand"}">
${e != null && e.label ? d`<span class="c-spinner-label">${e.label}</span>` : h}
size="${s}"
variant="${n}">
${e != null && e.label ? d`<span class="c-spinner-label">${e.label}</span>` : z}
</div>`;
}
}
o.styles = b(z);
p([
l({ type: Object })
], o.prototype, "aria", 2);
p([
l(),
v(c, u, "medium")
], o.prototype, "size", 2);
p([
l(),
v(c, y, "brand")
], o.prototype, "variant", 2);
f(c, o);
i.styles = h(u);
c([
p({ type: Object })
], i.prototype, "aria", 2);
c([
p(),
b(v, y, o.size)
], i.prototype, "size", 2);
c([
p(),
b(v, x, o.variant)
], i.prototype, "variant", 2);
f(v, i);
export {
o as PieSpinner,
u as sizes,
y as variants
i as PieSpinner,
o as defaultProps,
y as sizes,
x as variants
};

@@ -0,1 +1,2 @@

import { ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
import type { CSSResult } from 'lit';

@@ -10,2 +11,6 @@ import type { LitElement } from 'lit';

export declare type DefaultProps = ComponentDefaultPropsGeneric<SpinnerProps, 'size' | 'variant'>;
export declare const defaultProps: DefaultProps;
export declare const PieSpinner: React_2.ForwardRefExoticComponent<SpinnerProps & React_2.RefAttributes<PieSpinner_2> & ReactBaseType>;

@@ -12,0 +17,0 @@

import * as e from "react";
import { createComponent as i } from "@lit/react";
import { PieSpinner as r } from "./index.js";
import { sizes as S, variants as f } from "./index.js";
import { createComponent as r } from "@lit/react";
import { PieSpinner as i } from "./index.js";
import { defaultProps as f, sizes as S, variants as l } from "./index.js";
import "lit";
import "lit/decorators.js";
import "@justeattakeaway/pie-webc-core";
const n = i({
const t = r({
displayName: "PieSpinner",
elementClass: r,
elementClass: i,
react: e,
tagName: "pie-spinner",
events: {}
}), s = n;
}), s = t;
export {
s as PieSpinner,
f as defaultProps,
S as sizes,
f as variants
l as variants
};
{
"name": "@justeattakeaway/pie-spinner",
"description": "PIE Design System Spinner built using Web Components",
"version": "0.6.4",
"version": "0.6.5",
"type": "module",

@@ -44,3 +44,3 @@ "main": "dist/index.js",

"dependencies": {
"@justeattakeaway/pie-webc-core": "0.22.0"
"@justeattakeaway/pie-webc-core": "0.23.0"
},

@@ -47,0 +47,0 @@ "volta": {

@@ -0,1 +1,3 @@

import { type ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
export const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'] as const;

@@ -22,1 +24,7 @@ export const variants = ['brand', 'secondary', 'inverse'] as const;

}
export type DefaultProps = ComponentDefaultPropsGeneric<SpinnerProps, 'size' | 'variant'>;
export const defaultProps: DefaultProps = {
size: 'medium',
variant: 'brand',
};

@@ -12,2 +12,3 @@ import {

type AriaProps,
defaultProps,
} from './defs';

@@ -28,8 +29,8 @@

@property()
@validPropertyValues(componentSelector, sizes, 'medium')
public size?: SpinnerProps['size'] = 'medium';
@validPropertyValues(componentSelector, sizes, defaultProps.size)
public size?: SpinnerProps['size'] = defaultProps.size;
@property()
@validPropertyValues(componentSelector, variants, 'brand')
public variant?: SpinnerProps['variant'] = 'brand';
@validPropertyValues(componentSelector, variants, defaultProps.variant)
public variant?: SpinnerProps['variant'] = defaultProps.variant;

@@ -45,4 +46,4 @@ render () {

aria-live="polite"
size="${size || 'medium'}"
variant="${variant || 'brand'}">
size="${size}"
variant="${variant}">
${aria?.label ? html`<span class="c-spinner-label">${aria.label}</span>` : nothing}

@@ -49,0 +50,0 @@ </div>`;

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