ing-bank/lion - Fundamental white label web component features for your design system. https://github.com/ing-bank/lion
Find a file
gerjanvangeest bb7fa311b5
Merge pull request #750 from ing-bank/chore/localize-storybook
chore(localize): add example to readme
2020-06-04 13:46:15 +02:00
.circleci chore: add bundlesize checks 2019-12-05 14:12:11 +01:00
.github/ISSUE_TEMPLATE chore: add issue template 2019-10-15 08:31:52 +02:00
.storybook docs: fix typos and missing documentation 2020-05-29 12:37:26 -04:00
bundlesize feat: merge field/validate/choice-input/form-group into @lion/form-core 2020-05-29 17:01:15 +02:00
demo feat: merge field/validate/choice-input/form-group into @lion/form-core 2020-05-29 17:01:15 +02:00
docs feat: use markdown javascript (mdjs) for documentation 2020-05-29 17:01:15 +02:00
packages chore(localize): add example to readme 2020-06-04 13:41:57 +02:00
scripts feat: use singleton manager to support nested npm installations 2020-05-18 15:25:21 +02:00
.editorconfig chore: announcement blog 2020-02-12 18:22:57 +01:00
.eslintignore feat: merge field/validate/choice-input/form-group into @lion/form-core 2020-05-29 17:01:15 +02:00
.eslintrc.js fix: remove all stories folders from npm 2020-06-03 11:24:56 +02:00
.gitignore feat: manager to support single instances with nested npm installations 2020-05-18 15:25:21 +02:00
.markdownlint.json feat: use markdown javascript (mdjs) for documentation 2020-05-29 17:01:15 +02:00
.prettierignore chore: add bundlesize checks 2019-12-05 14:12:11 +01:00
commitlint.config.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
CONTRIBUTING.md fix(datepicker): selection of dates outside of min/max range is permitted (#681) 2020-04-29 10:05:06 +02:00
es-dev-server.config.js feat: use markdown javascript (mdjs) for documentation 2020-05-29 17:01:15 +02:00
husky.config.js fix: improve yarn lock scan, always run 2020-01-09 16:36:06 +01:00
karma.bs.config.js chore: enable circleci 2019-04-26 14:06:15 +02:00
karma.conf.js feat(helpers): add handling duplicate consecutive logs to action logger 2020-01-17 16:34:52 +01:00
lerna.json chore: mdx changes should not trigger releases 2020-02-10 14:02:27 +01:00
LICENSE feat: release inital public lion version 2019-04-26 10:37:57 +02:00
package.json feat: use markdown javascript (mdjs) for documentation 2020-05-29 17:01:15 +02:00
README.md chore: remove field in some places 2020-06-03 13:57:59 +02:00
wallaby.js chore: update linting 2019-08-21 11:30:51 +02:00
yarn.lock fix(overlays): change dropdownConfig inheritsReferenceWidth to min 2020-06-02 08:43:11 +02:00

Lion Web Components

export default {
  title: 'Intro/Lion Web Components',
};

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.

For some more details see the announcement blog post.

TODOs

Demos

We do have a live Storybook which shows all our components.

Please note: This project uses Yarn Workspaces. If you want to run all demos locally you need to get Yarn and install all dependencies by executing yarn install.

Features

  • pure es modules
  • exposes functions/classes and web components
  • provides pure functionality
  • fully accessible
  • built to be extended

Note: These demos may look a little bland but that is on purpose. They only come with functional stylings. This makes sense as the main use case is to extend those components and if you do you do not want to override existing stylings.

Systems

Lion web components is logically organized in groups of systems.

System Description
Forms A system that lets you make complex forms with ease. Add validation, translations and use a wide range of pre made form controls.
Buttons Every application needs buttons to allow interactions. These web components bring common UX patterns while still full integrated with (native) forms.
Overlays If something needs to overlay content this is your place. Dialogs, Tooltips and a full overlay system to build more if needed
Navigation Components which are used to guide users
Localize Localize text, numbers, dates and a way to store/fetch these data within web components
Icons Loading and displaying icons
Others Features not fitting any other category
Helpers Helpers to make your and your life easier

How to install

npm i @lion/<package-name>

Content

The accessibility column indicates whether the functionality is accessible in its core. Aspects like styling and content determine actual accessibility in usage.

Package Version Description Accessibility
-- Forms -- ✔️
form form Wrapper for multiple form elements ✔️
form-core form-core Core functionality for all form controls ✔️
form-integrations form-integrations Shows form elements in an integrated way ✔️
fieldset fieldset Group for form inputs ✔️
checkbox-group checkbox-group Group of checkboxes ✔️
input input Input element for strings ✔️
input-amount input-amount Input element for amounts ✔️
input-date input-date Input element for dates ✔️
input-datepicker input-datepicker Input element for dates with a datepicker ✔️
input-email input-email Input element for e-mails ✔️
input-iban input-iban Input element for IBANs ✔️
input-range input-range Input element for a range of values ✔️
radio-group radio-group Group of radios ✔️
select select Simple native dropdown element ✔️
select-rich select-rich 'rich' version of the native dropdown element ✔️
textarea textarea Multiline text input ✔️
-- Buttons --
button button Button ✔️
switch switch Switch ✔️
-- Overlays --
overlays overlays Overlay System ✔️
dialog dialog Dialog element ✔️
tooltip tooltip Tooltip element #175
-- Icons --
icon icon Display our svg icons #173, #172
-- Navigation --
steps steps Multi Step System n/a
tabs tBS Move between a small number of equally important views n/a
-- Others --
core core Core System (exports LitElement, lit-html) n/a
localize localize Localize and translate your application/components n/a
ajax ajax Fetching data via ajax request n/a
calendar calendar Standalone calendar #195, #194

How to use

Use a Web Component

<script type="module">
  import '@lion/input/lion-input.js';
</script>

<lion-input name="firstName"></lion-input>

Use a JavaScript system

<script type="module">
  import { ajax } from '@lion/ajax';

  ajax.get('data.json').then(response => {
    // most likely you will use response.data
  });
</script>

Extend a Web Component

import { LionInput } from '@lion/input';

class MyInput extends LionInput {}
customElements.define('my-input', MyInput);

Key Features

  • High Performance - Focused on great performance in all relevant browsers with a minimal number of dependencies
  • Accessibility - Aimed at compliance with the WCAG 2.0 AA standard to create components that are accessible for everybody
  • Flexibility - Provides solutions through Web Components and JavaScript classes which can be used, adopted and extended to fit all needs

Technologies

Lion Web Components aims to be future proof and use well-supported proven technology. The stack we have chosen should reflect this.

Rationale

We know from experience that making high quality, accessible UI components is hard and time consuming: it takes many iterations, a lot of development time and a lot of testing to get a generic component that works in every context, supports many edge cases and is accessible in all relevant screen readers.

Lion aims to do the heavy lifting for you. 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.

Coding guidelines

Check out our coding guidelines for more detailed information.

How to contribute

Lion Web Components are only as good as its contributions. Read our contribution guide and feel free to enhance/improve Lion. We keep feature requests closed while we're not working on them.

Contact

Feel free to create a github issue for any feedback or questions you might have. You can also find us on the Polymer slack in the #lion channel.

You can join the Polymer slack by visiting https://www.polymer-project.org/slack-invite.