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

@justeattakeaway/pie-assistive-text

Package Overview
Dependencies
Maintainers
13
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeattakeaway/pie-assistive-text - npm Package Compare versions

Comparing version 0.0.0-snapshot-release-20240501131344 to 0.0.0-snapshot-release-20240516144918

18

custom-elements.json

@@ -22,2 +22,10 @@ {

"default": "['default', 'error', 'success']"
},
{
"kind": "variable",
"name": "defaultProps",
"type": {
"text": "DefaultProps"
},
"default": "{\n variant: 'default',\n}"
}

@@ -33,2 +41,10 @@ ],

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

@@ -59,3 +75,2 @@ ]

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

@@ -81,3 +96,2 @@ },

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

@@ -84,0 +98,0 @@ }

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

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

@@ -12,2 +13,6 @@ import type { LitElement } from 'lit';

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

@@ -14,0 +19,0 @@ * @tagname pie-assistive-text

47

dist/index.js

@@ -1,18 +0,20 @@

import { unsafeCSS as p, LitElement as f, html as i, nothing as l } from "lit";
import { property as d } from "lit/decorators.js";
import { validPropertyValues as x, defineCustomElement as m } from "@justeattakeaway/pie-webc-core";
import { ifDefined as h } from "lit/directives/if-defined.js";
import { unsafeCSS as f, LitElement as d, html as i, nothing as l } from "lit";
import { property as x } from "lit/decorators.js";
import { validPropertyValues as m, defineCustomElement as h } from "@justeattakeaway/pie-webc-core";
import { ifDefined as u } from "lit/directives/if-defined.js";
import "@justeattakeaway/pie-icons-webc/dist/IconAlertCircle.js";
import "@justeattakeaway/pie-icons-webc/dist/IconCheckCircle.js";
const u = `*,*:after,*:before{box-sizing:inherit}.c-assistiveText{--assistive-text-color: var(--dt-color-content-default);margin:0;padding-block-start:var(--dt-spacing-a);color:var(--assistive-text-color);font-family:var(--dt-font-body-s-family);font-weight:var(--dt-font-body-s-weight);font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px);gap:var(--dt-spacing-b);display:flex;align-items:flex-start;overflow-wrap:anywhere}.c-assistiveText[variant=success]{--assistive-text-color: var(--dt-color-content-positive)}.c-assistiveText[variant=error]{--assistive-text-color: var(--dt-color-content-error)}.c-assistiveText .c-assistiveText-icon{display:inline-flex}
`, y = ["default", "error", "success"];
var g = Object.defineProperty, b = Object.getOwnPropertyDescriptor, T = (r, t, o, s) => {
for (var e = s > 1 ? void 0 : s ? b(t, o) : t, a = r.length - 1, c; a >= 0; a--)
(c = r[a]) && (e = (s ? c(t, o, e) : c(e)) || e);
return s && e && g(t, o, e), e;
const y = `*,*:after,*:before{box-sizing:inherit}.c-assistiveText{--assistive-text-color: var(--dt-color-content-default);margin:0;padding-block-start:var(--dt-spacing-a);color:var(--assistive-text-color);font-family:var(--dt-font-body-s-family);font-weight:var(--dt-font-body-s-weight);font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px);gap:var(--dt-spacing-b);display:flex;align-items:flex-start;overflow-wrap:anywhere}.c-assistiveText[variant=success]{--assistive-text-color: var(--dt-color-content-positive)}.c-assistiveText[variant=error]{--assistive-text-color: var(--dt-color-content-error)}.c-assistiveText .c-assistiveText-icon{display:inline-flex}
`, g = ["default", "error", "success"], v = {
variant: "default"
};
const v = "pie-assistive-text";
class n extends f {
var b = Object.defineProperty, T = Object.getOwnPropertyDescriptor, w = (r, t, o, s) => {
for (var e = s > 1 ? void 0 : s ? T(t, o) : t, a = r.length - 1, n; a >= 0; a--)
(n = r[a]) && (e = (s ? n(t, o, e) : n(e)) || e);
return s && e && b(t, o, e), e;
};
const p = "pie-assistive-text";
class c extends d {
constructor() {
super(...arguments), this.variant = "default";
super(...arguments), this.variant = v.variant;
}

@@ -37,3 +39,3 @@ /**

data-test-id="pie-assistive-text"
variant=${h(t)}>
variant=${u(t)}>
${this.renderIcon()}

@@ -44,11 +46,12 @@ <slot></slot>

}
n.styles = p(u);
T([
d({ type: String }),
x(v, y, "default")
], n.prototype, "variant", 2);
m(v, n);
c.styles = f(y);
w([
x({ type: String }),
m(p, g, v.variant)
], c.prototype, "variant", 2);
h(p, c);
export {
n as PieAssistiveText,
y as variants
c as PieAssistiveText,
v as defaultProps,
g as variants
};

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

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

@@ -13,2 +14,6 @@ import type { LitElement } from 'lit';

export declare type DefaultProps = ComponentDefaultPropsGeneric<AssistiveTextProps, 'variant'>;
export declare const defaultProps: DefaultProps;
export declare const PieAssistiveText: React_2.ForwardRefExoticComponent<AssistiveTextProps & React_2.RefAttributes<PieAssistiveText_2> & ReactBaseType>;

@@ -15,0 +20,0 @@

import * as t from "react";
import { createComponent as e } from "@lit/react";
import { PieAssistiveText as i } from "./index.js";
import { variants as T } from "./index.js";
import { defaultProps as A, variants as T } from "./index.js";
import "lit";

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

c as PieAssistiveText,
A as defaultProps,
T as variants
};
{
"name": "@justeattakeaway/pie-assistive-text",
"description": "PIE Design System Assistive Text built using Web Components",
"version": "0.0.0-snapshot-release-20240501131344",
"version": "0.0.0-snapshot-release-20240516144918",
"type": "module",

@@ -43,4 +43,4 @@ "main": "dist/index.js",

"dependencies": {
"@justeattakeaway/pie-icons-webc": "0.0.0-snapshot-release-20240501131344",
"@justeattakeaway/pie-webc-core": "0.0.0-snapshot-release-20240501131344"
"@justeattakeaway/pie-icons-webc": "0.0.0-snapshot-release-20240516144918",
"@justeattakeaway/pie-webc-core": "0.0.0-snapshot-release-20240516144918"
},

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

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

import { type ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
export const variants = ['default', 'error', 'success'] as const;

@@ -9,1 +11,7 @@

}
export type DefaultProps = ComponentDefaultPropsGeneric<AssistiveTextProps, 'variant'>;
export const defaultProps: DefaultProps = {
variant: 'default',
};

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

import styles from './assistive-text.scss?inline';
import { AssistiveTextProps, variants } from './defs';
import { AssistiveTextProps, variants, defaultProps } from './defs';

@@ -26,4 +26,4 @@ // Valid values available to consumers

@property({ type: String })
@validPropertyValues(componentSelector, variants, 'default')
public variant?: AssistiveTextProps['variant'] = 'default';
@validPropertyValues(componentSelector, variants, defaultProps.variant)
public variant?: AssistiveTextProps['variant'] = defaultProps.variant;

@@ -30,0 +30,0 @@ /**

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