fix: use mdjs-preview in docs for lit compatibility
This commit is contained in:
parent
13ab349ff9
commit
84131205e5
89 changed files with 132 additions and 97 deletions
35
.changeset/red-pigs-try.md
Normal file
35
.changeset/red-pigs-try.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
'@lion/accordion': patch
|
||||
'@lion/button': patch
|
||||
'@lion/calendar': patch
|
||||
'@lion/checkbox-group': patch
|
||||
'@lion/collapsible': patch
|
||||
'@lion/combobox': patch
|
||||
'@lion/dialog': patch
|
||||
'@lion/fieldset': patch
|
||||
'@lion/form': patch
|
||||
'@lion/form-core': patch
|
||||
'@lion/helpers': patch
|
||||
'@lion/icon': patch
|
||||
'@lion/input': patch
|
||||
'@lion/input-amount': patch
|
||||
'@lion/input-date': patch
|
||||
'@lion/input-datepicker': patch
|
||||
'@lion/input-email': patch
|
||||
'@lion/input-iban': patch
|
||||
'@lion/input-range': patch
|
||||
'@lion/input-stepper': patch
|
||||
'@lion/listbox': patch
|
||||
'@lion/pagination': patch
|
||||
'@lion/progress-indicator': patch
|
||||
'@lion/radio-group': patch
|
||||
'@lion/select': patch
|
||||
'@lion/ajax': patch
|
||||
'@lion/core': patch
|
||||
'@lion/form-integrations': patch
|
||||
'@lion/localize': patch
|
||||
'@lion/overlays': patch
|
||||
'@lion/validate-messages': patch
|
||||
---
|
||||
|
||||
use mdjs-preview in docs for lit compatibility
|
||||
|
|
@ -67,7 +67,7 @@ npm i @lion/<package-name>
|
|||
**This is the main use case for lion**. To import component classes, and extend them for your own design system's components.
|
||||
|
||||
```js
|
||||
import { css } from '@lion/core';
|
||||
import { css } from '@mdjs/mdjs-preview';
|
||||
import { LionInput } from '@lion/input';
|
||||
|
||||
class MyInput extends LionInput {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ Let's convert an example page
|
|||
`lion-calendar` is a reusable and accessible calendar view. It depends on [calendar](?path=/docs/calendar--default-story).
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import './lion-calendar.js';
|
||||
|
||||
export default {
|
||||
|
|
@ -103,7 +103,7 @@ export default {
|
|||
`lion-calendar` is a reusable and accessible calendar view. It depends on [calendar](../../path/to/calendar.md).
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import '@lion/calendar/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Let's convert an example page
|
|||
`lion-calendar` is a reusable and accessible calendar view. It depends on [calendar](?path=/docs/calendar--default-story).
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import './lion-calendar.js';
|
||||
|
||||
export default {
|
||||
|
|
@ -55,7 +55,7 @@ export default {
|
|||
`lion-calendar` is a reusable and accessible calendar view. It depends on [calendar](../../path/to/calendar.md).
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import '@lion/calendar/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Accordion >> Features ||20
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
|
||||
import '@lion/accordion/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ A web component that can be used to toggle the display of sections of content.
|
|||
Its purpose is to reduce the need to scroll when presenting multiple sections of content on a single page. Accordions often allow users to get the big picture before focusing on details.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/accordion/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Collapsible >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/collapsible/define';
|
||||
import '@lion/button/define';
|
||||
import './assets/CustomCollapsible.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Collapsible >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/collapsible/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A combination of a button (the invoker) and a chunk of 'extra content'. This web component can be extended with an animation to disclose the extra content. There are two slots available respectively; `invoker` to specify the collapsible's invoker and `content` for the extra content of the collapsible.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/collapsible/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Progress Indicator >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import './assets/custom-progress-indicator.js';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Tabs >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import './src/lea-tabs.js';
|
||||
import './src/lea-tab.js';
|
||||
import './src/lea-tab-panel.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Content >> Tabs >> Features ||20
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
|
||||
import '@lion/tabs/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component that allows users to quickly move between a small number of equally important views.
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/tabs/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Icons >> Icon >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { icons } from '@lion/icon';
|
||||
import './assets/iconset-bugs.js';
|
||||
import './assets/iconset-misc.js';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component for displaying icons.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { icons } from '@lion/icon';
|
||||
import '@lion/icon/define';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Calendar >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import '@lion/calendar/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A reusable and accessible calendar view web component.
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import '@lion/calendar/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Checkbox Group >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/checkbox-group/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Its purpose is to provide a way for users to check **multiple** options amongst
|
|||
> You should use our `checkbox` elements as children in checkbox group.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/checkbox-group/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Combobox >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import './src/md-combobox/md-combobox.js';
|
||||
import './src/gh-combobox/gh-combobox.js';
|
||||
import './src/wa-combobox/wa-combobox.js';
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ availability of the popup.
|
|||
> Fore more information, consult [Combobox wai-aria design pattern](https://www.w3.org/TR/wai-aria-practices/#combobox)
|
||||
|
||||
```js script
|
||||
import { LitElement, html, repeat } from '@lion/core';
|
||||
import { LitElement, html, repeat } from '@mdjs/mdjs-preview';
|
||||
import { listboxData } from '../../../../packages/listbox/docs/listboxData.js';
|
||||
import { LionCombobox } from '../../../../packages/combobox/src/LionCombobox.js';
|
||||
import '@lion/listbox/define';
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ availability of the pop-up.
|
|||
> Fore more information, consult [Combobox wai-aria design pattern](https://www.w3.org/TR/wai-aria-practices/#combobox)
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { listboxData } from '../../../../packages/listbox/docs/listboxData.js';
|
||||
import '@lion/listbox/define';
|
||||
import '@lion/combobox/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Fieldset >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { localize } from '@lion/localize';
|
||||
import { MinLength, Validator, Required } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Fieldset >> Overview ||10
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
|
||||
import '@lion/input/define';
|
||||
import '@lion/fieldset/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Form >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { Required } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
import '@lion/input/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Form >> Overview ||10
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
|
||||
import '@lion/input/define';
|
||||
import '@lion/form/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Amount >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { MaxLength } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Valid characters are digits and separators. Formatting happens on-blur.
|
|||
If there are no valid characters in the input whatsoever, it will provide an error feedback.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-amount/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Date >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { MinDate, MinMaxDate, MaxDate } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
import { formatDate } from '@lion/localize';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component based on the generic text input field. Its purpose is to provide a way for users to fill in a date.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { MinDate, MinMaxDate, MaxDate } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
import { formatDate } from '@lion/localize';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Datepicker >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { MinMaxDate, IsDateDisabled } from '@lion/form-core';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
import { formatDate } from '@lion/localize';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ For an input field with a big range, such as `birthday-input`, a datepicker is n
|
|||
We encourage using our standard [input-date](../input-date/overview.md) for this.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-datepicker/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Email >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { Validator } from '@lion/form-core';
|
||||
import '@lion/input-email/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component based on the generic text input field. Its purpose is to provide a way for users to fill in an email.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-email/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Iban >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
import { IsCountryIBAN, IsNotCountryIBAN } from '@lion/input-iban';
|
||||
import '@lion/input-iban/define';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ A web component based on the generic text input field.
|
|||
Its purpose is to provide a way for users to fill in an IBAN (International Bank Account Number).
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-iban/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Range >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-range/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component based on the native range input. Its purpose is to provide a way for users to select one value from a range of values.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-range/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input Stepper >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-stepper/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component that enables the user to increase and decrease a numeric value by predefined range. It is a combination of two buttons and a number input field with an optional slot `after` to suffix the extra information.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-stepper/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Input >> Overview ||10
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Listbox >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { listboxData } from './src/listboxData.js';
|
||||
import '@lion/listbox/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ multiple options to be selected is a `multi-select listbox`.
|
|||
> From [listbox wai-aria best practices](https://www.w3.org/TR/wai-aria-practices/#Listbox)
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/listbox/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Radio Group >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/radio-group/define';
|
||||
import '@lion/radio-group/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ A web component that enhances the functionality of the native `<input type="radi
|
|||
You should use our `radio` inside this element.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/radio-group/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Select Rich >> Features ||20
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/listbox/define';
|
||||
import '@lion/listbox/define';
|
||||
import '@lion/select-rich/define';
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Its implementation is based on the following Design pattern:
|
|||
<https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html>
|
||||
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/listbox/define';
|
||||
import '@lion/select-rich/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Select >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/select/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ You cannot use interactive elements inside the options. Avoid very long names to
|
|||
Sets of options where each option name starts with the same word or phrase can also significantly degrade usability for keyboard and screen reader users.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/select/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Inputs >> Textarea >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/textarea/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ A webcomponent that enhances the functionality of the native `<input type="texta
|
|||
Its purpose is to provide a way for users to write text that is multiple lines long.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/textarea/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Interaction >> Button >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/button/define';
|
||||
import iconSvg from './src/icon.svg.js';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Interaction >> Button >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/button/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A button web component that is easily stylable and accessible.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/button/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Its purpose is to make it easy to use our Overlay System declaratively.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/dialog/define';
|
||||
|
||||
import { demoStyle } from './src/demoStyle.js';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ A web component that wraps a modal dialog controller.
|
|||
Its purpose is to make it easy to use our Overlay System declaratively.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/dialog/define';
|
||||
|
||||
import { demoStyle } from './src/demoStyle.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Interaction >> Tooltip >> Examples ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/tooltip/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Interaction >> Tooltip >> Features ||20
|
||||
|
||||
```js script
|
||||
import { css, html } from '@lion/core';
|
||||
import { css, html } from '@mdjs/mdjs-preview';
|
||||
import { LionTooltip } from '@lion/tooltip';
|
||||
import '@lion/tooltip/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ A web 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 the invoker element is focused.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/tooltip/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Navigation >> Pagination >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/pagination/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component that handles pagination.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/pagination/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Navigation >> Steps >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/steps/define';
|
||||
import '@lion/steps/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A web component that can be used to break a single goal down into dependable sub-tasks.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/steps/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ paths: [
|
|||
We have an existing demo code which we want to reuse.
|
||||
|
||||
```js
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import 'source-pkg/counter/define';
|
||||
class MyApp extends LitElement {
|
||||
render() {
|
||||
|
|
@ -112,7 +112,7 @@ tag: {
|
|||
### Result of Replacement of tags
|
||||
|
||||
```js
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import 'extension-pkg/counter/define';
|
||||
class MyApp extends LitElement {
|
||||
render() {
|
||||
|
|
@ -130,7 +130,7 @@ customElements.define('my-app', MyApp);
|
|||
We have an existing demo code which we want to reuse.
|
||||
|
||||
```js
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import { SourceCounter } from 'source-pkg/counter';
|
||||
class TenCounter extends SourceCounter {
|
||||
inc() {
|
||||
|
|
@ -167,7 +167,7 @@ variable: {
|
|||
### Result of Replacement of classes
|
||||
|
||||
```js
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import { SourceCounter } from 'extension-pkg/counter';
|
||||
class TenCounter extends SourceCounter {
|
||||
inc() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Node Tools >> Providence Analytics >> Overview ||10
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { providenceFlowSvg, providenceInternalFlowSvg } from './assets/_mermaid.svg.js';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ as an example this is a part of the lion docs for tabs
|
|||
|
||||
````md
|
||||
```js script
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/tabs/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ To be sure a compatible version is used you should import it via this package.
|
|||
|
||||
```js
|
||||
// DO
|
||||
import { LitElement, html, render } from '@lion/core';
|
||||
import { LitElement, html, render } from '@mdjs/mdjs-preview';
|
||||
|
||||
// DON'T
|
||||
import { LitElement, html, render } from 'lit-element';
|
||||
|
|
@ -29,7 +29,7 @@ npm i --save @lion/core
|
|||
```
|
||||
|
||||
```js
|
||||
import { dedupeMixin, LitElement } from '@lion/core';
|
||||
import { dedupeMixin, LitElement } from '@mdjs/mdjs-preview';
|
||||
```
|
||||
|
||||
### Example
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ This is a meta package to show interaction between various form elements.
|
|||
For usage and installation please see the appropriate packages.
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/button/define';
|
||||
import '@lion/checkbox-group/define';
|
||||
import '@lion/combobox/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Form >> Formatting and Parsing ||21
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input/define';
|
||||
import { Unparseable } from '@lion/form-core';
|
||||
import './assets/h-output.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Form >> Interaction States ||22
|
||||
|
||||
```js script
|
||||
import { html, render } from '@lion/core';
|
||||
import { html, render } from '@mdjs/mdjs-preview';
|
||||
import { renderLitAsNode } from '@lion/helpers';
|
||||
import '@lion/input/define';
|
||||
import '@lion/input-date/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Form >> Styling ||40
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input/define';
|
||||
import '@lion/button/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Form >> Validate ||30
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { LionInput } from '@lion/input';
|
||||
import '@lion/checkbox-group/define';
|
||||
import '@lion/checkbox-group/define';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ application, and you don't need to worry about carefully coordinating the dynami
|
|||
For security reasons, icons are defined using lit-html templates to guarantee XSS safety:
|
||||
|
||||
```js
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
|
||||
export default html` <svg focusable="false" ...>...</svg> `;
|
||||
```
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ With the `formatDate` you can safely display dates for all languages.
|
|||
The input value is `new Date('1987/05/12')`.
|
||||
|
||||
```js script
|
||||
import { css, html } from '@lion/core';
|
||||
import { css, html } from '@mdjs/mdjs-preview';
|
||||
import { formatNumber, formatNumberToParts, formatDate } from '@lion/localize';
|
||||
import allLocales from './assets/all-locales.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ With the `formatNumber` you can safely display a number for all languages.
|
|||
The input value is `1234.56`.
|
||||
|
||||
```js script
|
||||
import { html, css } from '@lion/core';
|
||||
import { html, css } from '@mdjs/mdjs-preview';
|
||||
import { formatNumber, formatNumberToParts } from '@lion/localize';
|
||||
import allLocales from './assets/all-locales.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
## As a function
|
||||
|
||||
```js script
|
||||
import { html, render, LitElement } from '@lion/core';
|
||||
import { html, render, LitElement } from '@mdjs/mdjs-preview';
|
||||
import { localize, formatNumber, formatDate, LocalizeMixin } from '@lion/localize';
|
||||
import '@lion/helpers/define';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Overlays >> Configuration ||40
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import './assets/demo-overlay-system.js';
|
||||
import './assets/applyDemoOverlayStyles.js';
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Overlays >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html, render, LitElement } from '@lion/core';
|
||||
import { html, render, LitElement } from '@mdjs/mdjs-preview';
|
||||
import { renderLitAsNode } from '@lion/helpers';
|
||||
import {
|
||||
ArrowMixin,
|
||||
|
|
@ -481,7 +481,7 @@ By default, there are only a few `OverlayMixin` methods you need to override to
|
|||
- `_teardownOpenCloseListeners`, use this lifecycle hook to ensure that the listeners are removed when the OverlayController is tearing down. For example when the Web Component is disconnected from the DOM.
|
||||
|
||||
```js
|
||||
import { LitElement } from '@lion/core';
|
||||
import { LitElement } from '@mdjs/mdjs-preview';
|
||||
import { OverlayMixin } from '@lion/overlays';
|
||||
|
||||
class MyOverlayWC extends OverlayMixin(LitElement) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Systems >> Overlays >> Form Integrations ||60
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/input-datepicker/define';
|
||||
import '@lion/listbox/define';
|
||||
import '@lion/listbox/define';
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ const ctrl = new OverlayController({
|
|||
Or creating your own Web Component which uses the Overlay System
|
||||
|
||||
```js
|
||||
import { LitElement, html } from '@lion/core';
|
||||
import { LitElement, html } from '@mdjs/mdjs-preview';
|
||||
import { OverlayMixin, withModalDialogConfig } from '@lion/overlays';
|
||||
|
||||
class MyOverlayComponent extends OverlayMixin(LitElement) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Tools >> Ajax >> Features ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { renderLitAsNode } from '@lion/helpers';
|
||||
import { ajax, createCacheInterceptors } from '@lion/ajax';
|
||||
import '@lion/helpers/define';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Tools >> Ajax >> Overview ||10
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { renderLitAsNode } from '@lion/helpers';
|
||||
import { ajax, createCacheInterceptors } from '@lion/ajax';
|
||||
import '@lion/helpers/define';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
A visual element to show action logs in demos `sb-action-logger`
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import '@lion/helpers/define';
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# How To >> Create a custom field ||20
|
||||
|
||||
```js script
|
||||
import { html, css, LitElement } from '@lion/core';
|
||||
import { html, css, LitElement } from '@mdjs/mdjs-preview';
|
||||
import { LionField } from '@lion/form-core';
|
||||
import '@lion/form-core/define';
|
||||
import '../../docs/systems/form/assets/h-output.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# How To >> Extend a native Input ||20
|
||||
|
||||
```js script
|
||||
import { html } from '@lion/core';
|
||||
import { html } from '@mdjs/mdjs-preview';
|
||||
import { LionInput } from '@lion/input';
|
||||
import { LionInputDate } from '@lion/input-date';
|
||||
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ npm i @lion/<package-name>
|
|||
**This is the main use case for lion**. To import component classes, and extend them for your own design system's components.
|
||||
|
||||
```js
|
||||
import { css } from '@lion/core';
|
||||
import { css } from '@mdjs/mdjs-preview';
|
||||
import { LionInput } from '@lion/input';
|
||||
|
||||
class MyInput extends LionInput {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Whenever a lion component uses composition (meaning it uses another lion compone
|
|||
apply ScopedElementsMixin to make sure it uses the right version of this internal component.
|
||||
|
||||
```js
|
||||
import { ScopedElementsMixin, LitElement, html } from '@lion/core';
|
||||
import { ScopedElementsMixin, LitElement, html } from '@mdjs/mdjs-preview';
|
||||
|
||||
import { LionInput } from '@lion/input';
|
||||
import { LionButton } from '@lion/button';
|
||||
|
|
@ -89,7 +89,7 @@ connectedCallback() {
|
|||
In a less complex case, we might just want to add a child node to the dom.
|
||||
|
||||
```js
|
||||
import { ScopedElementsMixin, LitElement, getScopedTagNamegetScopedTagName } from '@lion/core';
|
||||
import { ScopedElementsMixin, LitElement, getScopedTagNamegetScopedTagName } from '@mdjs/mdjs-preview';
|
||||
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ It handles the version of `lit-element` and `lit-html`.
|
|||
In order to be sure a compatible version is used import it via this package.
|
||||
|
||||
```js
|
||||
import { LitElement, html, render } from '@lion/core';
|
||||
import { LitElement, html, render } from '@mdjs/mdjs-preview';
|
||||
```
|
||||
|
||||
## Features
|
||||
|
|
@ -27,7 +27,7 @@ npm i --save @lion/core
|
|||
```
|
||||
|
||||
```js
|
||||
import { dedupeMixin, LitElement } from '@lion/core';
|
||||
import { dedupeMixin, LitElement } from '@mdjs/mdjs-preview';
|
||||
```
|
||||
|
||||
### Example
|
||||
|
|
|
|||
Loading…
Reference in a new issue