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

@pap-it/button

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pap-it/button - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

27

dist/react/Button.d.ts

@@ -5,3 +5,3 @@ import React from "react";

export { Button as ButtonElement } from "../src";
export type Props = {
export type Props = React.HTMLAttributes<HTMLElement> & {
type?: "button" | "submit" | "reset";

@@ -25,4 +25,5 @@ size?: "small" | "medium" | "large";

className?: string;
tabIndex?: number;
};
export type Attributes = {
export type Attributes = React.HTMLAttributes<HTMLElement> & {
type?: string;

@@ -45,4 +46,24 @@ size?: string;

};
export declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.HTMLAttributes<HTMLElement> & {
export declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
type?: "button" | "reset" | "submit" | undefined;
size?: "small" | "medium" | "large" | undefined;
radius?: "small" | "none" | "medium" | "large" | "circular" | undefined;
href?: string | undefined;
circle?: boolean | undefined;
loading?: boolean | undefined;
textvariant?: "B1" | "B2" | "button1" | "button2" | undefined;
mode?: "fill" | "hug" | undefined;
variant?: "clear" | "filled" | "outlined" | undefined;
color?: "inverse" | "success" | "primary" | "secondary" | "danger" | "warning" | undefined;
defaultValue?: string | undefined;
disabled?: boolean | undefined;
name?: string | undefined;
value?: string | undefined;
onClick?: ((e: React.SyntheticEvent<ButtonElement, Event>) => void) | undefined;
onChange?: ((e: React.SyntheticEvent<ButtonElement, Event>) => void) | undefined;
children?: React.ReactNode;
className?: string | undefined;
tabIndex?: number | undefined;
} & {
children?: React.ReactNode;
} & React.RefAttributes<ButtonElement>>>;

1

dist/src/component.d.ts

@@ -17,3 +17,2 @@ import { Size, Radius } from '@pap-it/system-utils';

color: ButtonColorVariant;
constructor();
connectedCallback(): void;

@@ -20,0 +19,0 @@ disconnectedCallback(): void;

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

"use strict";import{__decorate as e}from"tslib";import{property as t}from"@pap-it/system-utils";import{FormElement as i}from"@pap-it/templates-form-element";import"@pap-it/templates-prefix-suffix/wc";import{style as o}from"./style.js";export class Button extends i{constructor(){super(),this.type="button",this.size="medium",this.radius="circular",this.circle=!1,this.loading=!1,this.textvariant="B1",this.mode="hug",this.variant="filled",this.color="primary",this.handlekeyup=r=>{(r.key||r.code).toLowerCase()==="enter"&&this.hasFocus&&this.dispatchEvent(new Event("click"))},this.handleclick=()=>{this.href?window.location.href=this.href:this._internals.form&&(this.type==="submit"?this._internals.form.requestSubmit():this.type==="reset"&&this._internals.form.reset())},this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleclick,!0),window.addEventListener("keyup",this.handlekeyup),this.role="button"}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keyup",this.handlekeyup)}render(){return`
"use strict";import{__decorate as e}from"tslib";import{property as t}from"@pap-it/system-utils";import{FormElement as i}from"@pap-it/templates-form-element";import"@pap-it/templates-prefix-suffix/wc";import{style as o}from"./style.js";export class Button extends i{constructor(){super(...arguments),this.type="button",this.size="medium",this.radius="circular",this.circle=!1,this.loading=!1,this.textvariant="B1",this.mode="hug",this.variant="filled",this.color="primary",this.handlekeyup=r=>{(r.key||r.code).toLowerCase()==="enter"&&this.hasFocus&&this.dispatchEvent(new Event("click"))},this.handleclick=()=>{this.href?window.location.href=this.href:this._internals.form&&(this.type==="submit"?this._internals.form.requestSubmit():this.type==="reset"&&this._internals.form.reset())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleclick,!0),this.tabIndex=0,window.addEventListener("keyup",this.handlekeyup),this.role="button"}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keyup",this.handlekeyup)}render(){return`
<pap-prefix-suffix-template part="prefix-suffix">

@@ -3,0 +3,0 @@ <slot slot="prefix" name="prefix"></slot>

{
"name": "@pap-it/button",
"version": "1.0.15",
"version": "1.0.16",
"scripts": {

@@ -45,9 +45,9 @@ "init": "sh .scripts/init.sh",

"@pap-it/system-react": "0.0.7",
"@pap-it/templates-box": "1.0.15",
"@pap-it/templates-box": "1.0.16",
"@pap-it/templates-form-element": "1.0.15",
"@pap-it/templates-prefix-suffix": "1.0.15"
"@pap-it/templates-prefix-suffix": "1.0.16"
},
"devDependencies": {
"@babel/eslint-parser": "^7.23.3",
"@pap-it/system-doc": "1.0.20",
"@pap-it/system-doc": "1.0.21",
"esbuild": "^0.17.18",

@@ -54,0 +54,0 @@ "eslint": "^8.53.0",

@@ -5,5 +5,6 @@ # Button

Version: Version: Version: 1.0.15
Version: Version: Version: 1.0.16
## Development

@@ -10,0 +11,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