chore(docs): remove lion references for easier extending
This commit is contained in:
parent
2ac36c7f2f
commit
97b8592cd9
15 changed files with 42 additions and 26 deletions
16
.changeset/dry-fishes-shake.md
Normal file
16
.changeset/dry-fishes-shake.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
'@lion/checkbox-group': patch
|
||||||
|
'@lion/collapsible': patch
|
||||||
|
'@lion/fieldset': patch
|
||||||
|
'@lion/form': 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/radio-group': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove lion references in docs for easier extending
|
||||||
|
|
@ -21,10 +21,10 @@ export const main = () => html`
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Use `opened` attribute or `toggle()` method to render default open
|
- Use `opened` attribute or `toggle()` method to render default open.
|
||||||
- `invoker` slot can be custom template e.g. `lion-button` or native `button` with custom styling
|
- `invoker` slot can be custom template e.g. our [button](../../interaction/button/overview.md) or native `button` with custom styling.
|
||||||
- Observe the state with the help of `@opened-changed` event
|
- Observe the state with the help of `@opened-changed` event.
|
||||||
- `show()` and `hide()` are helper methods to hide or show the content from outside
|
- `show()` and `hide()` are helper methods to hide or show the content from outside.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
A checkbox group enhances the functionality of the native `<input type="checkbox">` element.
|
A checkbox group enhances the functionality of the native `<input type="checkbox">` element.
|
||||||
Its purpose is to provide a way for users to check **multiple** options amongst a set of choices, or to function as a single toggle.
|
Its purpose is to provide a way for users to check **multiple** options amongst a set of choices, or to function as a single toggle.
|
||||||
|
|
||||||
> You should use `<lion-checkbox>` elements as the children of the `<lion-checkbox-group>`.
|
> You should use our `checkbox` elements as children in checkbox group.
|
||||||
|
|
||||||
```js script
|
```js script
|
||||||
import { html } from '@lion/core';
|
import { html } from '@lion/core';
|
||||||
|
|
@ -20,11 +20,11 @@ export const main = () => html`
|
||||||
`;
|
`;
|
||||||
```
|
```
|
||||||
|
|
||||||
> Make sure that the checkbox-group also has a name attribute, this is necessary for the [lion-form](../form/overview.md)'s serialization result.
|
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](../form/overview.md)'s serialization result.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Since it extends from [lion-fieldset](../fieldset/overview.md),
|
Since it extends from our [fieldset](../fieldset/overview.md),
|
||||||
it has all the features a fieldset has.
|
it has all the features a fieldset has.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ export const main = () => html`
|
||||||
|
|
||||||
We have three specific fieldset implementations:
|
We have three specific fieldset implementations:
|
||||||
|
|
||||||
- [lion-form](../form/overview.md)
|
- [form](../form/overview.md)
|
||||||
- [lion-checkbox-group](../checkbox-group/overview.md)
|
- [checkbox-group](../checkbox-group/overview.md)
|
||||||
- [lion-radio-group](../radio-group/overview.md)
|
- [radio-group](../radio-group/overview.md)
|
||||||
|
|
||||||
A native fieldset element should always have a legend-element for a11y purposes.
|
A native fieldset element should always have a legend-element for a11y purposes.
|
||||||
However, our fieldset element is not native and should not have a legend-element.
|
However, our fieldset element is not native and should not have a legend-element.
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export const main = () => html`
|
||||||
- Registration mechanism for form controls
|
- Registration mechanism for form controls
|
||||||
- Accessible out of the box
|
- Accessible out of the box
|
||||||
|
|
||||||
For more information about fields that are designed for `lion-form`, please read [form system](../../../docs/systems/form/overview.md).
|
For more information about fields that are designed for our `form`, please read [form system](../../../docs/systems/form/overview.md).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export const main = () => {
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md)
|
- Based on our [input](../input/overview.md)
|
||||||
- Makes use of [formatNumber](../../../docs/systems/localize/numbers.md) for formatting and parsing.
|
- Makes use of [formatNumber](../../../docs/systems/localize/numbers.md) for formatting and parsing.
|
||||||
- Option to show currency as a suffix
|
- Option to show currency as a suffix
|
||||||
- Option to override locale to change the formatting and parsing
|
- Option to override locale to change the formatting and parsing
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ export const main = () => html` <lion-input-date label="Date"></lion-input-date>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md)
|
- Based on our [input](../input/overview.md)
|
||||||
- Makes use of [formatDate](../../../docs/systems/localize/dates.md) for formatting and parsing.
|
- Makes use of [formatDate](../../../docs/systems/localize/dates.md) for formatting and parsing.
|
||||||
- Option to override locale to change the formatting and parsing
|
- Option to override locale to change the formatting and parsing
|
||||||
- Default label in different languages
|
- Default label in different languages
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
|
A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
|
||||||
For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
|
For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
|
||||||
We encourage using the standard [lion-input-date](../input-date/overview.md) for this.
|
We encourage using our standard [input-date](../input-date/overview.md) for this.
|
||||||
|
|
||||||
```js script
|
```js script
|
||||||
import { html } from '@lion/core';
|
import { html } from '@lion/core';
|
||||||
|
|
@ -18,8 +18,8 @@ export const main = () => {
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Input field with a datepicker to help to choose a date
|
- Input field with a datepicker to help to choose a date
|
||||||
- Based on [lion-input-date](../input-date/overview.md)
|
- Based on our [input-date](../input-date/overview.md)
|
||||||
- Makes use of [lion-calendar](../calendar/overview.md) inside the datepicker
|
- Makes use of our [calendar](../calendar/overview.md) inside the datepicker
|
||||||
- Makes use of [formatDate](../../../docs/systems/localize/dates.md) for formatting and parsing.
|
- Makes use of [formatDate](../../../docs/systems/localize/dates.md) for formatting and parsing.
|
||||||
- Option to overwrite locale to change the formatting and parsing
|
- Option to overwrite locale to change the formatting and parsing
|
||||||
- Can make use of date specific [validators](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
- Can make use of date specific [validators](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export const main = () => {
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md)
|
- Based on our [input](../input/overview.md)
|
||||||
- Makes use of email [validators](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
- Makes use of email [validators](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
||||||
- IsEmail (default)
|
- IsEmail (default)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ export const main = () => {
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md)
|
- Based on our [input](../input/overview.md)
|
||||||
- Default label in different languages
|
- Default label in different languages
|
||||||
- Makes use of IBAN specific [validate](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
- Makes use of IBAN specific [validate](../../../docs/systems/form/validate.md) with corresponding error messages in different languages
|
||||||
- IsIBAN (default)
|
- IsIBAN (default)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export const main = () => html`
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md).
|
- Based on our [input](../input/overview.md).
|
||||||
- Shows `modelValue` and `unit` above the range input.
|
- Shows `modelValue` and `unit` above the range input.
|
||||||
- Shows `min` and `max` value after the range input.
|
- Shows `min` and `max` value after the range input.
|
||||||
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export const main = () => html`
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Based on [lion-input](../input/overview.md).
|
- Based on our [input](../input/overview.md).
|
||||||
- Set `min` and `max` value to define the range.
|
- Set `min` and `max` value to define the range.
|
||||||
- Set `step` value in integer or decimal to increase and decrease the value.
|
- Set `step` value in integer or decimal to increase and decrease the value.
|
||||||
- Use `ArrowUp` or `ArrowDown` to update the value.
|
- Use `ArrowUp` or `ArrowDown` to update the value.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
A web component that enhances the functionality of the native `<input type="radio">` element. Its purpose is to provide a way for users to check a **single** option amongst a set of choices.
|
A web component that enhances the functionality of the native `<input type="radio">` element. Its purpose is to provide a way for users to check a **single** option amongst a set of choices.
|
||||||
|
|
||||||
You should use `<lion-radio>`s inside this element.
|
You should use our `radio` inside this element.
|
||||||
|
|
||||||
```js script
|
```js script
|
||||||
import { html } from '@lion/core';
|
import { html } from '@lion/core';
|
||||||
|
|
@ -19,12 +19,12 @@ export const main = () => html`
|
||||||
`;
|
`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- Make sure that to use a name attribute as it is necessary for the [lion-form](../form/overview.md)'s serialization result.
|
- Make sure that to use a name attribute as it is necessary for our [form](../form/overview.md)'s serialization result.
|
||||||
- If you have many options for a user to pick from, consider using [lion-select](../select/overview.md) instead
|
- If you have many options for a user to pick from, consider using our [select](../select/overview.md) instead.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Since it extends from [lion-fieldset](../fieldset/overview.md), it has all the features a fieldset has.
|
Since it extends from our [fieldset](../fieldset/overview.md), it has all the features a fieldset has.
|
||||||
|
|
||||||
- Get or set the checked value of the group:
|
- Get or set the checked value of the group:
|
||||||
- modelValue (default) - `checkedValue()`
|
- modelValue (default) - `checkedValue()`
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export const main = () => html`
|
||||||
```
|
```
|
||||||
|
|
||||||
For this form element it is important to put the `slot="input"` with the native `select` yourself, because you are responsible for filling it with `<option>`s.
|
For this form element it is important to put the `slot="input"` with the native `select` yourself, because you are responsible for filling it with `<option>`s.
|
||||||
For most other form elements in `lion` we do this for you, because there's no need to put html inside the native form inputs.
|
For most other form elements we do this for you, because there's no need to put html inside the native form inputs.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ npm i --save @lion/textarea
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { LionTextare } from '@lion/textarea';
|
import { LionTextarea } from '@lion/textarea';
|
||||||
// or
|
// or
|
||||||
import '@lion/textarea/define';
|
import '@lion/textarea/define';
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue