chore: updated dep versions and made compatible

This commit is contained in:
Thijs Louisse 2020-05-25 16:43:45 +02:00 committed by Thomas Allmer
parent bcd074d1fb
commit 6b1698f90f
33 changed files with 91 additions and 81 deletions

View file

@ -0,0 +1,27 @@
<style>
/**
* Temp approach for showing local overlays that flow out of their container
* Ideally, this would be configurable in Preview:
* https://github.com/storybookjs/storybook/blob/next/lib/components/src/blocks/Preview.ts
*/
.sbdocs.sbdocs-preview {
overflow: initial;
position: relative;
z-index: unset;
}
.sbdocs.sbdocs-preview>div:first-child {
z-index: 1;
}
.sbdocs.sbdocs-preview>div>div {
overflow: initial;
z-index: unset;
}
.sbdocs.sbdocs-preview>div>div [scale='1'] {
z-index: 1;
transform: none;
}
</style>

View file

@ -27,7 +27,7 @@ export default {
### Installation ### Installation
```sh ```bash
npm i --save @lion/ajax npm i --save @lion/ajax
``` ```

View file

@ -33,7 +33,7 @@ export const main = () => html` <lion-button>Default</lion-button> `;
### Installation ### Installation
```sh ```bash
npm i --save @lion/button npm i --save @lion/button
``` ```

View file

@ -54,7 +54,7 @@ export const main = () => {
### Installation ### Installation
```sh ```bash
npm i --save @lion/calendar npm i --save @lion/calendar
``` ```

View file

@ -44,7 +44,7 @@ Since it extends from [lion-fieldset](?path=/docs/forms-fieldset-overview--page)
### Installation ### Installation
```sh ```bash
npm i --save @lion/checkbox-group npm i --save @lion/checkbox-group
``` ```

View file

@ -34,7 +34,7 @@ import { LitElement, html, render } from '@lion/core';
### Installation ### Installation
```sh ```bash
npm i --save @lion/core npm i --save @lion/core
``` ```

View file

@ -1,8 +1,5 @@
<<<<<<< HEAD
=======
[//]: # 'AUTO INSERT HEADER PREPUBLISH' [//]: # 'AUTO INSERT HEADER PREPUBLISH'
>>>>>>> feat: use markdown javascript (mdjs) for documentation
# Dialog # Dialog
`lion-dialog` is a component wrapping a modal dialog controller. `lion-dialog` is a component wrapping a modal dialog controller.
@ -53,7 +50,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/dialog npm i --save @lion/dialog
``` ```

View file

@ -50,7 +50,7 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
### Installation ### Installation
```sh ```bash
npm i --save @lion/fieldset npm i --save @lion/fieldset
``` ```

View file

@ -44,7 +44,7 @@ For more information about fields that are designed for lion-form, please read
### Installation ### Installation
```sh ```bash
npm i --save @lion/form npm i --save @lion/form
``` ```

View file

@ -43,7 +43,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/icon npm i --save @lion/icon
``` ```

View file

@ -50,7 +50,7 @@ export const main = () => {
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-amount npm i --save @lion/input-amount
``` ```

View file

@ -39,7 +39,7 @@ export const main = () => html` <lion-input-date label="Date"></lion-input-date>
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-date npm i --save @lion/input-date
``` ```

View file

@ -21,9 +21,7 @@ loadDefaultFeedbackMessages();
```js preview-story ```js preview-story
export const main = () => { export const main = () => {
return html` return html` <lion-input-datepicker label="Date" name="date"></lion-input-datepicker> `;
<lion-input-datepicker label="Date" name="date"></lion-input-datepicker>
`;
}; };
``` ```
@ -49,7 +47,7 @@ export const main = () => {
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-datepicker npm i --save @lion/input-datepicker
``` ```

View file

@ -34,7 +34,7 @@ export const main = () => {
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-email npm i --save @lion/input-email
``` ```

View file

@ -43,7 +43,7 @@ export const main = () => {
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-amount npm i --save @lion/input-amount
``` ```

View file

@ -35,7 +35,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/input-range npm i --save @lion/input-range
``` ```

View file

@ -41,7 +41,7 @@ export const main = () => html` <lion-input label="First Name"></lion-input> `;
### Installation ### Installation
```sh ```bash
npm i --save @lion/input npm i --save @lion/input
``` ```

View file

@ -35,7 +35,7 @@ Further examples can be seen at [Features Overview Demo](?path=/docs/localize-fe
### Installation ### Installation
```sh ```bash
npm i --save @lion/localize npm i --save @lion/localize
``` ```

View file

@ -11,7 +11,7 @@ The amount formatter returns a number based on the locale by using [Intl NumberF
### Installation ### Installation
```sh ```bash
npm i --save @lion/localize npm i --save @lion/localize
``` ```

View file

@ -12,7 +12,7 @@ The date formatter returns a date based on the locale by using [Intl DateTimeFor
### Installation ### Installation
```sh ```bash
npm i --save @lion/localize npm i --save @lion/localize
``` ```

View file

@ -14,7 +14,7 @@ The number formatter returns a number based on the locale by using [Intl NumberF
### Installation ### Installation
```sh ```bash
npm i --save @lion/localize npm i --save @lion/localize
``` ```

View file

@ -36,7 +36,7 @@ Usually you will use `lion-dialog` (or `lion-tooltip` if this makes more sense).
### Installation ### Installation
```sh ```bash
npm i --save @lion/overlays npm i --save @lion/overlays
npm i --save @lion/dialog npm i --save @lion/dialog
``` ```

View file

@ -538,9 +538,9 @@ export const declarativeLocalBackdrop = () => {
Overlays can be nested, as the demo below shows. Overlays can be nested, as the demo below shows.
It's also possible to compose a nested construction by moving around dom nodes. It's also possible to compose a nested construction by moving around dom nodes.
<Preview> ```js preview-story
<Story name="Nested overlays"> export const nestedOverlays = () => {
{html` return html`
<demo-overlay-system .config="${withModalDialogConfig()}"> <demo-overlay-system .config="${withModalDialogConfig()}">
<div slot="content" id="mainContent" class="demo-overlay"> <div slot="content" id="mainContent" class="demo-overlay">
open nested overlay: open nested overlay:
@ -563,6 +563,6 @@ It's also possible to compose a nested construction by moving around dom nodes.
</div> </div>
<button slot="invoker" id="mainInvoker">invoker button</button> <button slot="invoker" id="mainInvoker">invoker button</button>
</demo-overlay-system> </demo-overlay-system>
`} `;
</Story> };
</Preview> ```

View file

@ -48,7 +48,7 @@ Since it extends from [lion-fieldset](?path=/docs/forms-fieldset-overview--page)
### Installation ### Installation
```sh ```bash
npm i --save @lion/radio-group npm i --save @lion/radio-group
``` ```

View file

@ -45,7 +45,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/select-rich npm i --save @lion/select-rich
``` ```

View file

@ -48,7 +48,7 @@ For most other form elements in `lion` we do this for you, because there's no ne
### Installation ### Installation
```sh ```bash
npm i --save @lion/select npm i --save @lion/select
``` ```

View file

@ -7,7 +7,7 @@ Primarily useful if two major version of a package with a singleton is used.
### Installation ### Installation
```sh ```bash
npm i --save singleton-manager npm i --save singleton-manager
``` ```

View file

@ -35,7 +35,7 @@ In many application you build multi-step workflows like multi-step forms where y
### Installation ### Installation
```sh ```bash
npm i --save @lion/steps npm i --save @lion/steps
``` ```

View file

@ -32,7 +32,7 @@ export const main = () => html` <lion-switch label="Label" help-text="Help text"
### Installation ### Installation
```sh ```bash
npm i --save @lion/switch npm i --save @lion/switch
``` ```

View file

@ -37,7 +37,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/tabs; npm i --save @lion/tabs;
``` ```
@ -184,9 +184,7 @@ export const distributeNewElement = () => {
}, },
); );
} }
return html` return html` <lion-tabs-experimental></lion-tabs-experimental> `;
<lion-tabs-experimental></lion-tabs-experimental>
`;
}; };
``` ```

