@lion/ui 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button/test-suites/LionButtonReset.suite.js +7 -9
- package/components/calendar/test/lion-calendar.test.js +26 -30
- package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +3 -0
- package/components/combobox/test/lion-combobox.test.js +32 -32
- package/components/core/src/SlotMixin.js +7 -1
- package/components/form/test/lion-form.test.js +4 -4
- package/components/form-core/test-suites/ValidateMixin.suite.js +1 -0
- package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +18 -18
- package/components/form-integrations/test/dialog-integrations.test.js +6 -4
- package/components/helpers/src/SbActionLogger.js +11 -2
- package/components/icon/test/lion-icon.test.js +12 -14
- package/components/input-amount/test/lion-input-amount.test.js +10 -14
- package/components/input-datepicker/test/lion-input-datepicker.test.js +4 -4
- package/components/input-file/test/lion-input-file.test.js +3 -3
- package/components/input-tel-dropdown/test/LionInputTelDropdown.test.js +23 -23
- package/components/listbox/test-suites/ListboxMixin.suite.js +10 -3
- package/components/localize/src/date/utils/normalizeIntlDate.js +13 -2
- package/components/progress-indicator/test/lion-progress-indicator.test.js +42 -46
- package/components/select-rich/src/LionSelectRich.js +3 -0
- package/components/select-rich/test/lion-select-rich.test.js +13 -3
- package/components/steps/test/lion-step.test.js +5 -7
- package/components/switch/test/lion-switch.test.js +5 -7
- package/custom-elements.json +517 -5134
- package/dist-types/components/button/test-suites/LionButtonReset.suite.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
- package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
- package/dist-types/components/helpers/src/SbActionLogger.d.ts.map +1 -1
- package/dist-types/components/input-tel-dropdown/test/LionInputTelDropdown.test.d.ts.map +1 -1
- package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts.map +1 -1
- package/dist-types/components/localize/src/date/utils/normalizeIntlDate.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/button/use-cases.md +11 -10
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/assets/applyDemoCollapsibleStyles.js +6 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +4 -3
- package/docs/components/combobox/src/gh-combobox/gh-button.js +3 -1
- package/docs/components/combobox/src/gh-combobox/gh-combobox.js +9 -2
- package/docs/components/combobox/src/google-combobox/google-combobox.js +6 -8
- package/docs/components/combobox/src/md-combobox/MdFieldMixin.js +7 -3
- package/docs/components/combobox/src/md-combobox/style/md-ripple.js +1 -0
- package/docs/components/combobox/src/wa-combobox/wa-combobox.js +15 -3
- package/docs/components/combobox/use-cases.md +19 -17
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input/use-cases.md +3 -2
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/input-tel-dropdown/src/intl-input-tel-dropdown.js +15 -5
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/progress-indicator/examples.md +11 -11
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/tabs/src/lea-tab-panel.js +3 -1
- package/docs/components/tabs/src/lea-tab.js +7 -2
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/assets/_mermaid.svg.js +32 -8
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +3 -3
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/_configuration-positioning.md +0 -9
- package/docs/fundamentals/systems/overlays/_edge-cases.md +74 -80
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +5 -8
- package/docs/fundamentals/tools/ajax/overview.md +19 -18
- package/docs/fundamentals/tools/helpers/action-logger.md +3 -6
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +2 -2
|
@@ -28,16 +28,17 @@ export const disabled = () => html`<lion-button disabled>Disabled</lion-button>`
|
|
|
28
28
|
The minimum click area needs to be at least `44px` by `44px` according to [WCAG Success Criterion 2.5.5 Target Size (Enhanced)](https://www.w3.org/TR/WCAG22/#target-size-enhanced).
|
|
29
29
|
|
|
30
30
|
```js preview-story
|
|
31
|
-
export const minimumClickArea = () =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export const minimumClickArea = () =>
|
|
32
|
+
html` <style>
|
|
33
|
+
.small {
|
|
34
|
+
padding: 4px;
|
|
35
|
+
line-height: 1em;
|
|
36
|
+
}
|
|
37
|
+
.small::before {
|
|
38
|
+
border: 1px dashed #000;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<lion-button class="small">xs</lion-button>`;
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
## Usage with native form
|
|
@@ -19,11 +19,11 @@ import '@lion/ui/define/lion-checkbox.js';
|
|
|
19
19
|
</lion-checkbox-group>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/form/overview.md)'s serialization result.
|
|
23
23
|
|
|
24
24
|
## Features
|
|
25
25
|
|
|
26
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/fieldset/overview.md),
|
|
27
27
|
it has all the features a fieldset has.
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
@@ -7,7 +7,9 @@ const applyDemoCollapsibleStyles = () => {
|
|
|
7
7
|
margin: 16px;
|
|
8
8
|
border-radius: 4px;
|
|
9
9
|
width: 400px;
|
|
10
|
-
box-shadow:
|
|
10
|
+
box-shadow:
|
|
11
|
+
0 1px 3px rgba(0, 0, 0, 0.12),
|
|
12
|
+
0 1px 2px rgba(0, 0, 0, 0.24);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.demo-custom-collapsible-body {
|
|
@@ -18,7 +20,9 @@ const applyDemoCollapsibleStyles = () => {
|
|
|
18
20
|
border-width: 0;
|
|
19
21
|
border-radius: 2px;
|
|
20
22
|
padding: 12px 24px;
|
|
21
|
-
box-shadow:
|
|
23
|
+
box-shadow:
|
|
24
|
+
0 1px 3px rgba(0, 0, 0, 0.12),
|
|
25
|
+
0 1px 2px rgba(0, 0, 0, 0.24);
|
|
22
26
|
font-weight: bold;
|
|
23
27
|
color: #3f51b5;
|
|
24
28
|
}
|
|
@@ -22,7 +22,7 @@ export const main = () => html`
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
24
|
- Use `opened` attribute or `toggle()` method to render default open.
|
|
25
|
-
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/button/overview.md) or native `button` with custom styling.
|
|
26
26
|
- Observe the state with the help of `@opened-changed` event.
|
|
27
27
|
- `show()` and `hide()` are helper methods to hide or show the content from outside.
|
|
28
28
|
|
|
@@ -25,15 +25,16 @@ export const main = () => html`
|
|
|
25
25
|
<lion-combobox name="combo" label="Default">
|
|
26
26
|
${lazyRender(
|
|
27
27
|
listboxData.map(
|
|
28
|
-
(entry, i) =>
|
|
29
|
-
|
|
28
|
+
(entry, i) => html`
|
|
29
|
+
<lion-option .checked="${i === 0}" .choiceValue="${entry}">${entry}</lion-option>
|
|
30
|
+
`,
|
|
30
31
|
),
|
|
31
32
|
)}
|
|
32
33
|
</lion-combobox>
|
|
33
34
|
`;
|
|
34
35
|
```
|
|
35
36
|
|
|
36
|
-
[...show more](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
[...show more](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/combobox/extensions.md)
|
|
37
38
|
|
|
38
39
|
## Features
|
|
39
40
|
|
|
@@ -35,7 +35,9 @@ export class GhButton extends LionButton {
|
|
|
35
35
|
color: #24292e;
|
|
36
36
|
background-color: #fafbfc;
|
|
37
37
|
border-color: rgba(27, 31, 35, 0.15);
|
|
38
|
-
box-shadow:
|
|
38
|
+
box-shadow:
|
|
39
|
+
0 1px 0 rgba(27, 31, 35, 0.04),
|
|
40
|
+
inset 0 1px 0 hsla(0, 0%, 100%, 0.25);
|
|
39
41
|
transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -123,8 +123,15 @@ export class GhCombobox extends LionCombobox {
|
|
|
123
123
|
/** @configure LionCombobox */
|
|
124
124
|
|
|
125
125
|
:host {
|
|
126
|
-
font-family:
|
|
127
|
-
|
|
126
|
+
font-family:
|
|
127
|
+
apple-system,
|
|
128
|
+
BlinkMacSystemFont,
|
|
129
|
+
Segoe UI,
|
|
130
|
+
Helvetica,
|
|
131
|
+
Arial,
|
|
132
|
+
sans-serif,
|
|
133
|
+
Apple Color Emoji,
|
|
134
|
+
Segoe UI Emoji;
|
|
128
135
|
font-size: 14px;
|
|
129
136
|
}
|
|
130
137
|
|
|
@@ -403,15 +403,13 @@ export class GoogleCombobox extends LionCombobox {
|
|
|
403
403
|
),
|
|
404
404
|
prefix: () => renderLitAsNode(html` <span>${googleSearchIcon}</span> `),
|
|
405
405
|
suffix: () =>
|
|
406
|
-
renderLitAsNode(
|
|
407
|
-
|
|
408
|
-
),
|
|
406
|
+
renderLitAsNode(html`
|
|
407
|
+
<button aria-label="Search by voice">${googleVoiceSearchIcon}</button>
|
|
408
|
+
`),
|
|
409
409
|
'clear-btn': () =>
|
|
410
|
-
renderLitAsNode(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
`,
|
|
414
|
-
),
|
|
410
|
+
renderLitAsNode(html`
|
|
411
|
+
<button @click="${this.__clearText}" aria-label="Clear text">${googleClearIcon}</button>
|
|
412
|
+
`),
|
|
415
413
|
};
|
|
416
414
|
}
|
|
417
415
|
|
|
@@ -48,7 +48,8 @@ export const MdFieldMixin = dedupeMixin(
|
|
|
48
48
|
transform: perspective(100px);
|
|
49
49
|
-ms-transform: none;
|
|
50
50
|
transform-origin: 0 0;
|
|
51
|
-
transition:
|
|
51
|
+
transition:
|
|
52
|
+
transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
|
|
52
53
|
color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
|
|
53
54
|
width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
54
55
|
/* z-index: 1; */
|
|
@@ -205,7 +206,9 @@ export const MdFieldMixin = dedupeMixin(
|
|
|
205
206
|
background-position: 50%;
|
|
206
207
|
transform: scale(10, 10);
|
|
207
208
|
opacity: 0;
|
|
208
|
-
transition:
|
|
209
|
+
transition:
|
|
210
|
+
transform 0.25s,
|
|
211
|
+
opacity 0.5s;
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
.input-group__container > .input-group__prefix ::slotted(button:active)::after,
|
|
@@ -288,7 +291,8 @@ export const MdFieldMixin = dedupeMixin(
|
|
|
288
291
|
visibility: visible;
|
|
289
292
|
opacity: 1;
|
|
290
293
|
transform: scaleX(1);
|
|
291
|
-
transition:
|
|
294
|
+
transition:
|
|
295
|
+
transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
|
|
292
296
|
opacity 0.1s cubic-bezier(0.25, 0.8, 0.25, 1),
|
|
293
297
|
background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
294
298
|
}
|
|
@@ -28,7 +28,9 @@ class WaOption extends LionOption {
|
|
|
28
28
|
cursor: pointer;
|
|
29
29
|
color: rgb(74, 74, 74);
|
|
30
30
|
padding: 0;
|
|
31
|
-
transition:
|
|
31
|
+
transition:
|
|
32
|
+
max-height 0.4s ease,
|
|
33
|
+
opacity 0.3s ease;
|
|
32
34
|
max-height: 500px;
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -287,8 +289,18 @@ class WaCombobox extends LionCombobox {
|
|
|
287
289
|
...super.styles,
|
|
288
290
|
css`
|
|
289
291
|
:host {
|
|
290
|
-
font-family:
|
|
291
|
-
|
|
292
|
+
font-family:
|
|
293
|
+
SF Pro Text,
|
|
294
|
+
SF Pro Icons,
|
|
295
|
+
system,
|
|
296
|
+
-apple-system,
|
|
297
|
+
system-ui,
|
|
298
|
+
BlinkMacSystemFont,
|
|
299
|
+
Helvetica Neue,
|
|
300
|
+
Helvetica,
|
|
301
|
+
Lucida Grande,
|
|
302
|
+
Kohinoor Devanagari,
|
|
303
|
+
sans-serif;
|
|
292
304
|
}
|
|
293
305
|
|
|
294
306
|
.input-group__container {
|
|
@@ -242,8 +242,9 @@ export const multipleChoice = () => html`
|
|
|
242
242
|
></demo-selection-display>
|
|
243
243
|
${lazyRender(
|
|
244
244
|
listboxData.map(
|
|
245
|
-
(entry, i) =>
|
|
246
|
-
|
|
245
|
+
(entry, i) => html`
|
|
246
|
+
<lion-option .choiceValue="${entry}" ?checked=${i === 0}>${entry}</lion-option>
|
|
247
|
+
`,
|
|
247
248
|
),
|
|
248
249
|
)}
|
|
249
250
|
</lion-combobox>
|
|
@@ -264,8 +265,9 @@ export const multipleCustomizableChoice = () => html`
|
|
|
264
265
|
></demo-selection-display>
|
|
265
266
|
${lazyRender(
|
|
266
267
|
listboxData.map(
|
|
267
|
-
(entry, i) =>
|
|
268
|
-
|
|
268
|
+
(entry, i) => html`
|
|
269
|
+
<lion-option .choiceValue="${entry}" ?checked=${i === 0}>${entry}</lion-option>
|
|
270
|
+
`,
|
|
269
271
|
),
|
|
270
272
|
)}
|
|
271
273
|
</lion-combobox>
|
|
@@ -434,26 +436,26 @@ const onModelValueChanged = event => {
|
|
|
434
436
|
console.log(`event.target.modelValue: ${JSON.stringify(event.target.modelValue)}`);
|
|
435
437
|
};
|
|
436
438
|
|
|
437
|
-
export const complexObjectChoiceValue = () =>
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
html`
|
|
439
|
+
export const complexObjectChoiceValue = () =>
|
|
440
|
+
html` <complex-object-combobox
|
|
441
|
+
name="combo"
|
|
442
|
+
label="Display only the label once selected"
|
|
443
|
+
@model-value-changed="${onModelValueChanged}"
|
|
444
|
+
>
|
|
445
|
+
${lazyRender(
|
|
446
|
+
listboxComplexData.map(
|
|
447
|
+
entry => html`
|
|
446
448
|
<lion-option .choiceValue="${entry.label}">
|
|
447
449
|
<div data-key>${entry.label}</div>
|
|
448
450
|
<small>${entry.description}</small>
|
|
449
451
|
</lion-option>
|
|
450
452
|
`,
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
</complex-object-combobox>`;
|
|
453
|
+
),
|
|
454
|
+
)}
|
|
455
|
+
</complex-object-combobox>`;
|
|
454
456
|
```
|
|
455
457
|
|
|
456
458
|
## Listbox compatibility
|
|
457
459
|
|
|
458
460
|
All configurations that can be applied to `lion-listbox`, can be applied to `lion-combobox` as well.
|
|
459
|
-
See the [listbox documentation](https://github.com/ing-bank/lion/blob/
|
|
461
|
+
See the [listbox documentation](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/listbox/overview.md) for more information.
|
|
@@ -54,6 +54,6 @@ import '@lion/ui/define/lion-dialog.js';
|
|
|
54
54
|
## Changing the configuration
|
|
55
55
|
|
|
56
56
|
You can use the `.config` property on the dialog to change the configuration.
|
|
57
|
-
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/
|
|
57
|
+
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/overlays/configuration.md).
|
|
58
58
|
|
|
59
59
|
The `config` property uses a setter to merge the passed configuration with the current, so you only **overwrite what you pass** when updating `config`.
|
|
@@ -20,9 +20,9 @@ export const main = () => html`
|
|
|
20
20
|
|
|
21
21
|
We have three specific fieldset implementations:
|
|
22
22
|
|
|
23
|
-
- [form](https://github.com/ing-bank/lion/blob/
|
|
24
|
-
- [checkbox-group](https://github.com/ing-bank/lion/blob/
|
|
25
|
-
- [radio-group](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- [form](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/form/overview.md)
|
|
24
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/checkbox-group/overview.md)
|
|
25
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/radio-group/overview.md)
|
|
26
26
|
|
|
27
27
|
A native fieldset element should always have a legend-element for a11y purposes.
|
|
28
28
|
However, our fieldset element is not native and should not have a legend-element.
|
|
@@ -31,8 +31,8 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
33
|
- Easy retrieval of form data based on field names
|
|
34
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
35
|
-
- Can have [validate](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/interaction-states.md)
|
|
35
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
|
|
36
36
|
- Can disable input fields on fieldset level
|
|
37
37
|
- Accessible out of the box
|
|
38
38
|
|
|
@@ -8,7 +8,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
A web component that enhances the functionality of the native `form` component.
|
|
11
|
-
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/
|
|
11
|
+
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/overview.md).
|
|
12
12
|
|
|
13
13
|
```js preview-story
|
|
14
14
|
export const main = () => {
|
|
@@ -37,11 +37,11 @@ export const main = () => {
|
|
|
37
37
|
- Data synchronization with models
|
|
38
38
|
- Easy retrieval of form data based on field names
|
|
39
39
|
- Advanced validation possibilities
|
|
40
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/interaction-states.md)
|
|
41
41
|
- Registration mechanism for form controls
|
|
42
42
|
- Accessible out of the box
|
|
43
43
|
|
|
44
|
-
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/
|
|
44
|
+
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/overview.md).
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -26,7 +26,7 @@ icons.addIconResolver('lion', (iconset, name) => {
|
|
|
26
26
|
## Icon sets
|
|
27
27
|
|
|
28
28
|
Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
|
|
29
|
-
See the [system documentation](https://github.com/ing-bank/lion/blob/
|
|
29
|
+
See the [system documentation](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
|
|
30
30
|
|
|
31
31
|
```js preview-story
|
|
32
32
|
export const iconSets = () => html`
|
|
@@ -23,7 +23,7 @@ export const main = () => html`<lion-input label="First Name"></lion-input>`;
|
|
|
23
23
|
- **before**: does not have an active use case yet, but the option is in place.
|
|
24
24
|
- **after**: can be used to show a currency or percentage.
|
|
25
25
|
- Delegates attributes like `type`, `disabled`, `placeholder` and `readonly` to the native input.
|
|
26
|
-
- Can make use of [validation](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
- Can make use of [validation](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md).
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
@@ -20,8 +20,9 @@ Can be provided via the `label-sr-only` boolean attribute.
|
|
|
20
20
|
The label will be hidden, but still readable by screen readers.
|
|
21
21
|
|
|
22
22
|
```js preview-story
|
|
23
|
-
export const labelSrOnly = () =>
|
|
24
|
-
|
|
23
|
+
export const labelSrOnly = () => html`
|
|
24
|
+
<lion-input label-sr-only label="Input" name="input"></lion-input>
|
|
25
|
+
`;
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
> Note: Once we support the ElementInternals API, the equivalent will be `<lion-input aria-label="Input" name="input"></lion-input>`
|
|
@@ -24,13 +24,13 @@ export const main = () => {
|
|
|
24
24
|
|
|
25
25
|
## Features
|
|
26
26
|
|
|
27
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
28
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
27
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
28
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
29
29
|
- Option to show currency as a suffix
|
|
30
30
|
- Option to override locale to change the formatting and parsing
|
|
31
31
|
- Option to provide additional format options overrides
|
|
32
32
|
- Default label in different languages
|
|
33
|
-
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
34
34
|
- IsNumber (default)
|
|
35
35
|
- MinNumber
|
|
36
36
|
- MaxNumber
|
|
@@ -16,11 +16,11 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
20
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
19
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
20
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
21
21
|
- Option to override locale to change the formatting and parsing
|
|
22
22
|
- Default label in different languages
|
|
23
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
24
24
|
- IsDate (default)
|
|
25
25
|
- MinDate
|
|
26
26
|
- MaxDate
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
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.
|
|
4
4
|
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.
|
|
5
|
-
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/
|
|
5
|
+
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-date/overview.md) for this.
|
|
6
6
|
|
|
7
7
|
```js script
|
|
8
8
|
import { html } from '@mdjs/mdjs-preview';
|
|
@@ -18,11 +18,11 @@ export const main = () => {
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
20
|
- Input field with a datepicker to help to choose a date
|
|
21
|
-
- Based on our [input-date](https://github.com/ing-bank/lion/blob/
|
|
22
|
-
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/
|
|
23
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Based on our [input-date](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-date/overview.md)
|
|
22
|
+
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/calendar/overview.md) inside the datepicker
|
|
23
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
24
24
|
- Option to overwrite locale to change the formatting and parsing
|
|
25
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
26
26
|
- IsDate (default)
|
|
27
27
|
- MinDate
|
|
28
28
|
- MaxDate
|
|
@@ -15,8 +15,8 @@ export const main = () => {
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
19
|
-
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
19
|
+
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
20
20
|
- IsEmail (default)
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
@@ -15,7 +15,7 @@ export const main = () => {
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
19
19
|
- Default labels and validation messages in different languages
|
|
20
20
|
- Options for multi file upload and drop-zone.
|
|
21
21
|
|
|
@@ -16,9 +16,9 @@ export const main = () => {
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
19
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
20
20
|
- Default label in different languages
|
|
21
|
-
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
22
22
|
- IsIBAN (default)
|
|
23
23
|
- IsCountryIBAN
|
|
24
24
|
- Parses IBANs automatically
|
|
@@ -13,11 +13,11 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md).
|
|
17
17
|
- Shows `modelValue` and `unit` above the range input.
|
|
18
18
|
- Shows `min` and `max` value after the range input.
|
|
19
19
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
|
20
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
20
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
@@ -18,7 +18,7 @@ loadDefaultFeedbackMessages();
|
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md).
|
|
22
22
|
- Set `min` and `max` value to define the range.
|
|
23
23
|
- Set `step` value in integer or decimal to increase and decrease the value.
|
|
24
24
|
- Use `ArrowUp` or `ArrowDown` to update the value.
|
|
@@ -39,7 +39,7 @@ export const main = () => {
|
|
|
39
39
|
|
|
40
40
|
## Features
|
|
41
41
|
|
|
42
|
-
- Extends our [input](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- Extends our [input](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input/overview.md)
|
|
43
43
|
- Shows a mobile telephone keypad on mobile (by having a native `<input inputmode="tel">` inside)
|
|
44
44
|
- Can be configured with a list of allowed region codes
|
|
45
45
|
- Will be preconfigured with region derived from locale
|
|
@@ -22,7 +22,7 @@ Say we have the following telephone number from Madrid, Spain: `+34919930432`.
|
|
|
22
22
|
It contains a [country code](https://en.wikipedia.org/wiki/Country_code) (34), an [area code](https://en.wikipedia.org/wiki/Telephone_numbering_plan#Area_code) (91) and a [dial code](https://en.wikipedia.org/wiki/Mobile_dial_code) (+34 91).
|
|
23
23
|
Input Tel interprets phone numbers based on their [region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2): a two character long region representation('ES' in the telephone number above).
|
|
24
24
|
|
|
25
|
-
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/#allowed-regions) are not configured,
|
|
26
26
|
all of them will be supported as values of Input Tel.
|
|
27
27
|
|
|
28
28
|
```js story
|
|
@@ -37,11 +37,11 @@ export const regionCodesTable = () => {
|
|
|
37
37
|
The active region (accessible via readonly accessor `.activeRegion`) determines how validation and formatting
|
|
38
38
|
should be applied. It is dependent on the following factors:
|
|
39
39
|
|
|
40
|
-
- [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
41
|
-
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
- [allowed regions](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
|
|
41
|
+
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
|
|
42
42
|
- the modelValue or viewValue: once it contains sufficient info to derive its region code (and
|
|
43
|
-
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
44
|
-
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
43
|
+
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/#allowed-regions) if configured)
|
|
44
|
+
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/#allowed-regions) if configured)
|
|
45
45
|
|
|
46
46
|
What follows from the list above is that .activeRegion can change dynamically, after a value
|
|
47
47
|
change in the text box by the user (or when locales or allowed regions would be changed by the
|
|
@@ -130,7 +130,7 @@ export const heuristic = () => {
|
|
|
130
130
|
Once it is configured, validation and formatting will be restricted to those
|
|
131
131
|
values that are present in this list.
|
|
132
132
|
|
|
133
|
-
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/
|
|
133
|
+
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel-dropdown/index.md), only allowed regions will
|
|
134
134
|
> be shown in the dropdown list.
|
|
135
135
|
|
|
136
136
|
```js preview-story
|
|
@@ -19,7 +19,7 @@ export const main = () => {
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/components/input-tel/overview.md)
|
|
23
23
|
- Shows dropdown list with all possible regions
|
|
24
24
|
- Shows only allowed regions in dropdown list when .allowedRegions is configured
|
|
25
25
|
- Highlights regions on top of dropdown list when .preferredRegions is configured
|
|
@@ -46,9 +46,15 @@ export class IntlInputTelDropdown extends ScopedElementsMixin(LionInputTelDropdo
|
|
|
46
46
|
border-radius: 4px;
|
|
47
47
|
-webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
|
|
48
48
|
box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
|
|
49
|
-
-webkit-transition:
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
-webkit-transition:
|
|
50
|
+
border-color ease-in-out 0.15s,
|
|
51
|
+
-webkit-box-shadow ease-in-out 0.15s;
|
|
52
|
+
-o-transition:
|
|
53
|
+
border-color ease-in-out 0.15s,
|
|
54
|
+
box-shadow ease-in-out 0.15s;
|
|
55
|
+
transition:
|
|
56
|
+
border-color ease-in-out 0.15s,
|
|
57
|
+
box-shadow ease-in-out 0.15s;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
.input-group__input {
|
|
@@ -64,8 +70,12 @@ export class IntlInputTelDropdown extends ScopedElementsMixin(LionInputTelDropdo
|
|
|
64
70
|
:host([focused]) .input-group__container {
|
|
65
71
|
border-color: #66afe9;
|
|
66
72
|
outline: 0;
|
|
67
|
-
-webkit-box-shadow:
|
|
68
|
-
|
|
73
|
+
-webkit-box-shadow:
|
|
74
|
+
inset 0 1px 1px rgb(0 0 0 / 8%),
|
|
75
|
+
0 0 8px rgb(102 175 233 / 60%);
|
|
76
|
+
box-shadow:
|
|
77
|
+
inset 0 1px 1px rgb(0 0 0 / 8%),
|
|
78
|
+
0 0 8px rgb(102 175 233 / 60%);
|
|
69
79
|
}
|
|
70
80
|
`,
|
|
71
81
|
];
|
|
@@ -139,4 +139,4 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
|
|
|
139
139
|
|
|
140
140
|
## Validation
|
|
141
141
|
|
|
142
|
-
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/
|
|
142
|
+
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/3829e2dce5fce180672f666257d10513da30e1d5/docs/fundamentals/systems/form/validate.md).
|