New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@things-factory/component-ui

Package Overview
Dependencies
Maintainers
7
Versions
525
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@things-factory/component-ui - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

84

component/form/form-master.js
import { LitElement, html, css } from 'lit-element'
import * as FormSerialize from 'form-serialize'
class FormMaster extends LitElement {
static get styles() {
return css``
return css`
form {
padding: 30px;
}
input {
border: solid 1px #32526a;
width: 100%;
padding-bottom: 10px;
}
::placeholder {
font-size: 0.8rem;
}
`
}

@@ -13,48 +27,17 @@ static get properties() {

constructor() {
super()
this.input = [
{
name: 'name',
type: 'text',
required: true,
length: 10
},
{
name: 'email',
type: 'email',
required: true
},
{
name: 'password',
type: 'password',
readonly: true
},
{
name: 'age',
type: 'number',
min: 1,
max: 100
},
{
name: 'phone number',
type: 'number'
},
{
name: 'address',
type: 'text'
},
{
name: 'url',
type: 'url',
disabled: true
}
]
}
render() {
return html`
<form>
${this.input.map(i => {
html`
<form
@submit="${e => {
this.dispatchEvent(
new CustomEvent('submit', {
detail: {
data: this.serialize()
}
})
)
}}"
>
${(this.input || []).map(i => {
return html`
<input

@@ -76,4 +59,15 @@ name="${i.name}"

}
checkValidity() {
const form = document.querySelector('form')
return form.checkValidity()
}
serialize() {
//transform data into json
const form = document.querySelector('form')
return (data = FormSerialize(form))
}
}
window.customElements.define('form-master', FormMaster)
{
"name": "@things-factory/component-ui",
"version": "0.0.17",
"version": "0.0.18",
"main": "index.js",

@@ -9,2 +9,3 @@ "license": "MIT",

"dependencies": {
"form-serialize": "*",
"lit-element": "^2.1.0"

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