@lion/ui 0.16.1 → 0.17.0-menu-system.1
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/collapsible.js +1 -0
- package/components/button/src/LionButton.js +5 -0
- package/components/button/test-suites/LionButton.suite.js +1 -0
- package/components/calendar/src/LionCalendar.js +2 -0
- package/components/collapsible/src/DisclosureMixin.js +313 -0
- package/components/collapsible/types/DisclosureMixinTypes.ts +48 -0
- package/components/combobox/src/utils/makeMatchingTextBold.js +3 -1
- package/components/combobox/test/lion-combobox.test.js +105 -0
- package/components/form-core/src/form-group/FormGroupMixin.js +7 -0
- package/components/form-core/src/registration/FormRegistrarMixin.js +11 -0
- package/components/form-core/test/FormControlMixin.test.js +1 -0
- package/components/form-core/test/validate/Validator.test.js +2 -0
- package/components/form-core/test-suites/ValidateMixin.suite.js +2 -0
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +1 -0
- package/components/input-datepicker/src/LionInputDatepicker.js +6 -2
- package/components/input-datepicker/src/localizeNamespaceLoader.js +1 -0
- package/components/input-datepicker/test/lion-input-datepicker.test.js +17 -2
- package/components/input-datepicker/translations/bg.js +1 -1
- package/components/input-datepicker/translations/cs.js +1 -1
- package/components/input-datepicker/translations/de.js +1 -1
- package/components/input-datepicker/translations/en.js +1 -1
- package/components/input-datepicker/translations/es.js +1 -1
- package/components/input-datepicker/translations/fr.js +1 -1
- package/components/input-datepicker/translations/hu.js +1 -1
- package/components/input-datepicker/translations/it.js +1 -1
- package/components/input-datepicker/translations/nl.js +1 -1
- package/components/input-datepicker/translations/pl.js +1 -1
- package/components/input-datepicker/translations/ro.js +1 -1
- package/components/input-datepicker/translations/ru.js +1 -1
- package/components/input-datepicker/translations/sk.js +1 -1
- package/components/input-datepicker/translations/tr.js +1 -1
- package/components/input-datepicker/translations/uk.js +1 -1
- package/components/input-datepicker/translations/zh.js +1 -1
- package/components/input-stepper/src/LionInputStepper.js +15 -7
- package/components/input-stepper/test-suites/lion-input-stepper.suite.js +28 -4
- package/components/localize/test/date/formatDate.test.js +1 -0
- package/components/menu/CHANGELOG.md +37 -0
- package/components/menu/README.md +335 -0
- package/components/menu/index.js +2 -0
- package/components/menu/lion-menu-overlay.js +3 -0
- package/components/menu/lion-menu.js +3 -0
- package/components/menu/lion-spinbutton.js +3 -0
- package/components/menu/lion-toolbar.js +3 -0
- package/components/menu/lion-tree.js +3 -0
- package/components/menu/package.json +46 -0
- package/components/menu/requirements.temp.md +12 -0
- package/components/menu/src/InteractiveListMixin.js +796 -0
- package/components/menu/src/LionMenu.js +250 -0
- package/components/menu/src/LionMenuHybrid.js +46 -0
- package/components/menu/src/LionMenuOverlay.js +155 -0
- package/components/menu/src/LionSpinbutton.js +213 -0
- package/components/menu/src/LionToolbar.js +94 -0
- package/components/menu/src/LionTree.js +52 -0
- package/components/menu/src/MultiLevelListMixin.js +274 -0
- package/components/menu/src/utils/isInView.js +26 -0
- package/components/menu/src/utils/listItemInteractions.js +104 -0
- package/components/menu/src/utils/uuid.js +3 -0
- package/components/menu/test/lion-menu.test.js +3 -0
- package/components/menu/test-suites/InteractiveListMixin.suite.js +142 -0
- package/components/menu/types/InteractiveListMixinTypes.d.ts +82 -0
- package/components/navigation-bar/README.md +1 -0
- package/components/navigation-bar/src/LionNavigationBar.js +422 -0
- package/components/navigation-bar/src/types.js +41 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/OverlayController.js +249 -150
- package/components/overlays/src/OverlayMixin.js +76 -12
- package/components/overlays/src/OverlaysManager.js +98 -0
- package/components/overlays/src/overlayShadowDomStyle.js +2 -2
- package/components/overlays/src/utils/adopt-styles.js +2 -1
- package/components/overlays/src/utils/get-focusable-elements.js +4 -0
- package/components/overlays/src/utils/is-equal-config.js +10 -6
- package/components/overlays/test/OverlayController.test.js +120 -7
- package/components/overlays/test/utils-tests/is-equal-config.test.js +1 -1
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/types/OverlayConfig.ts +25 -4
- package/components/select-rich/test/lion-select-rich.test.js +3 -0
- package/custom-elements.json +12950 -2486
- package/dist-types/components/button/src/LionButton.d.ts +1 -0
- package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
- package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts +3 -0
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts.map +1 -0
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts +24 -0
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts.map +1 -0
- package/dist-types/components/combobox/src/utils/makeMatchingTextBold.d.ts.map +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +3 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/registration/FormRegistrarMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +4 -2
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
- package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.d.ts.map +1 -1
- package/dist-types/components/menu/index.d.ts +3 -0
- package/dist-types/components/menu/index.d.ts.map +1 -0
- package/dist-types/components/menu/lion-menu-overlay.d.ts +2 -0
- package/dist-types/components/menu/lion-menu-overlay.d.ts.map +1 -0
- package/dist-types/components/menu/lion-menu.d.ts +2 -0
- package/dist-types/components/menu/lion-menu.d.ts.map +1 -0
- package/dist-types/components/menu/lion-spinbutton.d.ts +2 -0
- package/dist-types/components/menu/lion-spinbutton.d.ts.map +1 -0
- package/dist-types/components/menu/lion-toolbar.d.ts +2 -0
- package/dist-types/components/menu/lion-toolbar.d.ts.map +1 -0
- package/dist-types/components/menu/lion-tree.d.ts +2 -0
- package/dist-types/components/menu/lion-tree.d.ts.map +1 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts +611 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenu.d.ts +563 -0
- package/dist-types/components/menu/src/LionMenu.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts +19 -0
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts +1007 -0
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionSpinbutton.d.ts +58 -0
- package/dist-types/components/menu/src/LionSpinbutton.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionToolbar.d.ts +8 -0
- package/dist-types/components/menu/src/LionToolbar.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionTree.d.ts +445 -0
- package/dist-types/components/menu/src/LionTree.d.ts.map +1 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +493 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts +9 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +42 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/uuid.d.ts +2 -0
- package/dist-types/components/menu/src/utils/uuid.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +13 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts +238 -0
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts.map +1 -0
- package/dist-types/components/navigation-bar/src/types.d.ts +85 -0
- package/dist-types/components/navigation-bar/src/types.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +10 -20
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts +3 -0
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlaysManager.d.ts +31 -0
- package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
- package/dist-types/components/overlays/src/utils/get-focusable-elements.d.ts.map +1 -1
- package/dist-types/components/overlays/src/utils/is-equal-config.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +11 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +12 -2
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/exports/define/lion-item.d.ts +2 -0
- package/dist-types/exports/define/lion-item.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu-overlay.d.ts +2 -0
- package/dist-types/exports/define/lion-menu-overlay.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu.d.ts +2 -0
- package/dist-types/exports/define/lion-menu.d.ts.map +1 -0
- package/dist-types/exports/define/lion-navigation-bar.d.ts +2 -0
- package/dist-types/exports/define/lion-navigation-bar.d.ts.map +1 -0
- package/dist-types/exports/define/lion-toolbar.d.ts +2 -0
- package/dist-types/exports/define/lion-toolbar.d.ts.map +1 -0
- package/dist-types/exports/define/lion-tree.d.ts +2 -0
- package/dist-types/exports/define/lion-tree.d.ts.map +1 -0
- package/dist-types/exports/menu.d.ts +7 -0
- package/dist-types/exports/menu.d.ts.map +1 -0
- package/dist-types/exports/navigation-bar.d.ts +2 -0
- package/dist-types/exports/navigation-bar.d.ts.map +1 -0
- package/dist-types/exports/overlays.d.ts +3 -0
- package/dist-types/exports/overlays.d.ts.map +1 -1
- package/dist-types/exports/types/overlays.d.ts +1 -0
- package/dist-types/exports/types/overlays.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- 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/form/use-cases.md +2 -2
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/index.md +1 -1
- package/docs/components/input/overview.md +1 -1
- 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-datepicker/use-cases.md +16 -1
- 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/api-table.md +1 -1
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-stepper/use-cases.md +26 -0
- 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/listbox/use-cases.md +1 -1
- package/docs/components/menu/api-table.md +450 -0
- package/docs/components/menu/applyMenuDemoStyles.js +173 -0
- package/docs/components/menu/extensions.md +216 -0
- package/docs/components/menu/index.md +13 -0
- package/docs/components/menu/overview.md +422 -0
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +1 -1
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- 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 +18 -18
- 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/interaction-states.md +0 -1
- 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 +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/localize/text.md +1 -1
- package/docs/fundamentals/systems/overlays/api-table.md +92 -45
- 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 +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -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/how-to/index.md +14 -0
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -2
- package/exports/collapsible.js +1 -0
- package/exports/define/lion-item.js +3 -0
- package/exports/define/lion-menu-overlay.js +3 -0
- package/exports/define/lion-menu.js +3 -0
- package/exports/define/lion-navigation-bar.js +3 -0
- package/exports/define/lion-toolbar.js +3 -0
- package/exports/define/lion-tree.js +3 -0
- package/exports/menu.js +6 -0
- package/exports/navigation-bar.js +1 -0
- package/exports/overlays.js +6 -0
- package/exports/types/overlays.ts +1 -0
- package/menu.js +6 -0
- package/navigation-bar.js +1 -0
- package/overlays.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Menu: Overview'
|
|
3
|
+
parts:
|
|
4
|
+
- Menu
|
|
5
|
+
- Overview
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'Menu: Overview'
|
|
8
|
+
order: 10
|
|
9
|
+
parent: Menu
|
|
10
|
+
title: Overview
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Menu: Overview
|
|
14
|
+
|
|
15
|
+
A menu is a widget that offers a list of choices to the user, such as a set of actions or functions. A menu is usually opened, or made visible, by activating a menu button, choosing an item in a menu that opens a sub menu, or by invoking a command, such as Shift + F10 in Windows, that opens a context specific menu. When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu.
|
|
16
|
+
|
|
17
|
+
A menu that is visually persistent is a menubar. A menubar is typically horizontal and is often used to create a menu bar similar to those found near the top of the window in many desktop applications, offering the user quick access to a consistent set of commands.
|
|
18
|
+
|
|
19
|
+
A common convention for indicating that a menu item launches a dialog box is to append "…" (ellipsis) to the menu item label, e.g., "Save as …".
|
|
20
|
+
|
|
21
|
+
> From [menu wai-aria best practices](https://www.w3.org/TR/wai-aria-practices/#menu)
|
|
22
|
+
|
|
23
|
+
```js script
|
|
24
|
+
import { html } from 'lit';
|
|
25
|
+
import '@lion/ui/define/lion-item.js';
|
|
26
|
+
import '@lion/ui/define/lion-menu.js';
|
|
27
|
+
import '@lion/ui/define/lion-menu-overlay.js';
|
|
28
|
+
import '@lion/ui/define/lion-tree.js';
|
|
29
|
+
import '@lion/ui/define/lion-toolbar.js';
|
|
30
|
+
import { applyMenuDemoStyles } from './applyMenuDemoStyles.js';
|
|
31
|
+
|
|
32
|
+
applyMenuDemoStyles();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```js preview-story
|
|
36
|
+
export const menuButton = () => html`
|
|
37
|
+
<nav>
|
|
38
|
+
<button data-invoker>Open menu</button>
|
|
39
|
+
<lion-menu-overlay>
|
|
40
|
+
<div role="menuitem">Go to Definition</div>
|
|
41
|
+
<div role="menuitem">Go to Type Definition</div>
|
|
42
|
+
<div>
|
|
43
|
+
<button role="menuitem" data-invoker>Peek</button>
|
|
44
|
+
<lion-menu-overlay>
|
|
45
|
+
<div role="menuitem">Peek Call Hierarchy</div>
|
|
46
|
+
<div role="separator"></div>
|
|
47
|
+
<div role="menuitem">Peek Definition</div>
|
|
48
|
+
</lion-menu-overlay>
|
|
49
|
+
</div>
|
|
50
|
+
<div role="separator"></div>
|
|
51
|
+
<div role="menuitem">Find all References</div>
|
|
52
|
+
</lion-menu-overlay>
|
|
53
|
+
</nav>
|
|
54
|
+
`;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```js preview-story
|
|
58
|
+
export const menuButtonZ = () => html`
|
|
59
|
+
<nav>
|
|
60
|
+
<button data-invoker for="menu">Open menu</button>
|
|
61
|
+
<lion-menu id="menu">
|
|
62
|
+
<lion-menuitem> Go to Definition </lion-menuitem>
|
|
63
|
+
<lion-menuitem> Go to Type Definition </lion-menuitem>
|
|
64
|
+
<lion-menuitem>
|
|
65
|
+
<button slot="invoker">Peek</button>
|
|
66
|
+
<lion-menu>
|
|
67
|
+
<lion-menuitem type="radio"> Peek Call Hierarchy </lion-menuitem>
|
|
68
|
+
<div role="separator"></div>
|
|
69
|
+
<lion-menuitem type="radio"> Peek Definition </lion-menuitem>
|
|
70
|
+
</lion-menu>
|
|
71
|
+
</lion-menuitem>
|
|
72
|
+
<div role="separator"></div>
|
|
73
|
+
<lion-menuitem type="checkbox"> Find all References </lion-menuitem>
|
|
74
|
+
</lion-menu>
|
|
75
|
+
</nav>
|
|
76
|
+
`;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Groups, menuitemradios and menuitemcheckboxes
|
|
80
|
+
|
|
81
|
+
From [wai aria menu fragment](https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-2/menubar-2.html)
|
|
82
|
+
|
|
83
|
+
```js preview-story
|
|
84
|
+
export const groups = () => html`
|
|
85
|
+
<lion-menu bar invoker-interaction="hover">
|
|
86
|
+
<div>
|
|
87
|
+
<div role="menuitem">Font</div>
|
|
88
|
+
<lion-menu-overlay aria-label="Font">
|
|
89
|
+
<div role="menuitemradio">Sans-serif</div>
|
|
90
|
+
<div role="menuitemradio">Serif</div>
|
|
91
|
+
<div role="menuitemradio">Monospace</div>
|
|
92
|
+
<div role="menuitemradio">Fantasy</div>
|
|
93
|
+
</lion-menu-overlay>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<div role="menuitem">Style/Color</div>
|
|
97
|
+
<lion-menu-overlay aria-label="Style/Color">
|
|
98
|
+
<div role="menuitemcheckbox" aria-checked="true">Bold</div>
|
|
99
|
+
<div role="menuitemcheckbox" aria-checked="true">Italic</div>
|
|
100
|
+
<div role="separator"></div>
|
|
101
|
+
<div role="group" aria-label="Text Color">
|
|
102
|
+
<div role="menuitemradio" aria-checked="false">Black</div>
|
|
103
|
+
<div role="menuitemradio" aria-checked="false">Blue</div>
|
|
104
|
+
<div role="menuitemradio" aria-checked="true">Red</div>
|
|
105
|
+
<div role="menuitemradio" aria-checked="false">Green</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div role="separator"></div>
|
|
108
|
+
<div role="group" aria-label="Text Decoration">
|
|
109
|
+
<div role="menuitemradio" aria-checked="true">None</div>
|
|
110
|
+
<div role="menuitemradio" aria-checked="false">Overline</div>
|
|
111
|
+
<div role="menuitemradio" aria-checked="false">Line-through</div>
|
|
112
|
+
<div role="menuitemradio" aria-checked="false">Underline</div>
|
|
113
|
+
</div>
|
|
114
|
+
</lion-menu-overlay>
|
|
115
|
+
</div>
|
|
116
|
+
</lion-menu>
|
|
117
|
+
`;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Tree
|
|
121
|
+
|
|
122
|
+
```js preview-story
|
|
123
|
+
export const tree = () => html`
|
|
124
|
+
<lion-tree>
|
|
125
|
+
<div role="treeitem">Fruits</div>
|
|
126
|
+
<lion-tree>
|
|
127
|
+
<div role="treeitem">Peek Call Hierarchy</div>
|
|
128
|
+
<div role="treeitem">Peek Definition</div>
|
|
129
|
+
</lion-tree>
|
|
130
|
+
<div role="treeitem">Vegetables</div>
|
|
131
|
+
<lion-tree>
|
|
132
|
+
<div role="treeitem">Peek Call Hierarchy</div>
|
|
133
|
+
<div>
|
|
134
|
+
<div role="treeitem">Peek</div>
|
|
135
|
+
<lion-tree>
|
|
136
|
+
<div role="treeitem">Peek Call Hierarchy</div>
|
|
137
|
+
<div role="treeitem">Peek Definition</div>
|
|
138
|
+
</lion-tree>
|
|
139
|
+
</div>
|
|
140
|
+
</lion-tree>
|
|
141
|
+
<div role="treeitem">Grains</div>
|
|
142
|
+
<lion-tree>
|
|
143
|
+
<div role="treeitem">Peek Call Hierarchy</div>
|
|
144
|
+
<div role="treeitem">Peek Definition</div>
|
|
145
|
+
</lion-tree>
|
|
146
|
+
</lion-tree>
|
|
147
|
+
`;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Disclosure menu
|
|
151
|
+
|
|
152
|
+
See <https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-navigation.html>
|
|
153
|
+
|
|
154
|
+
```js preview-story
|
|
155
|
+
export const disclosureMenu = () => html`
|
|
156
|
+
<nav aria-label="Mythical University">
|
|
157
|
+
<lion-menu bar ._activeMode="${'tabbable-disclosure'}">
|
|
158
|
+
<div role="listitem">
|
|
159
|
+
<button data-invoker>About</button>
|
|
160
|
+
<lion-menu-overlay>
|
|
161
|
+
<div role="listitem">
|
|
162
|
+
<a href="#mythical-page-content">Overview</a>
|
|
163
|
+
</div>
|
|
164
|
+
<div role="listitem">
|
|
165
|
+
<a href="#mythical-page-content">Administration</a>
|
|
166
|
+
</div>
|
|
167
|
+
<div role="listitem">
|
|
168
|
+
<a href="#mythical-page-content">Facts</a>
|
|
169
|
+
</div>
|
|
170
|
+
<div role="listitem">
|
|
171
|
+
<a href="#mythical-page-content">Campus Tours</a>
|
|
172
|
+
</div>
|
|
173
|
+
</lion-menu-overlay>
|
|
174
|
+
</div>
|
|
175
|
+
<div role="listitem">
|
|
176
|
+
<button data-invoker>Admissions</button>
|
|
177
|
+
<lion-menu-overlay id="id_admissions_menu">
|
|
178
|
+
<div role="listitem">
|
|
179
|
+
<a href="#mythical-page-content">Apply</a>
|
|
180
|
+
</div>
|
|
181
|
+
<div role="listitem">
|
|
182
|
+
<a href="#mythical-page-content">Tuition</a>
|
|
183
|
+
</div>
|
|
184
|
+
<div role="listitem">
|
|
185
|
+
<a href="#mythical-page-content">Sign Up</a>
|
|
186
|
+
</div>
|
|
187
|
+
<div role="listitem">
|
|
188
|
+
<a href="#mythical-page-content">Visit</a>
|
|
189
|
+
</div>
|
|
190
|
+
<div role="listitem">
|
|
191
|
+
<a href="#mythical-page-content">Photo Tour</a>
|
|
192
|
+
</div>
|
|
193
|
+
<div role="listitem">
|
|
194
|
+
<a href="#mythical-page-content">Connect</a>
|
|
195
|
+
</div>
|
|
196
|
+
</lion-menu-overlay>
|
|
197
|
+
</div>
|
|
198
|
+
<div role="listitem">
|
|
199
|
+
<button data-invoker>Academics</button>
|
|
200
|
+
<lion-menu-overlay>
|
|
201
|
+
<div role="listitem">
|
|
202
|
+
<a href="#mythical-page-content">Colleges & Schools</a>
|
|
203
|
+
</div>
|
|
204
|
+
<div role="listitem">
|
|
205
|
+
<a href="#mythical-page-content">Programs of Study</a>
|
|
206
|
+
</div>
|
|
207
|
+
<div role="listitem">
|
|
208
|
+
<a href="#mythical-page-content">Honors Programs</a>
|
|
209
|
+
</div>
|
|
210
|
+
<div role="listitem">
|
|
211
|
+
<a href="#mythical-page-content">Online Courses</a>
|
|
212
|
+
</div>
|
|
213
|
+
<div role="listitem">
|
|
214
|
+
<a href="#mythical-page-content">Course Explorer</a>
|
|
215
|
+
</div>
|
|
216
|
+
<div role="listitem">
|
|
217
|
+
<a href="#mythical-page-content">Register for Class</a>
|
|
218
|
+
</div>
|
|
219
|
+
<div role="listitem">
|
|
220
|
+
<a href="#mythical-page-content">Academic Calendar</a>
|
|
221
|
+
</div>
|
|
222
|
+
<div role="listitem">
|
|
223
|
+
<a href="#mythical-page-content">Transcripts</a>
|
|
224
|
+
</div>
|
|
225
|
+
</lion-menu-overlay>
|
|
226
|
+
</div>
|
|
227
|
+
</lion-menu>
|
|
228
|
+
</nav>
|
|
229
|
+
`;
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Disclosure menu with anchors on L1
|
|
233
|
+
|
|
234
|
+
See <https://codepen.io/aardrian/pen/abyXxGw>
|
|
235
|
+
|
|
236
|
+
```js preview-story
|
|
237
|
+
export const disclosureMenuWithAnchorsOnL1 = () => html`
|
|
238
|
+
<nav aria-label="Mythical University">
|
|
239
|
+
<lion-menu bar ._activeMode="${'tabbable-disclosure'}">
|
|
240
|
+
<div role="listitem">
|
|
241
|
+
<a href="#mythical-page-content">About</a>
|
|
242
|
+
<button data-invoker aria-label="More About Pages">▼</button>
|
|
243
|
+
<lion-menu-overlay>
|
|
244
|
+
<div role="listitem">
|
|
245
|
+
<a href="#mythical-page-content">Overview</a>
|
|
246
|
+
</div>
|
|
247
|
+
<div role="listitem">
|
|
248
|
+
<a href="#mythical-page-content">Administration</a>
|
|
249
|
+
</div>
|
|
250
|
+
<div role="listitem">
|
|
251
|
+
<a href="#mythical-page-content">Facts</a>
|
|
252
|
+
</div>
|
|
253
|
+
<div role="listitem">
|
|
254
|
+
<a href="#mythical-page-content">Campus Tours</a>
|
|
255
|
+
</div>
|
|
256
|
+
</lion-menu-overlay>
|
|
257
|
+
</div>
|
|
258
|
+
<div role="listitem">
|
|
259
|
+
<a href="#mythical-page-content">Admissions</a>
|
|
260
|
+
<button data-invoker aria-label="More Admissions Pages">
|
|
261
|
+
▼
|
|
262
|
+
</button>
|
|
263
|
+
<lion-menu-overlay id="id_admissions_menu">
|
|
264
|
+
<div role="listitem">
|
|
265
|
+
<a href="#mythical-page-content">Apply</a>
|
|
266
|
+
</div>
|
|
267
|
+
<div role="listitem">
|
|
268
|
+
<a href="#mythical-page-content">Tuition</a>
|
|
269
|
+
</div>
|
|
270
|
+
<div role="listitem">
|
|
271
|
+
<a href="#mythical-page-content">Sign Up</a>
|
|
272
|
+
</div>
|
|
273
|
+
<div role="listitem">
|
|
274
|
+
<a href="#mythical-page-content">Visit</a>
|
|
275
|
+
</div>
|
|
276
|
+
<div role="listitem">
|
|
277
|
+
<a href="#mythical-page-content">Photo Tour</a>
|
|
278
|
+
</div>
|
|
279
|
+
<div role="listitem">
|
|
280
|
+
<a href="#mythical-page-content">Connect</a>
|
|
281
|
+
</div>
|
|
282
|
+
</lion-menu-overlay>
|
|
283
|
+
</div>
|
|
284
|
+
<div role="listitem">
|
|
285
|
+
<a href="#mythical-page-content">Academics</a>
|
|
286
|
+
<button data-invoker aria-label="More Academics Pages">▼</button>
|
|
287
|
+
<lion-menu-overlay>
|
|
288
|
+
<div role="listitem">
|
|
289
|
+
<a href="#mythical-page-content">Colleges & Schools</a>
|
|
290
|
+
</div>
|
|
291
|
+
<div role="listitem">
|
|
292
|
+
<a href="#mythical-page-content">Programs of Study</a>
|
|
293
|
+
</div>
|
|
294
|
+
<div role="listitem">
|
|
295
|
+
<a href="#mythical-page-content">Honors Programs</a>
|
|
296
|
+
</div>
|
|
297
|
+
<div role="listitem">
|
|
298
|
+
<a href="#mythical-page-content">Online Courses</a>
|
|
299
|
+
</div>
|
|
300
|
+
<div role="listitem">
|
|
301
|
+
<a href="#mythical-page-content">Course Explorer</a>
|
|
302
|
+
</div>
|
|
303
|
+
<div role="listitem">
|
|
304
|
+
<a href="#mythical-page-content">Register for Class</a>
|
|
305
|
+
</div>
|
|
306
|
+
<div role="listitem">
|
|
307
|
+
<a href="#mythical-page-content">Academic Calendar</a>
|
|
308
|
+
</div>
|
|
309
|
+
<div role="listitem">
|
|
310
|
+
<a href="#mythical-page-content">Transcripts</a>
|
|
311
|
+
</div>
|
|
312
|
+
</lion-menu-overlay>
|
|
313
|
+
</div>
|
|
314
|
+
</ul>
|
|
315
|
+
</nav>
|
|
316
|
+
`;
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Toolbar
|
|
320
|
+
|
|
321
|
+
From [wai aria toolbar](https://www.w3.org/TR/wai-aria-practices-1.2/examples/toolbar/toolbar.html)
|
|
322
|
+
|
|
323
|
+
```js preview-story
|
|
324
|
+
export const toolbar = () => html`
|
|
325
|
+
<lion-toolbar>
|
|
326
|
+
<div>
|
|
327
|
+
<button data-item title="bold" aria-label="Bold">
|
|
328
|
+
<span class="fas fa-bold" aria-hidden="true"></span>
|
|
329
|
+
</button>
|
|
330
|
+
<button data-item title="italic" aria-label="Italic">
|
|
331
|
+
<span class="fas fa-italic" aria-hidden="true"></span>
|
|
332
|
+
</button>
|
|
333
|
+
<button data-item title="underline" aria-label="Underline">
|
|
334
|
+
<span class="fas fa-underline" aria-hidden="true"></span>
|
|
335
|
+
</button>
|
|
336
|
+
</div>
|
|
337
|
+
<div role="separator"></div>
|
|
338
|
+
<div role="radiogroup" aria-label="Text Alignment">
|
|
339
|
+
<button data-item role="radio" aria-label="Text Align Left">
|
|
340
|
+
<span class="fas fa-align-left" aria-hidden="true"></span>
|
|
341
|
+
</button>
|
|
342
|
+
<button data-item role="radio" aria-label="Text Align Center">
|
|
343
|
+
<span class="fas fa-align-center" aria-hidden="true"></span>
|
|
344
|
+
</button>
|
|
345
|
+
<button data-item role="radio" aria-label="Text Align Right">
|
|
346
|
+
<span class="fas fa-align-right" aria-hidden="true"></span>
|
|
347
|
+
</button>
|
|
348
|
+
</div>
|
|
349
|
+
<div role="separator"></div>
|
|
350
|
+
|
|
351
|
+
<lion-spinbutton data-item now="20" min="12" max="40" unit="px"></lion-spinbutton>
|
|
352
|
+
<div role="separator"></div>
|
|
353
|
+
|
|
354
|
+
<div>
|
|
355
|
+
<div role="menuitem">Font</div>
|
|
356
|
+
<lion-menu-overlay aria-label="Font">
|
|
357
|
+
<div role="menuitemradio">Sans-serif</div>
|
|
358
|
+
<div role="menuitemradio">Serif</div>
|
|
359
|
+
<div role="menuitemradio">Monospace</div>
|
|
360
|
+
<div role="menuitemradio">Fantasy</div>
|
|
361
|
+
</lion-menu-overlay>
|
|
362
|
+
</div>
|
|
363
|
+
<div>
|
|
364
|
+
<div role="menuitem">Style/Color</div>
|
|
365
|
+
<lion-menu-overlay aria-label="Style/Color">
|
|
366
|
+
<div role="menuitemcheckbox" aria-checked="true">Bold</div>
|
|
367
|
+
<div role="menuitemcheckbox" aria-checked="true">Italic</div>
|
|
368
|
+
<div role="separator"></div>
|
|
369
|
+
<div role="group" aria-label="Text Color">
|
|
370
|
+
<div role="menuitemradio" aria-checked="false">Black</div>
|
|
371
|
+
<div role="menuitemradio" aria-checked="false">Blue</div>
|
|
372
|
+
<div role="menuitemradio" aria-checked="true">Red</div>
|
|
373
|
+
<div role="menuitemradio" aria-checked="false">Green</div>
|
|
374
|
+
</div>
|
|
375
|
+
<div role="separator"></div>
|
|
376
|
+
<div role="group" aria-label="Text Decoration">
|
|
377
|
+
<div role="menuitemradio" aria-checked="true">None</div>
|
|
378
|
+
<div role="menuitemradio" aria-checked="false">Overline</div>
|
|
379
|
+
<div role="menuitemradio" aria-checked="false">Line-through</div>
|
|
380
|
+
<div role="menuitemradio" aria-checked="false">Underline</div>
|
|
381
|
+
</div>
|
|
382
|
+
</lion-menu-overlay>
|
|
383
|
+
</div>
|
|
384
|
+
</lion-toolbar>
|
|
385
|
+
`;
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## Tree lion-item
|
|
389
|
+
|
|
390
|
+
```js preview-story
|
|
391
|
+
export const treeItem = () => html`
|
|
392
|
+
<lion-tree>
|
|
393
|
+
<lion-item>
|
|
394
|
+
<div>Fruits</div>
|
|
395
|
+
<lion-tree>
|
|
396
|
+
<lion-item>Peek Call Hierarchy</lion-item>
|
|
397
|
+
<lion-item>Peek Definition</lion-item>
|
|
398
|
+
</lion-tree>
|
|
399
|
+
</lion-item>
|
|
400
|
+
<lion-item>
|
|
401
|
+
<div>Vegetables</div>
|
|
402
|
+
<lion-tree>
|
|
403
|
+
<lion-item>Peek Call Hierarchy</lion-item>
|
|
404
|
+
<lion-item>
|
|
405
|
+
<div>Peek</div>
|
|
406
|
+
<lion-tree>
|
|
407
|
+
<lion-item>Peek Call Hierarchy</lion-item>
|
|
408
|
+
<lion-item>Peek Definition</lion-item>
|
|
409
|
+
</lion-tree>
|
|
410
|
+
</lion-item>
|
|
411
|
+
</lion-tree>
|
|
412
|
+
</lion-item>
|
|
413
|
+
<lion-item>
|
|
414
|
+
<div>Grains</div>
|
|
415
|
+
<lion-tree>
|
|
416
|
+
<lion-item>Peek Call Hierarchy</lion-item>
|
|
417
|
+
<lion-item>Peek Definition</lion-item>
|
|
418
|
+
</lion-tree>
|
|
419
|
+
</lion-item>
|
|
420
|
+
</lion-tree>
|
|
421
|
+
`;
|
|
422
|
+
```
|
|
@@ -32,12 +32,12 @@ export const main = () => html`
|
|
|
32
32
|
`;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/form/overview.md)'s serialization result.
|
|
36
|
+
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/select/overview.md) instead.
|
|
37
37
|
|
|
38
38
|
## Features
|
|
39
39
|
|
|
40
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/fieldset/overview.md), it has all the features a fieldset has.
|
|
41
41
|
|
|
42
42
|
- Get or set the checked value of the group:
|
|
43
43
|
- modelValue (default) - `checkedValue()`
|
|
@@ -65,7 +65,7 @@ Or by setting the `disabled` attribute on the entire `lion-select` field.
|
|
|
65
65
|
|
|
66
66
|
## Validation
|
|
67
67
|
|
|
68
|
-
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/
|
|
68
|
+
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/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/form/validate.md).
|
|
69
69
|
|
|
70
70
|
## Rendering and updating select options
|
|
71
71
|
|
|
@@ -29,7 +29,7 @@ You can set the full `modelValue` for each option, which includes the checked pr
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Note, when rendering with the help of the `cache` function imported from `lit/directives/cache.js`, setting model by
|
|
32
|
-
the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/
|
|
32
|
+
the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/select-rich/#setting-model-by-the-choicevalue-property) for more details.
|
|
33
33
|
|
|
34
34
|
### Setting model by the `choiceValue` property
|
|
35
35
|
|
|
@@ -328,7 +328,7 @@ LionSelectRich will give it acces to:
|
|
|
328
328
|
- LionSelectRich itself, via `.hostElement`
|
|
329
329
|
|
|
330
330
|
Code of an advanced custom invoker is shown below (this is the code for the
|
|
331
|
-
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/
|
|
331
|
+
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/select-rich/examples.md)).
|
|
332
332
|
The invoker is usually added in the invoker slot of the LionSelectRich subclass.
|
|
333
333
|
However, it would also be possible for an application developer to provide the invoker
|
|
334
334
|
by putting it in light dom:
|
|
@@ -21,7 +21,7 @@ import './src/lea-tab-panel.js';
|
|
|
21
21
|
|
|
22
22
|
## Lea Tabs
|
|
23
23
|
|
|
24
|
-
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/
|
|
24
|
+
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/blog/ing-open-sources-lion.md).
|
|
25
25
|
|
|
26
26
|
```js preview-story
|
|
27
27
|
export const main = () => html`
|
|
@@ -9,11 +9,11 @@ Here you find more details about what we offer.
|
|
|
9
9
|
|
|
10
10
|
Let's see what each section describes.
|
|
11
11
|
|
|
12
|
-
1. [Systems](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
1. [Systems](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/core/overview.md) <br>
|
|
13
13
|
These are the fundamental systems that power all of our components.
|
|
14
|
-
2. [Tools](https://github.com/ing-bank/lion/blob/
|
|
14
|
+
2. [Tools](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/tools/helpers/overview.md) <br>
|
|
15
15
|
Frontend Tools useful for web development but are not visual and therefore are not components.
|
|
16
|
-
3. [Node Tools](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
3. [Node Tools](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md) <br>
|
|
17
17
|
Node tools to analyse the code and for extending the documentation.
|
|
18
|
-
4. [Rationales](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
4. [Rationales](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/rationales/side-effects.md) <br>
|
|
19
19
|
The reasoning behind some of our decisions.
|
|
@@ -44,7 +44,7 @@ For a Mono Repository
|
|
|
44
44
|
```md
|
|
45
45
|
# My Pkg
|
|
46
46
|
|
|
47
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
47
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/docs/deep/dir/overview.md)
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## CLI flags
|
|
@@ -74,7 +74,7 @@ Bring the `overview.md` in a docs folder along.
|
|
|
74
74
|
👉 `packages/[my-package]/docs/overview.md`
|
|
75
75
|
|
|
76
76
|
```md
|
|
77
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
77
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/docs/deep/dir/overview.md)
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Add a `use-cases.md`
|
|
@@ -82,7 +82,7 @@ Add a `use-cases.md`
|
|
|
82
82
|
👉 `packages/[my-package]/docs/use-cases.md`
|
|
83
83
|
|
|
84
84
|
```md
|
|
85
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
85
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/docs/deep/dir/use-cases.md)
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
So you will end up with something like this in your package.
|
|
@@ -20,7 +20,7 @@ To do this automatically you can use this preset for [rocket](https://rocket.mod
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/node-tools/remark-extend/overview.md)
|
|
24
24
|
- Renames named imports and all it's usage
|
|
25
25
|
- Adjusts import paths
|
|
26
26
|
- Replace tags in template literals
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
## Reusing documentation
|
|
53
53
|
|
|
54
|
-
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
54
|
+
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/node-tools/remark-extend/overview.md).
|
|
55
55
|
|
|
56
56
|
As an example you can create `docs/components/tabs/overview.md`.
|
|
57
57
|
|
|
@@ -37,4 +37,4 @@ Internally, we delegate all intricacies involved in managing light dom to SlotMi
|
|
|
37
37
|
SlotMixin automatically mediates between light dom provided by the user ('public slots') and light dom provided by the component author ('private slots').
|
|
38
38
|
Also, SlotMixin allows to hook into the reactive update loop of LitElement (automatically rerendering on property changes) and it automatically respects
|
|
39
39
|
the scoped registry belonging to the shadow root.
|
|
40
|
-
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/core/SlotMixin.md)
|
|
@@ -76,28 +76,28 @@ Below configuration gives an example of all of them, after which we explain when
|
|
|
76
76
|
|
|
77
77
|
```js
|
|
78
78
|
class MyAccessibleControl extends SlotMixin(LitElement) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
get slots() {
|
|
80
|
+
return {
|
|
81
|
+
...super.slots,
|
|
82
|
+
// Element
|
|
83
|
+
'public-element-slot': () => document.createElement('input'),
|
|
84
|
+
// TemplateResult
|
|
85
|
+
'_private-template-slot': () => html`<wc-rendered-to-light-dom></wc-rendered-to-light-dom>`,
|
|
86
|
+
// SlotRerenderObject
|
|
87
|
+
'rerenderable-slot': () => {
|
|
88
|
+
return {
|
|
89
|
+
template: html`<w-c>${this.litProperty}</w-c>`,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
// undefined (conditional slot)
|
|
93
|
+
'': () => {
|
|
94
94
|
if (conditionApplies) {
|
|
95
95
|
return html`<div>default slot</div>`;
|
|
96
96
|
}
|
|
97
97
|
return undefined;
|
|
98
98
|
},
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
101
|
}
|
|
102
102
|
```
|
|
103
103
|
|
|
@@ -165,4 +165,4 @@ This will make sure that the slot provided by the user always takes precedence a
|
|
|
165
165
|
|
|
166
166
|
### Default slot
|
|
167
167
|
|
|
168
|
-
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/
|
|
168
|
+
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/core/#slotfunctionresults), '' can be used to add content to the default slot
|
|
@@ -28,7 +28,7 @@ import { LitElement, html, render } from 'lit-element';
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/core/#deduping-of-mixins)
|
|
32
32
|
- Mixin to handle disabled (DisabledMixin)
|
|
33
33
|
- Mixin to handle disabled AND tabIndex (DisabledWithTabIndexMixin)
|
|
34
34
|
- Mixin to manage auto-generated needed slot elements in light dom (SlotMixin)
|
|
@@ -36,7 +36,7 @@ Our fields can automatically format/parse/serialize user input or an input set i
|
|
|
36
36
|
|
|
37
37
|
Below are some concrete examples of implementations of formatters and parsers mimicking a (basic) amount input.
|
|
38
38
|
|
|
39
|
-
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/
|
|
39
|
+
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input-amount/overview.md).
|
|
40
40
|
> This comes with its own formatter, parser, serializer.
|
|
41
41
|
|
|
42
42
|
### Parsers & modelValue
|
|
@@ -243,16 +243,16 @@ Below we show three flow diagrams to show the flow of formatting, serializing an
|
|
|
243
243
|
|
|
244
244
|
Where a user changes the input with their keyboard:
|
|
245
245
|
|
|
246
|
-

|
|
247
247
|
|
|
248
248
|
### Unparseable flow
|
|
249
249
|
|
|
250
250
|
Where a user sets the input to something that is not parseable by the parser:
|
|
251
251
|
|
|
252
|
-

|
|
253
253
|
|
|
254
254
|
### Imperative / programmatic flow
|
|
255
255
|
|
|
256
256
|
Where the developer sets the modelValue of the input programmatically:
|
|
257
257
|
|
|
258
|
-

|