|
1 |
| -# Lion |
| 1 | +> ## 🛠 Status: Pilot Phase |
| 2 | +> Lion Web Components are still in an early alpha stage; they should not be considered production ready yet. |
| 3 | +> |
| 4 | +> The goal of our pilot phase is to gather feedback from a private group of users. |
| 5 | +> Therefore, during this phase, we kindly ask you to: |
| 6 | +> - not publicly promote or link us yet: (no tweets, blog posts or other forms of communication about Lion Web Components) |
| 7 | +> - not publicly promote or link products derived from/based on Lion Web Components |
| 8 | +> |
| 9 | +> 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) |
2 | 10 |
|
3 |
| -I'm afraid a little more patience is needed. |
| 11 | +# Lion Web Components |
4 | 12 |
|
5 |
| -See you soon :) |
| 13 | +Lion web components is a set of highly performant, accessible and flexible Web Components. |
| 14 | +They provide an unopinionated, white label layer that can be extended to your own layer of components. |
| 15 | + |
| 16 | +## How to install |
| 17 | + |
| 18 | +```bash |
| 19 | +npm i @lion/<package-name> |
| 20 | +``` |
| 21 | + |
| 22 | +## Content |
| 23 | + |
| 24 | +| Package | Version | Description | |
| 25 | +| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | |
| 26 | +| **-- [Forms](./docs/forms.md) --** | | | |
| 27 | +| [checkbox](./packages/checkbox) | [](https://www.npmjs.com/package/@lion/checkbox) | Checkbox form element | |
| 28 | +| [checkbox-group](./packages/checkbox-group) | [](https://www.npmjs.com/package/@lion/checkbox-group) | Group of checkboxes | |
| 29 | +| [field](./packages/field) | [](https://www.npmjs.com/package/@lion/field) | Base Class for all inputs | |
| 30 | +| [form](./packages/form) | [](https://www.npmjs.com/package/@lion/form) | Wrapper for multiple form elements | |
| 31 | +| [input](./packages/input) | [](https://www.npmjs.com/package/@lion/input) | Input element for strings | |
| 32 | +| [input-amount](./packages/input-amount) | [](https://www.npmjs.com/package/@lion/input-amount) | Input element for amounts | |
| 33 | +| [input-date](./packages/input-date) | [](https://www.npmjs.com/package/@lion/input-date) | Input element for dates | |
| 34 | +| [input-email](./packages/input-email) | [](https://www.npmjs.com/package/@lion/input-email) | Input element for e-mails | |
| 35 | +| [input-iban](./packages/input-iban) | [](https://www.npmjs.com/package/@lion/input-iban) | Input element for IBANs | |
| 36 | +| [radio](./packages/radio) | [](https://www.npmjs.com/package/@lion/radio) | Radio from element | |
| 37 | +| [radio-group](./packages/radio-group) | [](https://www.npmjs.com/package/@lion/radio-group) | Group of radios | |
| 38 | +| [select](./packages/select) | [](https://www.npmjs.com/package/@lion/select) | Simple native dropdown element | |
| 39 | +| [textarea](./packages/textarea) | [](https://www.npmjs.com/package/@lion/textarea) | Multiline text input | |
| 40 | +| [validate](./packages/validate) | [](https://www.npmjs.com/package/@lion/validate) | Validation for form components | |
| 41 | +| **-- [Icons](./packages/icon) --** | | | |
| 42 | +| [icon](./packages/icon) | [](https://www.npmjs.com/package/@lion/icon) | Display our svg icons | |
| 43 | +| **-- [Localize](./packages/localize) --** | | | |
| 44 | +| [localize](./packages/localize) | [](https://www.npmjs.com/package/@lion/localize) | Localize and translate your application/components | |
| 45 | +| **-- [Overlays](./docs/overlays.md) --** | | | |
| 46 | +| [overlays](./packages/overlays) | [](https://www.npmjs.com/package/@lion/overlays) | Overlays System using lit-html for rendering | |
| 47 | +| [popup](./packages/popup) | [](https://www.npmjs.com/package/@lion/popup) | Popup element | |
| 48 | +| [tooltip](./packages/tooltip) | [](https://www.npmjs.com/package/@lion/tooltip) | Popup element | |
| 49 | +| **-- [Steps](./packages/steps) --** | | | |
| 50 | +| [steps](./packages/steps) | [](https://www.npmjs.com/package/@lion/steps) | Multi Step System | |
| 51 | +| **-- Individual Packages --** | | | |
| 52 | +| [ajax](./packages/ajax) | [](https://www.npmjs.com/package/@lion/ajax) | Fetching data via ajax request | |
| 53 | +| [button](./packages/button) | [](https://www.npmjs.com/package/@lion/button) | Button | |
| 54 | + |
| 55 | +## How to use |
| 56 | + |
| 57 | +### Use a Web Component |
| 58 | + |
| 59 | +```html |
| 60 | +<script type="module"> |
| 61 | + import '@lion/input/lion-input.js'; |
| 62 | +</script> |
| 63 | + |
| 64 | +<lion-input name="firstName"></lion-input> |
| 65 | +``` |
| 66 | + |
| 67 | +### Use a JavaScript system |
| 68 | + |
| 69 | +```html |
| 70 | +<script type="module"> |
| 71 | + import { ajax } from '@lion/ajax'; |
| 72 | +
|
| 73 | + ajax.get('data.json').then(response => { |
| 74 | + // most likely you will use response.data |
| 75 | + }); |
| 76 | +</script> |
| 77 | +``` |
| 78 | + |
| 79 | +### Extend a Web Component |
| 80 | + |
| 81 | +```js |
| 82 | +import { LionInput } from '@lion/input'; |
| 83 | + |
| 84 | +class MyInput extends LionInput {} |
| 85 | +customElements.define('my-input', MyInput); |
| 86 | +``` |
| 87 | + |
| 88 | +## Key Features |
| 89 | + |
| 90 | +- High Performance - Focused on great performance in all relevant browsers with a minimal number of dependencies |
| 91 | +- Accessibility - Aimed at compliance with the WCAG 2.0 AA standard to create components that are accessible for everybody |
| 92 | +- Flexibility - Provides solutions through Web Components and JavaScript classes which can be used, adopted and extended to fit all needs |
| 93 | + |
| 94 | +## Technologies |
| 95 | + |
| 96 | +Lion Web Components aims to be future proof and use well-supported proven technology. The stack we have chosen should reflect this. |
| 97 | + |
| 98 | +- [lit-html](https://lit-html.polymer-project.org) and [lit-element](https://lit-element.polymer-project.org) |
| 99 | +- [npm](http://npmjs.com) |
| 100 | +- [yarn](https://yarnpkg.com) |
| 101 | +- [open-wc](https://open-wc.org) |
| 102 | +- [webpack](https://webpack.js.org) |
| 103 | +- [Karma](https://karma-runner.github.io) |
| 104 | +- [Mocha](https://mochajs.org) |
| 105 | +- [Chai](https://www.chaijs.com) |
| 106 | +- [ESLint](https://eslint.org) |
| 107 | +- [prettier](https://prettier.io) |
| 108 | +- [Storybook](https://storybook.js.org) |
| 109 | +- [ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) |
| 110 | +- Lots and lots of tests |
| 111 | + |
| 112 | +## Rationale |
| 113 | + |
| 114 | +We know from experience that making high quality, accessible UI components is hard and time consuming: |
| 115 | +it takes many iterations, a lot of development time and a lot of testing to get a generic component that works in every |
| 116 | +context, supports many edge cases and is accessible in all relevant screen readers. |
| 117 | + |
| 118 | +Lion aims to do the heavy lifting for you. |
| 119 | +This means you only have to apply your own Design System: by delivering styles, configuring components and adding a minimal set of custom logic on top. |
| 120 | + |
| 121 | +## How to contribute |
| 122 | + |
| 123 | +Lion Web Components are only as good as its contributions. |
| 124 | +Read our [contribution guide](./CONTRIBUTING.md) and feel free to enhance/improve our product . |
| 125 | + |
| 126 | +## Support and issues |
| 127 | + |
| 128 | +As stated above "support and issues time" is currently rather limited: feel free to open a discussion. |
| 129 | +However, we can not guarantee any response times. |
0 commit comments