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

@lion/field

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/field - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.18](https://github.com/ing-bank/lion/compare/@lion/field@0.1.17...@lion/field@0.1.18) (2019-06-04)
**Note:** Version bump only for package @lion/field
## [0.1.17](https://github.com/ing-bank/lion/compare/@lion/field@0.1.16...@lion/field@0.1.17) (2019-05-31)

@@ -8,0 +16,0 @@

14

docs/CustomFieldsTutorial.md
# Creating a custom field
Custom fields can be created in just a few steps. All you need is an interaction element
Custom fields can be created in just a few steps. All you need is an interaction element
(like for instance a slider, a listbox or a combobox) and connect it to the [Field](https://github.com/ing-bank/lion/blob/master/packages/field/README.md)

@@ -7,9 +7,9 @@ functionality.

## Prerequisite: an interaction element
An interaction element provides the means for the end user to enter a certain value, just like
An interaction element provides the means for the end user to enter a certain value, just like
native elements provide in this (think of `<input>`, `<textarea>` and `<select>`).
An example of a non native element is the
An example of a non native element is the
[slider design pattern](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/#slider)
described here.
For this tutorial, we assume we have a component `<my-slider>` that exposes its value via property
For this tutorial, we assume we have a component `<my-slider>` that exposes its value via property
`mySliderValue` and sends an event `my-slider-changed` on every value change. To make it focusable,

@@ -21,3 +21,3 @@ it has a tabindex=“0” applied.

validation support and get all the other [benefits of LionField](https://github.com/ing-bank/lion/blob/master/packages/field/README.md).
We start of by creating a component `<lion-slider>` that extends from `LionField`.
We start of by creating a component `<lion-slider>` that extends from `LionField`.
Then we follow the steps below:

@@ -46,3 +46,3 @@

export class LionSlider extends LionField {
// 1. Add your interaction element as ‘input slot'
// 1. Add your interaction element as ‘input slot'
get slots() {

@@ -56,3 +56,3 @@ return {

// 2. Proxy event `my-slider-changed` to `user-input-changed` event
connectedCallback() {
connectedCallback() {
   super.connectedCallback();

@@ -59,0 +59,0 @@ this.addEventListener('my-slider-changed', this._proxyChangeEvent);

{
"name": "@lion/field",
"version": "0.1.17",
"version": "0.1.18",
"description": "Fields are the most fundamental building block of the Form System",

@@ -44,3 +44,3 @@ "author": "ing-bank",

},
"gitHead": "f39b1e06fc52e3dc27e778d650c8654ddd8e787d"
"gitHead": "e381d9fc0abd227b334b12a34451800f6fcf7ddf"
}
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