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

@patternfly/pfe-button

Package Overview
Dependencies
Maintainers
16
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-button - npm Package Compare versions

Comparing version 1.12.3 to 2.0.0-next.0

custom-elements.json

107

package.json
{
"name": "@patternfly/pfe-button",
"license": "MIT",
"version": "2.0.0-next.0",
"description": "Button element for PatternFly Elements",
"pfelement": {
"className": "PfeButton",
"elementName": "pfe-button",
"files": {
"styles": "./src/pfe-button.scss",
"template": "./src/pfe-button.html",
"js": "./src/pfe-button.js"
"customElements": "custom-elements.json",
"type": "module",
"main": "./pfe-button.js",
"module": "./pfe-button.js",
"types": "./pfe-button.d.ts",
"exports": {
".": {
"esbuild": "./pfe-button.ts",
"default": "./pfe-button.js"
},
"assets": [],
"preview": "button.svg"
"./*": {
"esbuild": "./*.ts",
"default": "./*.js"
}
},
"version": "1.12.3",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"⚙️-----UTIL-------⚙️": "❓ Manages the repo",
"clean": "git clean -fX -e node_modules -e tsconfig.tsbuildinfo",
"🚚-----DIST-------🚚": "❓ Publish packages",
"prepublishOnly": "npm run build",
"👷‍♀️-----BUILD------👷‍♀️": "❓ Prepare dist artifacts",
"analyze": "cem analyze",
"build": "run-s build:*",
"build:clean": "npm run clean",
"build:esbuild": "node ../../scripts/build.js --include pfe-button",
"build:analyze": "npm run analyze",
"build:types": "tsc -b .",
"🧑‍🔬-----TEST-------🧑‍🔬": "❓ Test packages",
"test": "wtr --files './test/*.spec.ts' --config ../../web-test-runner.config.js",
"👷‍♀️-----DEV--------👷‍♀️": "❓ Development aids",
"test:watch": "npm test -- --watch",
"watch:analyze": "npm run analyze -- --watch",
"watch:types": "tsc -w"
},
"keywords": [
"web-components",
"button",
"html"

@@ -25,46 +54,28 @@ ],

},
"browserslist": [
"last 2 versions",
"Firefox >= 78",
"iOS >= 8",
"ie 11"
],
"publishConfig": {
"access": "public"
"bugs": {
"url": "https://github.com/patternfly/patternfly-elements/issues"
},
"main": "./dist/pfe-button.umd.js",
"module": "./dist/pfe-button.js",
"unpkg": "./dist/pfe-button.umd.min.js",
"files": [
"dist"
"!*.ts",
"custom-elements.json",
"**/*.LEGAL.txt",
"**/*.css",
"**/*.d.ts",
"**/*.js",
"**/*.js.map",
"!custom-elements-manifest.config.js",
"!demo/*",
"!docs/*",
"!test/*"
],
"scripts": {
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}'",
"dev": "../../node_modules/.bin/gulp dev",
"watch": "../../node_modules/.bin/gulp watch",
"test": "../../node_modules/.bin/wct --configFile ../../wct.conf.json elements/pfe-button/test/"
},
"contributors": [
{
"name": "Kyle Buchanan"
},
{
"name": "Ivana Rodriguez",
"url": "https://github.com/eyevana"
},
{
"name": "Wes Ruvalcaba"
}
"Kyle Buchanan",
"Ivana Rodriguez (https://github.com/eyevana)",
"Wes Ruvalcaba",
"Benny Powers <bennyp@redhat.com>"
],
"license": "MIT",
"devDependencies": {
"@patternfly/pfe-sass": "^1.12.3"
},
"dependencies": {
"@patternfly/pfelement": "^1.12.3"
},
"bugs": {
"url": "https://github.com/patternfly/patternfly-elements/issues"
},
"gitHead": "8cad71b1de7cb39aa77372fa8ae228b813e700c5"
"@patternfly/pfe-core": "^2.0.0-next.0",
"lit": "^2.1.2"
}
}

@@ -1,8 +0,31 @@

# PatternFly Element | Button Element
This component is a web component wrapper around a standard HTML Button Element.
# PatternFly Elements Button
`<pfe-button>` is a web component wrapper around a standard HTML `<button>` element.
`<pfe-button>` is heavily influenced by the findings in this post: [Custom
elements, shadow DOM and implicit form submission](https://www.hjorthhansen.dev/shadow-dom-and-forms/). You can expect `<pfe-button>` to work like a normal
HTML Button Element.
elements, shadow DOM and implicit form submission](https://www.hjorthhansen.dev/shadow-dom-and-forms/). You can expect `<pfe-button>` to work like a normal `HTMLButtonElement`.
Read more about Button in the [PatternFly Elements Button documentation](https://patternflyelements.org/components/button)
## Installation
Load `<pfe-button>` via CDN:
```html
<script src="https://unpkg.com/@patternfly/pfe-button?module"></script>
```
Or, if you are using [NPM](https://npm.im), install it
```bash
npm install @patternfly/pfe-button
```
Then once installed, import it to your application:
```js
import '@patternfly/pfe-button';
```
## Usage
When using this component, you must provide a standard HTML Button Elements as

@@ -17,10 +40,2 @@ the only light DOM child of `pfe-button`.

### Size
```html
<pfe-button size="large">
<button>Large Button</button>
</pfe-button>
```
### Accessibility

@@ -69,49 +84,1 @@ `<pfe-button>` addresses the issues associated with typical implementations of

## Slots
None
## Attributes
`disabled` (observed): Disables the button
`variant`: Changes the style of the button. Possible values are
- primary (default)
- secondary
- tertiary
- danger
- control
`size`: Changes the size of the button.
- medium (default)
- large
## Events
### pfe-button:click
This event is fired when `<pfe-button>` is clicked and serves as a way to
capture click events if necessary.
## Dev
`npm start`
## Test
`npm run test`
## Build
`npm run build`
## Demo
From the PFElements root directory, run:
`npm run demo`
## Code style
Button (and all PFElements) use [Prettier][prettier] to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can [integrate your editor][prettier-ed] with Prettier to have the style rules applied on every save.
[prettier]: https://github.com/prettier/prettier/
[prettier-ed]: https://prettier.io/docs/en/editors.html
[web-component-tester]: https://github.com/Polymer/web-component-tester
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