View file

@ -37,7 +37,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/textarea npm i --save @lion/textarea
``` ```

View file

@ -1,11 +1,11 @@
# Tooltip # Tooltip
`lion-tooltip` is a component used for basic popups on hover. `lion-tooltip` is a component used for basic popups on hover.
Its purpose is to show content appearing when the user hovers over an invoker element with the cursor or with the keyboard, or if th Its purpose is to show content appearing when the user hovers over an invoker element with the cursor or with the keyboard, or if the invoker element is focused.
e invoker element is focused.
```js script ```js script
import { css, html } from '@lion/core'; import { css, html } from '@lion/core';
import { LionTooltip } from './src/LionTooltip.js';
import './lion-tooltip.js'; import './lion-tooltip.js';
export default { export default {
@ -72,7 +72,7 @@ export const main = () => html`
### Installation ### Installation
```sh ```bash
npm i --save @lion/tooltip npm i --save @lion/tooltip
``` ```
@ -165,45 +165,38 @@ Modifier explanations:
### Arrow ### Arrow
Popper also comes with an arrow modifier. By default, the arrow is disabled for our tooltip. Via the `has-arrow` property it can be enabled.
In our tooltip you can pass an arrow element (e.g. an SVG Element) through the `slot="arrow"`.
We export a `lion-tooltip-arrow` that you can use by default for this. > As a Subclasser, you can decide to turn the arrow on by default if this fits your Design System
```js preview-story ```js preview-story
export const arrow = () => html` export const arrow = () => html`
<style>${tooltipDemoStyles}</style> <style>${tooltipDemoStyles}</style>
<lion-tooltip> <lion-tooltip has-arrow>
<button slot="invoker" class="demo-tooltip-invoker">Hover me</button> <button slot="invoker">Hover me</button>
<div slot="content" class="demo-tooltip-content">This is a tooltip<div> <div slot="content">This is a tooltip</div>
<lion-tooltip-arrow slot="arrow"></lion-tooltip-arrow>
</lion-tooltip> </lion-tooltip>
`; `;
``` ```
#### Use a custom arrow #### Use a custom arrow
If you plan on passing your own arrow element, you can extend the `lion-tooltip-arrow`. If you plan on providing a custom arrow, you can extend the `lion-tooltip`.
All you need to do is override the `render` method to pass your own SVG, and extend the styles to pass the proper dimensions of your arrow. All you need to do is override the `_arrowTemplate` method to pass your own SVG, and extend the styles to pass the proper dimensions of your arrow.
The rest of the work is done by Popper.js (for positioning) and the `lion-tooltip-arrow` (arrow dimensions, rotation, etc.). The rest of the work is done by Popper.js (for positioning) and the `lion-tooltip-arrow` (arrow dimensions, rotation, etc.).
```js preview-story ```js preview-story
export const customArrow = () => { export const customArrow = () => {
if (!customElements.get('custom-tooltip')) { if (!customElements.get('custom-tooltip')) {
customElements.define( customElements.define('custom-tooltip', class extends LionTooltip {
'custom-tooltip',
class extends LionTooltip {
static get styles() { static get styles() {
return [ return [super.styles, css`
super.styles,
css`
:host { :host {
--tooltip-arrow-width: 20px; --tooltip-arrow-width: 20px;
--tooltip-arrow-height: 8px; --tooltip-arrow-height: 8px;
} }
`, `];
];
} }
constructor() { constructor() {
super(); super();
@ -216,13 +209,10 @@ export const customArrow = () => {
</svg> </svg>
`; `;
} }
}, });
);
} }
return html` return html`
<style> <style>${tooltipDemoStyles}</style>
${tooltipDemoStyles}
</style>
<custom-tooltip> <custom-tooltip>
<button slot="invoker" class="demo-tooltip-invoker">Hover me</button> <button slot="invoker" class="demo-tooltip-invoker">Hover me</button>
<div slot="content" class="demo-tooltip-content">This is a tooltip</div> <div slot="content" class="demo-tooltip-content">This is a tooltip</div>

View file

@ -43,7 +43,7 @@ For a detailed description of the validation system and the `ValidateMixin`, ple
### Installation ### Installation
```sh ```bash
npm i --save @lion/validate npm i --save @lion/validate
``` ```