From 2de378391c928dd7185c469dc990d275c53b73ca Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Wed, 24 Jul 2019 15:05:12 +0200 Subject: [PATCH] chore: fix style of markdown files --- CONTRIBUTING.md | 12 +- README.md | 6 +- packages/ajax/README.md | 36 ++-- packages/button/README.md | 4 +- packages/checkbox-group/README.md | 4 +- packages/checkbox/README.md | 6 +- packages/core/README.md | 2 +- packages/field/README.md | 5 +- packages/field/docs/CustomFieldsTutorial.md | 19 +- packages/field/docs/FormFundaments.md | 2 + packages/field/docs/FormatMixin.md | 27 ++- packages/field/docs/FormattingAndParsing.md | 8 +- packages/field/docs/InteractionStates.md | 14 +- packages/field/docs/modelValue.md | 11 +- packages/fieldset/README.md | 2 +- packages/form-system/README.md | 1 + packages/form/README.md | 20 ++- packages/icon/README.md | 7 +- packages/input-amount/README.md | 4 +- packages/input-date/README.md | 5 +- packages/input-datepicker/README.md | 4 +- packages/input-email/README.md | 10 +- packages/input-iban/README.md | 4 +- packages/input/README.md | 7 +- packages/localize/README.md | 164 ++++++++++-------- packages/localize/docs/amount-html.md | 6 +- packages/localize/docs/date.md | 15 +- packages/localize/docs/message.md | 48 ++--- packages/localize/docs/number.md | 12 +- packages/overlays/README.md | 5 +- .../overlays/docs/GlobalOverlayController.md | 5 +- .../overlays/docs/LocalOverlayController.md | 5 +- .../overlays/docs/LocalOverlayPositioning.md | 9 +- .../docs/OverlaySystemImplementation.md | 90 ++++++---- packages/overlays/docs/OverlaySystemScope.md | 129 +++++++------- packages/radio-group/README.md | 5 +- packages/radio/README.md | 6 +- packages/select/README.md | 10 +- packages/steps/README.md | 9 +- packages/textarea/README.md | 5 +- packages/validate/README.md | 7 +- packages/validate/docs/ValidationSystem.md | 12 +- 42 files changed, 454 insertions(+), 308 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09baa9aa9..42270324b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,10 +3,12 @@ Check out ways to contribute to Lion Web Components: ## Existing components: we love pull requests ♥ + Help out the whole lion community by sending your merge requests and issues. Check out how to set it up: Setup: + ```bash # Clone the repo: git clone https://github.com/ing-bank/lion.git @@ -20,6 +22,7 @@ git checkout -b fix/buttonSize ``` Make sure everything works as expected: + ```bash # Linting npm run lint @@ -32,7 +35,9 @@ npm run storybook ``` Create a Pull Request: -- At https://github.com/ing-bank/lion click on fork (at the right top) + +- At click on fork (at the right top) + ```bash # add fork to your remotes git remote add fork git@github.com:/lion.git @@ -40,9 +45,10 @@ git remote add fork git@github.com:/lion.git # push new branch to your fork git push -u fork fix/buttonSize ``` + - Go to your fork and create a Pull Request :) Some things that will increase the chance that your merge request is accepted: -* Write tests. -* Write a [good commit message](https://www.conventionalcommits.org/). +- Write tests. +- Write a [good commit message](https://www.conventionalcommits.org/). diff --git a/README.md b/README.md index 70c30c4e1..764335619 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Lion Web Components + > ## 🛠 Status: Pilot Phase > > Lion Web Components are still in an early alpha stage; they should not be considered production ready yet. @@ -8,9 +10,7 @@ > - not publicly promote or link us yet: (no tweets, blog posts or other forms of communication about Lion Web Components) > - not publicly promote or link products derived from/based on Lion Web Components > -> As soon as Pilot Phase ends we will let you know (feel free to subscribe to this issue https://github.com/ing-bank/lion/issues/1) - -# Lion Web Components +> As soon as Pilot Phase ends we will let you know (feel free to subscribe to this issue ) Lion web components is a set of highly performant, accessible and flexible Web Components. They provide an unopinionated, white label layer that can be extended to your own layer of components. diff --git a/packages/ajax/README.md b/packages/ajax/README.md index e347e7cd6..17d1ffd72 100644 --- a/packages/ajax/README.md +++ b/packages/ajax/README.md @@ -6,27 +6,30 @@ It is a promise based system for fetching data, based on [axios](https://github.com/axios/axios) ## Features + - only JS functions, no (unnecessarily expensive) web components - supports GET, POST, PUT, DELETE, REQUEST, PATCH and HEAD methods - can be used with or without XSRF token - ## How to use ### Installation + ```sh npm i --save @lion/ajax ``` ### Example + ```js import { ajax } from '@lion/ajax'; -ajax.get('data.json') - .then((response) => { +ajax + .get('data.json') + .then(response => { console.log(response); }) - .catch((error) => { + .catch(error => { console.log(error); }); ``` @@ -34,15 +37,17 @@ ajax.get('data.json') ### Create own instances for custom options #### Cancel + ```js import { AjaxClass } from '@lion/ajax'; const myAjax = AjaxClass.getNewInstance({ cancelable: true }); -myAjax.get('data.json') - .then((response) => { +myAjax + .get('data.json') + .then(response => { document.querySelector('#canceled').innerHTML = JSON.stringify(response.data); }) - .catch((error) => { + .catch(error => { document.querySelector('#canceled').innerHTML = `I got cancelled: ${error.message}`; }); setTimeout(() => { @@ -51,22 +56,25 @@ setTimeout(() => { ``` #### Cancel previous on new request + ```js -import { AjaxClass } from '@lion/ajax' +import { AjaxClass } from '@lion/ajax'; const myAjax = AjaxClass.getNewInstance({ cancelPreviousOnNewRequest: true }); -myAjax.get('data.json') - .then((response) => { +myAjax + .get('data.json') + .then(response => { document.querySelector('#request1').innerHTML = 'Request 1: ' + JSON.stringify(response.data); }) - .catch((error) => { + .catch(error => { document.querySelector('#request1').innerHTML = `Request 1: I got cancelled: ${error.message}`; }); -myAjax.get('data2.json') - .then((response) => { +myAjax + .get('data2.json') + .then(response => { document.querySelector('#request2').innerHTML = 'Request 2: ' + JSON.stringify(response.data); }) - .catch((error) => { + .catch(error => { document.querySelector('#request2').innerHTML = `Request 2: I got cancelled: ${error.message}`; }); ``` diff --git a/packages/button/README.md b/packages/button/README.md index ca693cc02..a19ca1bf9 100644 --- a/packages/button/README.md +++ b/packages/button/README.md @@ -7,12 +7,14 @@ ## Features ### Disabled + You can also set a button as disabled with the `disabled` property. ## How to use ### Installation -``` + +```sh npm i --save @lion/button ``` diff --git a/packages/checkbox-group/README.md b/packages/checkbox-group/README.md index a84ebb0c7..928b1e068 100644 --- a/packages/checkbox-group/README.md +++ b/packages/checkbox-group/README.md @@ -7,12 +7,14 @@ You should use [lion-checkbox](../checkbox/)'s inside this element. ## Features + Since it extends from [lion-fieldset](../fieldset/), it has all the features a fieldset has. ## How to use ### Installation -``` + +```sh npm i --save @lion/checkbox @lion/checkbox-group ``` diff --git a/packages/checkbox/README.md b/packages/checkbox/README.md index ab306e11a..afce4ff6e 100644 --- a/packages/checkbox/README.md +++ b/packages/checkbox/README.md @@ -5,6 +5,7 @@ `lion-checkbox` component is a sub-element to be used in [lion-checkbox-group](../checkbox-group/) elements. Its purpose is to provide a way for users to check **multiple** options amongst a set of choices, or to function as a single toggle. ## Features + - Get or set the checked state (boolean) - `choiceChecked()` - Get or set the value of the choice - `choiceValue()` - Pre-select an option by setting the `checked` boolean attribute @@ -12,8 +13,9 @@ ## How to use ### Installation -``` -npm i --save @lion/checkbox; + +```sh +npm i --save @lion/checkbox ``` ```js diff --git a/packages/core/README.md b/packages/core/README.md index 9e85d366a..d5b606fd7 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -28,7 +28,7 @@ The more generic the mixin is, the higher the chance of being appliend more than This is an example of how to make a conventional ES mixin deduping. -```javascript +```js const BaseMixin = dedupeMixin((superClass) => { return class extends superClass { ... }; }); diff --git a/packages/field/README.md b/packages/field/README.md index eff4c3399..7e31b2641 100644 --- a/packages/field/README.md +++ b/packages/field/README.md @@ -1,4 +1,3 @@ - # Form Fundaments [//]: # 'AUTO INSERT HEADER PREPUBLISH' @@ -34,7 +33,7 @@ On top of this, they feature: Whenever a native form control doesn't exist or is not sufficient, a [custom form field](./docs/CustomFieldsTutorial.md) should be created. One could think of components - like: +like: - slider - combobox @@ -56,9 +55,11 @@ Fieldsets are the basis for: + - [Model Value](./docs/ModelValue.md) - [Formatting and parsing](./docs/FormattingAndParsing.md) - [Interaction states](./docs/InteractionStates.md) - [Validation System](../validate/docs/ValidationSystem.md) - [Custom Fields](./docs/CustomFieldsTutorial.md) + diff --git a/packages/field/docs/CustomFieldsTutorial.md b/packages/field/docs/CustomFieldsTutorial.md index c7172d1e2..6591ab799 100644 --- a/packages/field/docs/CustomFieldsTutorial.md +++ b/packages/field/docs/CustomFieldsTutorial.md @@ -1,9 +1,11 @@ # Creating a custom field + 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](../README.md) functionality. ## Prerequisite: an interaction element + An interaction element provides the means for the end user to enter a certain value, just like native elements provide in this (think of ``, `