ing-bank/lion - Fundamental white label web component features for your design system. https://github.com/ing-bank/lion
Find a file
gerjanvangeest 35b600a64b Update packages/ui/components/select-rich/test/lion-select-rich-interaction.test.js
Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>
2025-01-30 16:14:11 +01:00
.changeset fix(select-rich): allow arrowLeft and arrowRight to change the value when navigateWithinInvoker is true and dropdown is closed 2025-01-30 16:14:11 +01:00
.github chore: fix playwright in ci 2025-01-13 15:33:28 +01:00
.husky chore: remove husky warning 2025-01-07 09:39:29 +01:00
.vscode chore: use prettier on typescript files as well 2025-01-07 09:39:29 +01:00
bundlesize feat: move all web pkgs into a single npm pkg @lion/ui 2022-10-31 11:15:03 +01:00
docs chore: update documentation for better extending 2025-01-21 10:41:00 +01:00
packages Update packages/ui/components/select-rich/test/lion-select-rich-interaction.test.js 2025-01-30 16:14:11 +01:00
packages-node chore: allow build to proceed 2025-01-30 15:53:09 +01:00
patches chore: better Rocket DX (no endless refresh loops, but manual refresh) 2024-11-21 12:51:57 +01:00
screenshots test(calendar): add visual regression tests 2020-10-12 09:42:34 +02:00
scripts chore: make readme logo absolute path (#2340) 2024-08-26 09:37:26 +02:00
.editorconfig feat(providence): improve dashboard 2021-11-16 14:45:16 +01:00
.eleventyignore chore: better Rocket DX (no endless refresh loops, but manual refresh) 2024-11-21 12:51:57 +01:00
.eslintignore chore: introduce a component src folder 2022-10-31 16:55:07 +01:00
.eslintrc.cjs fix: tests for keyboard typing (#2371) 2024-10-14 16:03:13 +02:00
.gitignore chore: enable ./vscode in .gitignore 2025-01-07 09:39:29 +01:00
.lintstagedrc.js fix: run correct lock-scan file type (#2342) 2024-08-22 09:21:58 +02:00
.markdownlint.json fix: improve docs and examples for accordion & switch 2021-07-07 18:34:21 +02:00
.npmrc chore: make default public npm registry explicit 2023-05-09 18:32:42 +02:00
.nvmrc Revert "Update various github actions and node versions (#2251)" 2024-04-18 14:10:33 +02:00
.prettierignore feat(select-rich): export getSelectRichMembers test helper 2024-04-03 09:20:19 +02:00
CONTRIBUTING.md feat: move repo to npm workspaces 2022-10-20 10:20:12 +02:00
LICENSE feat: release inital public lion version 2019-04-26 10:37:57 +02:00
netlify.toml chore: improve security 2021-11-11 14:21:13 +01:00
package-lock.json feat(providence): update version of oxc; cleanup; include .ts(x) and jsx by default 2025-01-15 10:37:36 +01:00
package.json chore: cleanup wtr config, add pkg script for running w/o polyfill 2024-11-12 16:21:36 +01:00
README.md chore: update portal url 2024-10-29 12:15:39 +01:00
rocket.config.mjs chore: add api tables to all components (#2297) 2024-06-10 15:30:20 +02:00
tsconfig.json fix: revert es version in tsconfig (as it was breaking types) 2024-11-05 17:02:03 +01:00
vscode.css-custom-data.json feat(ui): adopt @open-wc/scoped-elements mixin v3 2024-03-27 18:02:15 +01:00
vscode.html-custom-data.json feat(ui): adopt @open-wc/scoped-elements mixin v3 2024-03-27 18:02:15 +01:00
web-test-runner-browserstack.config.js chore: camelCase linting for properties 2023-02-08 20:22:26 +01:00
web-test-runner-chrome.config.mjs chore: enable webkit tests 2020-10-27 14:05:32 +01:00
web-test-runner-firefox.config.mjs chore: enable webkit tests 2020-10-27 14:05:32 +01:00
web-test-runner-webkit.config.mjs chore: enable webkit tests 2020-10-27 14:05:32 +01:00
web-test-runner.config.mjs chore: clean test logs 2025-01-07 09:39:29 +01:00

Lion

Lion

Lion open issues status GitHub open pull requests status Todos

Website · Fundamentals · Guides · Components · Blog

Lion 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.

  • High Performance: Focused on great performance in all relevant browsers with a minimal number of dependencies.
  • Accessibility: Aimed at compliance with the WCAG 2.2 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.
  • Modern Code: Lion is distributes as pure es modules.
  • Exposes functions/classes and Web Components: Ships a functionality in it's most appropriate form.

Note: Our demo examples might look simple and not very stylish. This is on purpose. They are designed to be basic so you can easily add your own styles to them to match your intended design, without dealing with styles that are already there.

Explore the Lion Guides  ▶

How to install

npm i @lion/ui

How to use

Extend a Web Component

This is the main use case for lion. To import component classes, and extend them for your own design system's components.

import { css } from 'lit';
import { LionInput } from '@lion/ui/input.js';

class MyInput extends LionInput {
  static get styles() {
    return [
      super.styles,
      css`
        /* your styles here */
      `,
    ];
  }
}
customElements.define('my-input', MyInput);

Use a JavaScript system

There's a couple of "systems" in lion which have a JavaScript API. Examples are localize, overlays, ajax, etc.

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

  ajax
    .fetch('data.json')
    .then(response => response.json())
    .then(data => {
      // do something with the data
    });
</script>

Use a Web Component

You can also use the lion elements directly, although this is likely not a common use case.

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

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

Issues

If you encounter an issue with any of the packages we are offering please open a new bug issue. Be sure to include a description of the expected and the current behavior - additional adding a reproduction always helps.

Feature requests

When you have an idea on how we could improve, please check our discussions to see if there are similar ideas or feature requests. If there are none, please start your feature request as a new discussion topic. Add the title [Feature Request] My awesome feature and a description of what you expect from the improvement and what the use case is.

Content

Name version description
@lion/ui @lion/ui version Set of components
@lion/ajax @lion/ajax version A small wrapper around fetch
Singleton-manager Singleton-manager version A singleton manager provides a way to make sure a singleton instance loaded from multiple file locations stays a singleton. Primarily useful if two major version of a package with a singleton is used.
Babel plugin extend docs babel-plugin-extend-docs version A plugin which rewrites imports and templates according to a configuration. This enables the reuse of existing documentation from source packages while still using your extensions code.
Providence analytics providence-analytics version Providence is the 'All Seeing Eye' that generates usage statistics by analyzing code. It measures the effectivity and popularity of your software. With just a few commands you can measure the impact for (breaking) changes, making your release process more stable and predictable.
Publish docs publish-docs version A tool that copies and processes your documentation (in a monorepo) so it can be published/shipped with your package.
Remark extend remark-extend version A plugin for remark to extend markdown by importing from source files.
Rocket preset extend lion docs rocket-preset-extend-lion-docs version When maintaining your own extension layer of lion you most likely want to maintain a similar documentation. Copying and rewriting the markdown files works, but whenever something changes you need copy and rewrite again. To do this automatically you can use this preset for rocket.

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

Please note: This project uses Npm Workspaces. If you want to run all demos locally you need to get at least npm 7+ and install all dependencies by executing npm install.

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.