@lion/ui 0.16.1 → 0.17.0-menu-system.0
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 +275 -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 +449 -0
- package/components/navigation-bar/src/types.js +41 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/OverlayController.js +165 -115
- package/components/overlays/src/OverlayMixin.js +75 -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 +4 -1
- package/components/overlays/test/OverlayController.test.js +117 -6
- package/components/overlays/types/OverlayConfig.ts +19 -4
- package/components/select-rich/test/lion-select-rich.test.js +3 -0
- package/custom-elements.json +15785 -5337
- 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 +2 -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 +1006 -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 +226 -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 +7 -13
- 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 +6 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +11 -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 +2 -0
- 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 +2 -0
- package/exports/types/overlays.ts +1 -0
- package/menu.js +6 -0
- package/navigation-bar.js +1 -0
- package/overlays.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { html, render } from 'lit';
|
|
2
|
+
|
|
3
|
+
function renderLitAsNode(tpl) {
|
|
4
|
+
const container = document.createElement('div');
|
|
5
|
+
render(tpl, container);
|
|
6
|
+
return container.firstElementChild;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let isApplied = false;
|
|
10
|
+
|
|
11
|
+
export function applyMenuDemoStyles() {
|
|
12
|
+
if (isApplied) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const fontAwesome = html`<link
|
|
17
|
+
rel="stylesheet"
|
|
18
|
+
href="https://use.fontawesome.com/releases/v5.1.0/css/all.css"
|
|
19
|
+
integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt"
|
|
20
|
+
crossorigin="anonymous"
|
|
21
|
+
/>`;
|
|
22
|
+
document.head.appendChild(renderLitAsNode(fontAwesome));
|
|
23
|
+
|
|
24
|
+
const styles = html` <style>
|
|
25
|
+
[role='menu']:focus {
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[role='toolbar'],
|
|
30
|
+
[role='tree'],
|
|
31
|
+
[role='menubar'],
|
|
32
|
+
[role='menu'] {
|
|
33
|
+
background: white;
|
|
34
|
+
font-family: sans-serif;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[level] > [role='menu'] {
|
|
39
|
+
border: 1px solid black;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[role='treeitem']:not([aria-expanded]),
|
|
43
|
+
[role='treeitem'][aria-expanded],
|
|
44
|
+
[role^='menuitem']:not([aria-expanded]),
|
|
45
|
+
[role^='menuitem'][aria-expanded] {
|
|
46
|
+
all: unset;
|
|
47
|
+
display: block;
|
|
48
|
+
width: 100%;
|
|
49
|
+
position: relative;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
padding: 4px 24px 4px 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[role='treeitem']:not([aria-expanded]),
|
|
55
|
+
[role='treeitem'][aria-expanded] {
|
|
56
|
+
padding-left: 16px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[role='treeitem'][active]:not([aria-expanded]),
|
|
60
|
+
[role='treeitem'][active][aria-expanded],
|
|
61
|
+
[role^='menuitem'][active]:not([aria-expanded]),
|
|
62
|
+
[role^='menuitem'][active][aria-expanded] {
|
|
63
|
+
background: lightgrey;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[role^='menuitem'][checked]:not([aria-expanded]),
|
|
67
|
+
[role^='menuitem'][checked][aria-expanded] {
|
|
68
|
+
background: #eee;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[role='treeitem'],
|
|
72
|
+
[role^='menuitem'] {
|
|
73
|
+
position: relative;
|
|
74
|
+
cursor: default;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[role='treeitem']::after,
|
|
78
|
+
[role^='menuitem']::after {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 5px;
|
|
81
|
+
font-size: 10px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[role^='menuitem']::after {
|
|
85
|
+
right: 4px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[role^='treeitem']::after {
|
|
89
|
+
left: 4px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[role^='menuitem'][aria-expanded]::after {
|
|
93
|
+
content: '▶';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[role^='menuitem'][aria-expanded='true']::after {
|
|
97
|
+
content: '▼';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[orientation='horizontal'] [role^='menuitem'][aria-expanded]::after {
|
|
101
|
+
content: '▼';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[role='menuitemcheckbox'][aria-checked='true']::after {
|
|
105
|
+
content: '🗹';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[role='menuitemradio'][aria-checked='true']::after {
|
|
109
|
+
content: '◉';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[role='separator'] {
|
|
113
|
+
border-bottom: 1px solid gray;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[role='treeitem'][aria-expanded]::after {
|
|
117
|
+
content: '+';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
lion-tree[level='1'] [role='treeitem']:not([aria-expanded]),
|
|
121
|
+
lion-tree[level='1'] [role='treeitem'][aria-expanded] {
|
|
122
|
+
padding-left: 24px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
lion-menu[level='1'] [role^='menuitem']:not([aria-expanded]),
|
|
126
|
+
lion-menu[level='1'] [role^='menuitem'][aria-expanded] {
|
|
127
|
+
padding-left: 16px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
lion-tree[level='2'] [role='treeitem']:not([aria-expanded]),
|
|
131
|
+
lion-tree[level='2'] [role='treeitem'][aria-expanded] {
|
|
132
|
+
padding-left: 32px;
|
|
133
|
+
}
|
|
134
|
+
lion-menu[level='2'] [role^='menuitem']:not([aria-expanded]),
|
|
135
|
+
lion-menu[level='2'] [role^='menuitem'][aria-expanded] {
|
|
136
|
+
padding-left: 24px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[role='toolbar'] {
|
|
140
|
+
padding: 8px;
|
|
141
|
+
background: #eee;
|
|
142
|
+
}
|
|
143
|
+
[role='toolbar'] button {
|
|
144
|
+
background: none;
|
|
145
|
+
padding: 4px 8px;
|
|
146
|
+
border: 1px transparent;
|
|
147
|
+
}
|
|
148
|
+
[role='toolbar'] button[aria-pressed='true'],
|
|
149
|
+
[role='toolbar'] button[aria-checked='true'] {
|
|
150
|
+
background: white;
|
|
151
|
+
border: 1px black;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[role='toolbar'] > div[role='separator'] {
|
|
155
|
+
margin-left: 8px;
|
|
156
|
+
margin-right: 8px;
|
|
157
|
+
border-left: 1px solid lightgray;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
button[slot='invoker'] {
|
|
161
|
+
background: none;
|
|
162
|
+
color: inherit;
|
|
163
|
+
border: none;
|
|
164
|
+
padding: 0;
|
|
165
|
+
font: inherit;
|
|
166
|
+
display: block;
|
|
167
|
+
width: 100%;
|
|
168
|
+
text-align: left;
|
|
169
|
+
}
|
|
170
|
+
</style>`;
|
|
171
|
+
document.head.appendChild(renderLitAsNode(styles));
|
|
172
|
+
isApplied = true;
|
|
173
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Menu: Extensions'
|
|
3
|
+
parts:
|
|
4
|
+
- Menu
|
|
5
|
+
- Extensions
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'Menu: Extensions'
|
|
8
|
+
order: 10
|
|
9
|
+
parent: Menu
|
|
10
|
+
title: Extensions
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Menu: Extensions
|
|
14
|
+
|
|
15
|
+
```js script
|
|
16
|
+
import { html } from 'lit';
|
|
17
|
+
import '@lion/ui/define/lion-navigation-bar.js';
|
|
18
|
+
|
|
19
|
+
// N.B. data structure designed to be compatible with existing extension layer
|
|
20
|
+
// TODO: maybe refactor api and bridge
|
|
21
|
+
|
|
22
|
+
const menuData = [
|
|
23
|
+
{
|
|
24
|
+
title: 'Products',
|
|
25
|
+
link: 'products',
|
|
26
|
+
sub: [
|
|
27
|
+
{
|
|
28
|
+
title: 'Payments',
|
|
29
|
+
link: 'payments-collections',
|
|
30
|
+
sub: [
|
|
31
|
+
{ title: 'Payments & Collections', link: '#' },
|
|
32
|
+
{ title: 'Merchant Commerce Solutions', link: 'merchant-commerce-solutions' },
|
|
33
|
+
{ title: 'Instant Payments', link: 'instant-payments' },
|
|
34
|
+
{ title: 'SEPA Direct Debit', link: 'SEPA-direct-debit' },
|
|
35
|
+
{ title: 'SEPA Credit Transfer', link: 'SEPA-credit-transfer' },
|
|
36
|
+
{ title: 'International Credit Transfer', link: 'international-credit-transfer' },
|
|
37
|
+
{ title: 'Account Reporting', link: 'account-deporting' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: 'Savings',
|
|
42
|
+
link: 'savings-collection',
|
|
43
|
+
sub: [
|
|
44
|
+
{ title: 'Liquidity & Cash Management', link: 'liquidity-cash-management' },
|
|
45
|
+
{ title: 'Physcial Cash Management', link: 'physcial-cash-management' },
|
|
46
|
+
{ title: 'Notional Cash Management', link: 'notional-cash-management' },
|
|
47
|
+
{ title: 'Virtual Cash Management', link: 'virtual-cash-management' },
|
|
48
|
+
{ title: 'Liquidity Management', link: 'liquidity-management' },
|
|
49
|
+
{ title: 'Excess Cash', link: 'excess-cash' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'Investing',
|
|
54
|
+
link: 'investing-collection',
|
|
55
|
+
sub: [
|
|
56
|
+
{ title: 'Digital Banking Services', link: 'home' },
|
|
57
|
+
{ title: 'InsideBusiness', link: 'home' },
|
|
58
|
+
{ title: 'Connectivity Solutions', link: 'connectivity-solutions' },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: 'Mortgages',
|
|
63
|
+
link: 'mortgages-collections',
|
|
64
|
+
sub: [
|
|
65
|
+
{ title: 'Payments & Collections', link: '#' },
|
|
66
|
+
{ title: 'Merchant Commerce Solutions', link: 'merchant-commerce-solutions' },
|
|
67
|
+
{ title: 'Instant Payments', link: 'instant-payments' },
|
|
68
|
+
{ title: 'SEPA Direct Debit', link: 'SEPA-direct-debit' },
|
|
69
|
+
{ title: 'SEPA Credit Transfer', link: 'SEPA-credit-transfer' },
|
|
70
|
+
{ title: 'International Credit Transfer', link: 'international-credit-transfer' },
|
|
71
|
+
{ title: 'Account Reporting', link: 'account-deporting' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: 'Loans',
|
|
76
|
+
link: 'loans-collection',
|
|
77
|
+
sub: [
|
|
78
|
+
{ title: 'Liquidity & Cash Management', link: 'liquidity-cash-management' },
|
|
79
|
+
{ title: 'Physcial Cash Management', link: 'physcial-cash-management' },
|
|
80
|
+
{ title: 'Notional Cash Management', link: 'notional-cash-management' },
|
|
81
|
+
{ title: 'Virtual Cash Management', link: 'virtual-cash-management' },
|
|
82
|
+
{ title: 'Liquidity Management', link: 'liquidity-management' },
|
|
83
|
+
{ title: 'Excess Cash', link: 'excess-cash' },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: 'Insurances',
|
|
88
|
+
link: 'insurances-collection',
|
|
89
|
+
sub: [
|
|
90
|
+
{ title: 'Digital Banking Services', link: 'home' },
|
|
91
|
+
{ title: 'InsideBusiness', link: 'home' },
|
|
92
|
+
{ title: 'Connectivity Solutions', link: 'connectivity-solutions' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'Digital banking',
|
|
97
|
+
link: 'digital-banking',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: "Who it's for",
|
|
103
|
+
link: 'who',
|
|
104
|
+
sub: [
|
|
105
|
+
{
|
|
106
|
+
title: 'Parents & kids',
|
|
107
|
+
link: 'parents-kids',
|
|
108
|
+
sub: [
|
|
109
|
+
{ title: 'Child current account', link: '#child-current' },
|
|
110
|
+
{ title: 'Youth current account', link: '#youth-current' },
|
|
111
|
+
{ title: 'Child savings account', link: '#child-savings' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: 'Students',
|
|
116
|
+
link: 'students',
|
|
117
|
+
sub: [
|
|
118
|
+
{ title: 'Student account', link: '#student-account' },
|
|
119
|
+
{ title: 'Smart payments', link: '#smart-payments' },
|
|
120
|
+
{ title: 'Smart savings', link: '#smart-savings' },
|
|
121
|
+
{ title: 'Smart banking', link: '#smart-banking' },
|
|
122
|
+
{ title: 'Smart for now', link: '#smart-for-now' },
|
|
123
|
+
{ title: 'Smart for later', link: '#smart-for-later' },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: "I'm an expat",
|
|
128
|
+
link: 'expat',
|
|
129
|
+
sub: [
|
|
130
|
+
{ title: 'Open a Dutch banking account', link: '#open' },
|
|
131
|
+
{ title: 'Investments', link: '#investments' },
|
|
132
|
+
{ title: 'Mortgage', link: '#mortgage' },
|
|
133
|
+
{ title: 'Health insurance', link: '#insurance' },
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
title: 'Themes',
|
|
140
|
+
link: 'themes',
|
|
141
|
+
sub: [
|
|
142
|
+
{
|
|
143
|
+
title: 'Living',
|
|
144
|
+
link: 'living-collections',
|
|
145
|
+
sub: [
|
|
146
|
+
{ title: 'Payments & Collections', link: '#' },
|
|
147
|
+
{ title: 'Merchant Commerce Solutions', link: 'merchant-commerce-solutions' },
|
|
148
|
+
{ title: 'Instant Payments', link: 'instant-payments' },
|
|
149
|
+
{ title: 'SEPA Direct Debit', link: 'SEPA-direct-debit' },
|
|
150
|
+
{ title: 'SEPA Credit Transfer', link: 'SEPA-credit-transfer' },
|
|
151
|
+
{ title: 'International Credit Transfer', link: 'international-credit-transfer' },
|
|
152
|
+
{ title: 'Account Reporting', link: 'account-deporting' },
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: 'Wealth',
|
|
157
|
+
link: 'wealth-collections',
|
|
158
|
+
sub: [
|
|
159
|
+
{ title: 'Liquidity & Cash Management', link: 'liquidity-cash-management' },
|
|
160
|
+
{ title: 'Physcial Cash Management', link: 'physcial-cash-management' },
|
|
161
|
+
{ title: 'Notional Cash Management', link: 'notional-cash-management' },
|
|
162
|
+
{ title: 'Virtual Cash Management', link: 'virtual-cash-management' },
|
|
163
|
+
{ title: 'Liquidity Management', link: 'liquidity-management' },
|
|
164
|
+
{ title: 'Excess Cash', link: 'excess-cash' },
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
title: 'Loyalty shop',
|
|
171
|
+
link: '#points',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: 'Make an appointment',
|
|
175
|
+
link: '#appointment',
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
const secondaryMenu = [
|
|
180
|
+
{
|
|
181
|
+
title: 'Back to old website',
|
|
182
|
+
link: 'https://www.ingwb.com',
|
|
183
|
+
target: '_self',
|
|
184
|
+
trackid: 'backToOldWebsite',
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
|
|
188
|
+
const ctaPrimary = {
|
|
189
|
+
id: 'cta-primary',
|
|
190
|
+
label: 'Log in',
|
|
191
|
+
href: '#login',
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const ctaSecondary = {
|
|
195
|
+
id: 'cta-secondary',
|
|
196
|
+
label: 'Open an account',
|
|
197
|
+
href: '#open-account',
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// N.B. these should be provided via api call
|
|
201
|
+
const suggestions = ['A', 'B', 'C', 'D'];
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```js preview-story
|
|
205
|
+
export const navigationBar = () => {
|
|
206
|
+
return html`<lion-navigation-bar
|
|
207
|
+
.menuItems="${menuData}"
|
|
208
|
+
.menuSupportItems="${secondaryMenu}"
|
|
209
|
+
.ctaPrimary="${ctaPrimary}"
|
|
210
|
+
.ctaSecondary="${ctaSecondary}"
|
|
211
|
+
.suggestions="${suggestions}"
|
|
212
|
+
>
|
|
213
|
+
.prefilledSuggestion="${suggestions[0]}"</lion-navigation-bar
|
|
214
|
+
>`;
|
|
215
|
+
};
|
|
216
|
+
```
|