@ember-eui/core 5.0.3 → 5.2.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/addon/components/eui-accordion/index.hbs +1 -1
- package/addon/components/eui-breadcrumbs/index.hbs +9 -1
- package/addon/components/eui-context-menu-item/index.hbs +60 -0
- package/addon/components/eui-context-menu-item/index.ts +12 -0
- package/addon/components/eui-context-menu-panel/index.hbs +5 -0
- package/addon/components/eui-header-links/index.hbs +1 -1
- package/addon/components/eui-input-popover/index.hbs +37 -31
- package/addon/components/eui-popover/index.hbs +61 -102
- package/addon/helpers/merge.ts +5 -0
- package/addon/utils/css-mappings/eui-avatar.ts +1 -0
- package/addon/utils/css-mappings/eui-context-menu-item.ts +26 -0
- package/addon/utils/css-mappings/eui-header-links.ts +1 -1
- package/addon/utils/css-mappings/index.ts +98 -96
- package/app/components/eui-context-menu-item/index.js +1 -0
- package/app/components/eui-context-menu-panel/index.js +1 -0
- package/app/helpers/merge.js +1 -0
- package/docs/display/notification-event/demo/demo2.md +3 -10
- package/docs/layout/{accordion.md → accordion/demo/d01-simple-and-unstyle.md} +18 -22
- package/docs/layout/accordion/demo/d02-arrow-display.md +34 -0
- package/docs/layout/{accordion-demo/demo2.md → accordion/demo/d03-multiple-accordions.md} +6 -5
- package/docs/layout/{accordion-demo/demo3.md → accordion/demo/d04-extra-actions.md} +2 -2
- package/docs/layout/{accordion-demo/demo4.md → accordion/demo/d05-opened-on-initial-render.md} +2 -2
- package/docs/layout/{accordion-demo/demo5.md → accordion/demo/d06-controlling-toggled-state.md} +3 -2
- package/docs/layout/{accordion-demo/demo6.md → accordion/demo/d07-loading-state.md} +2 -1
- package/docs/layout/accordion/demo/d08-when-content-changes-dynamically.md +71 -0
- package/docs/layout/{accordion-demo/demo8.md → accordion/demo/d09-interactive-content-in-the-trigger.md} +4 -4
- package/docs/layout/{accordion-demo/demo9.md → accordion/demo/d10-styled-for-forms.md} +44 -44
- package/docs/layout/accordion/index.md +23 -0
- package/docs/layout/{bottom-bar-demo/demo1.md → bottom-bar/demo/d01-basic.md} +0 -2
- package/docs/layout/{bottom-bar-demo/demo2.md → bottom-bar/demo/d02-positions.md} +0 -0
- package/docs/layout/{bottom-bar-demo/demo3.md → bottom-bar/demo/d03-displacement.md} +1 -0
- package/docs/layout/bottom-bar/index.md +18 -0
- package/docs/layout/flex/demo/d01-flex-group-is-for-a-single-row-layout.md +19 -0
- package/docs/layout/flex/demo/d02-flex-items-are-also-flex.md +18 -0
- package/docs/layout/flex/demo/d03-spans-instead-of-divs.md +19 -0
- package/docs/layout/flex/demo/d04-panels-grow-to-fill-flex-items.md +32 -0
- package/docs/layout/flex/demo/d05-turn-off-item-streching.md +12 -0
- package/docs/layout/flex/demo/d06-proportional-widths-of-items.md +32 -0
- package/docs/layout/flex/demo/d07-justify-and-align.md +11 -0
- package/docs/layout/flex/demo/d08-allowing-flex-items-to-wrap.md +43 -0
- package/docs/layout/flex/demo/d09-change-direction.md +13 -0
- package/docs/layout/flex/demo/d10-flex-grids-are-for-repeatable-items.md +33 -0
- package/docs/layout/flex/demo/d11-flex-grids-can-change-direction.md +33 -0
- package/docs/layout/flex/demo/d12-flex-grids-and-flex-groups-can-nest.md +30 -0
- package/docs/layout/flex/demo/d13-gutter-sizing.md +61 -0
- package/docs/layout/flex/demo/d14-responsive-layouts.md +29 -0
- package/docs/layout/flex/index.md +18 -0
- package/docs/layout/{flyout-demo/demo1.md → flyout/demo/d01-basic.md} +12 -16
- package/docs/layout/flyout/demo/d02-more-complicated-flyout.md +195 -0
- package/docs/layout/{flyout-demo/demo3.md → flyout/demo/d03-sizing.md} +5 -17
- package/docs/layout/{flyout-demo/demo4.md → flyout/demo/d04-adjusting-padding.md} +29 -36
- package/docs/layout/{flyout-demo/demo5.md → flyout/demo/d05-adding-a-banner.md} +6 -6
- package/docs/layout/{flyout-demo/demo6.md → flyout/demo/d06-without-ownfocus.md} +11 -14
- package/docs/layout/{flyout-demo/demo7.md → flyout/demo/d07-push-versus-overlay.md} +17 -3
- package/docs/layout/flyout/demo/d08-understanding-max-width.md +9 -0
- package/docs/layout/flyout/index.md +7 -0
- package/docs/layout/{header-demo/demo1.md → header/demo/d01-header.md} +138 -120
- package/docs/layout/header/demo/d02-sections.md +9 -0
- package/docs/layout/{header-demo/demo2.md → header/demo/d03-header-links.md} +2 -2
- package/docs/layout/{header-demo/demo3.md → header/demo/d04-fixed-header.md} +1 -1
- package/docs/layout/{header-demo/demo4.md → header/demo/d05-dark-theme.md} +3 -3
- package/docs/layout/{header-demo/demo5.md → header/demo/d06-portal-content-in-the-header.md} +20 -9
- package/docs/layout/{header-demo/demo6.md → header/demo/d07-header-notifications.md} +1 -1
- package/docs/layout/{header-demo/demo7.md → header/demo/d08-stacked-headers.md} +47 -26
- package/docs/layout/header/demo/d09-the-elastic-navigation-pattern.md +9 -0
- package/docs/layout/header/index.md +7 -0
- package/docs/layout/horizontal-rule/demo/d01-size.md +14 -0
- package/docs/layout/horizontal-rule/demo/d02-margins.md +38 -0
- package/docs/layout/horizontal-rule/horizontal-rule.md +7 -0
- package/docs/layout/modal/demo/d01-modal.md +73 -0
- package/docs/layout/modal/demo/d02-forms-in-a-modal.md +107 -0
- package/docs/layout/modal/demo/d03-confirm-modal.md +86 -0
- package/docs/layout/modal/demo/d04-loading-and-disabling-confirm-button.md +80 -0
- package/docs/layout/{modal-demo/demo5.md → modal/demo/d05-widths.md} +20 -39
- package/docs/layout/modal/index.md +13 -0
- package/docs/layout/page-header/demo/{demo1.md → d01-basic.md} +0 -2
- package/docs/layout/page-header/demo/{demo2.md → d02-tabs-in-the-page-header.md} +1 -2
- package/docs/layout/page-header/demo/{demo3.md → d03-tabs-in-the-page-header.md} +2 -3
- package/docs/layout/page-header/demo/{demo4.md → d04-breadcrumbs-in-the-page-header.md} +3 -2
- package/docs/layout/page-header/demo/{demo5.md → d05-breadcrumbs-in-the-page-header.md} +1 -28
- package/docs/layout/page-header/demo/{demo6.md → d06-customizing-the-page-header.md} +0 -0
- package/docs/layout/page-header/index.md +1 -2
- package/docs/layout/{panel-demo/demo1.md → panel/demo/d01-padding.md} +0 -0
- package/docs/layout/{panel-demo/demo2.md → panel/demo/d02-shadow-and-border.md} +2 -2
- package/docs/layout/{panel-demo/demo3.md → panel/demo/d03-colors-and-corners.md} +0 -0
- package/docs/layout/{panel-demo/demo4.md → panel/demo/d04-growing-height.md} +0 -0
- package/docs/layout/{panel-demo/demo5.md → panel/demo/d05-split-panels.md} +1 -1
- package/docs/layout/{panel.md → panel/index.md} +4 -0
- package/docs/layout/{popover-demo/demo1.md → popover/demo/d01-basic.md} +6 -4
- package/docs/layout/{popover-demo/demo2.md → popover/demo/d02-anchor-position.md} +0 -0
- package/docs/layout/popover/demo/d03-popover-titles-and-footers.md +133 -0
- package/docs/layout/{popover-demo/demo5.md → popover/demo/d04-popover-padding-sizes.md} +56 -31
- package/docs/layout/{popover-demo/demo6.md → popover/demo/d05-panel-class-name.md} +3 -3
- package/docs/layout/{popover-demo/demo7.md → popover/demo/d06-popover-with-block-level-display.md} +2 -3
- package/docs/layout/{popover-demo/demo3.md → popover/demo/d07-popover-on-a-fixed-element.md} +3 -11
- package/docs/layout/{popover-demo/demo8.md → popover/demo/d08-constraining-a-popover-inside-a-container.md} +0 -0
- package/docs/layout/{popover-demo/demo9.md → popover/demo/d09-popover-attached-to-input-element.md} +14 -12
- package/docs/layout/popover/demo/d10-setting-an-initial-focus.md +61 -0
- package/docs/layout/{popover-demo/demo10.md → popover/demo/d11-removing-the-focus-trap.md} +1 -1
- package/docs/layout/popover/demo/d12-popover-using-and-html-element-as-the-anchor.md +9 -0
- package/docs/layout/popover/index.md +7 -0
- package/docs/layout/resizable-container/demo/d01-horizontal-resizing.md +10 -0
- package/docs/layout/resizable-container/demo/d02-resizable-panel-options.md +10 -0
- package/docs/layout/resizable-container/demo/d03-horizontal-resizing-with-controlled-widths.md +10 -0
- package/docs/layout/resizable-container/demo/d04-vertical-resizing.md +10 -0
- package/docs/layout/resizable-container/demo/d05-collapsible-resizable-panels.md +10 -0
- package/docs/layout/resizable-container/demo/d06-responsive-layout.md +10 -0
- package/docs/layout/resizable-container/demo/d07-collapsible-panels-options.md +10 -0
- package/docs/layout/resizable-container/demo/d08-collapsible-panels-with-external-control.md +10 -0
- package/docs/layout/resizable-container/index.md +15 -0
- package/docs/layout/spacer/demo/d01-basic.md +44 -0
- package/docs/layout/spacer/index.md +7 -0
- package/docs/navigation/{breadcrumbs-demo/demo1.md → breadcrumbs/demo/d01-basic.md} +9 -6
- package/docs/navigation/{breadcrumbs-demo/demo2.md → breadcrumbs/demo/d02-limit-the-number-of-breadcrumbs.md} +0 -0
- package/docs/navigation/{breadcrumbs-demo/demo3.md → breadcrumbs/demo/d03-truncate-each-breadcrumb.md} +0 -0
- package/docs/navigation/{breadcrumbs-demo/demo4.md → breadcrumbs/demo/d04-truncate-each-breadcrumb-on-each-object.md} +0 -0
- package/docs/navigation/{breadcrumbs-demo/demo5.md → breadcrumbs/demo/d05-responsive.md} +14 -0
- package/docs/navigation/{breadcrumbs-demo/demo6.md → breadcrumbs/demo/d06-color-for-emphasis.md} +12 -23
- package/docs/navigation/breadcrumbs/index.md +7 -0
- package/docs/navigation/button/demo/d01-basic.md +85 -0
- package/docs/navigation/button/demo/d02-empty-button.md +68 -0
- package/docs/navigation/button/demo/d03-flush-empty-button.md +32 -0
- package/docs/navigation/button/demo/d04-buttons-with-icons.md +213 -0
- package/docs/navigation/button/demo/d05-icon-buttons.md +139 -0
- package/docs/navigation/button/demo/d06-buttons-as-links.md +51 -0
- package/docs/navigation/button/demo/d07-loading-state.md +38 -0
- package/docs/navigation/button/demo/d08-split-buttons.md +43 -0
- package/docs/navigation/button/demo/d09-toggle-buttons.md +10 -0
- package/docs/navigation/button/demo/d10-button-groups.md +10 -0
- package/docs/navigation/button/demo/d11-ghost.md +10 -0
- package/docs/navigation/button/index.md +13 -0
- package/docs/{layout/page-template/demo/demo1.md → templates/page-template/demo/d01-a-full-page-with-everything.md} +1 -24
- package/docs/{layout/page-template/demo/demo2.md → templates/page-template/demo/d02-restricting-page-width.md} +0 -0
- package/docs/{layout/page-template/demo/demo3.md → templates/page-template/demo/d03-showing-a-bottom-bar.md} +0 -0
- package/docs/{layout/page-template/demo/demo4.md → templates/page-template/demo/d04-centered-body.md} +1 -1
- package/docs/{layout/page-template/demo/demo5.md → templates/page-template/demo/d05-centered-content.md} +1 -1
- package/docs/{layout/page-template/demo/demo6.md → templates/page-template/demo/d06-a-simple-page-with-tabs.md} +0 -0
- package/docs/{layout/page-template/demo/demo7.md → templates/page-template/demo/d07-full-height-layout.md} +0 -0
- package/docs/{layout/page-template/demo/demo8.md → templates/page-template/demo/d08-simple-layout-with-centered-body.md} +0 -0
- package/docs/{layout/page-template/demo/demo9.md → templates/page-template/demo/d09-simple-layout-with-centered-content.md} +0 -0
- package/docs/{layout/page-template/demo/demo10.md → templates/page-template/demo/d10-a-simple-page-layout-with-custom-content.md} +0 -0
- package/docs/templates/page-template/index.md +37 -0
- package/docs/templates/sitewide-search/demo/d01-basic-setup.md +10 -0
- package/docs/templates/sitewide-search/demo/d02-options.md +10 -0
- package/docs/templates/sitewide-search/index.md +9 -0
- package/docs/templates/super-date-picker/demo/d01-update-button.md +10 -0
- package/docs/templates/super-date-picker/demo/d02-quick-select-panels.md +10 -0
- package/docs/templates/super-date-picker/demo/d03-sizing.md +10 -0
- package/docs/templates/super-date-picker/demo/d04-auto-refresh.md +11 -0
- package/docs/templates/super-date-picker/demo/d05-elastic-pattern-with-kql.md +10 -0
- package/docs/templates/super-date-picker/index.md +12 -0
- package/package.json +3 -3
- package/docs/layout/accordion-demo/demo1.md +0 -33
- package/docs/layout/accordion-demo/demo7.md +0 -66
- package/docs/layout/bottom-bar.md +0 -1
- package/docs/layout/flex-demo/demo1.md +0 -358
- package/docs/layout/flex.md +0 -1
- package/docs/layout/flyout-demo/demo2.md +0 -87
- package/docs/layout/flyout.md +0 -1
- package/docs/layout/header.md +0 -1
- package/docs/layout/horizontal-rule-demo/demo1.md +0 -70
- package/docs/layout/horizontal-rule.md +0 -1
- package/docs/layout/modal-demo/demo1.md +0 -97
- package/docs/layout/modal-demo/demo2.md +0 -126
- package/docs/layout/modal-demo/demo3.md +0 -55
- package/docs/layout/modal-demo/demo4.md +0 -65
- package/docs/layout/modal.md +0 -1
- package/docs/layout/page-template/index.md +0 -11
- package/docs/layout/popover-demo/demo4.md +0 -118
- package/docs/layout/popover.md +0 -1
- package/docs/navigation/breadcrumbs.md +0 -1
- package/docs/navigation/button-demo/demo1.md +0 -413
- package/docs/navigation/button.md +0 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
order: 2
|
|
3
|
+
---
|
|
4
|
+
# More complicated flyout
|
|
5
|
+
|
|
6
|
+
<EuiSpacer />
|
|
7
|
+
|
|
8
|
+
<EuiText>
|
|
9
|
+
<p>
|
|
10
|
+
|
|
11
|
+
This component also comes with related child components for ease of creating headers, footers and scrolling body content. <strong>EuiFlyoutHeader</strong> and <strong>EuiFlyoutFooter</strong> are pinned to the top and bottom of the flyout, respectively, to allow for always visible navigation and actions. The <strong>EuiFlyoutBody</strong> component will then automatically overflow.
|
|
12
|
+
|
|
13
|
+
</p>
|
|
14
|
+
</EuiText>
|
|
15
|
+
|
|
16
|
+
```hbs template
|
|
17
|
+
<EuiButton {{on 'click' this.openFlyout}}>
|
|
18
|
+
Show flyout
|
|
19
|
+
</EuiButton>
|
|
20
|
+
|
|
21
|
+
{{#if this.flyoutOpen}}
|
|
22
|
+
<EuiFlyout
|
|
23
|
+
@size='m'
|
|
24
|
+
@onClose={{this.closeFlyout}}
|
|
25
|
+
>
|
|
26
|
+
<EuiFlyoutHeader @hasBorder={{true}}>
|
|
27
|
+
<EuiTitle @size='l'>Flyout header</EuiTitle>
|
|
28
|
+
<EuiSpacer @size='s'/>
|
|
29
|
+
<EuiText @color="subdued">
|
|
30
|
+
<p>Put navigation items in the header, and cross tab actions in a footer.</p>
|
|
31
|
+
</EuiText>
|
|
32
|
+
<EuiTabs @bottomBorder={{false}} style="margin-bottom: -25px;">
|
|
33
|
+
{{#each this.tabs as |tab|}}
|
|
34
|
+
<EuiTab
|
|
35
|
+
@isSelected={{eq this.selectedTab.id tab.id}}
|
|
36
|
+
{{on 'click' (set this 'selectedTab' tab)}}
|
|
37
|
+
>
|
|
38
|
+
{{tab.name}}
|
|
39
|
+
</EuiTab>
|
|
40
|
+
{{/each}}
|
|
41
|
+
</EuiTabs>
|
|
42
|
+
</EuiFlyoutHeader>
|
|
43
|
+
<EuiFlyoutBody>
|
|
44
|
+
|
|
45
|
+
<EuiPopover
|
|
46
|
+
@ownFocus={{true}}
|
|
47
|
+
@isOpen={{this.popover}}
|
|
48
|
+
@anchorPosition='downCenter'
|
|
49
|
+
@closePopover={{set this 'popover' false}}
|
|
50
|
+
>
|
|
51
|
+
<:button>
|
|
52
|
+
<EuiButton
|
|
53
|
+
{{on 'click' (set this 'popover' true)}}
|
|
54
|
+
>
|
|
55
|
+
Even popovers can be included
|
|
56
|
+
</EuiButton>
|
|
57
|
+
</:button>
|
|
58
|
+
<:content>
|
|
59
|
+
<p>This is the popover content, notice how it can overflow the flyout!</p>
|
|
60
|
+
<p>
|
|
61
|
+
When placed in a flyout, the <EuiCode>repositionOnScroll</EuiCode> prop ensures that the popover scrolls with body of the flyout.
|
|
62
|
+
</p>
|
|
63
|
+
</:content>
|
|
64
|
+
</EuiPopover>
|
|
65
|
+
|
|
66
|
+
<EuiSpacer/>
|
|
67
|
+
|
|
68
|
+
<TodoText @text="missing EuiSuperSelect component"/>
|
|
69
|
+
<TodoText @text="missing euiExpression component"/>
|
|
70
|
+
|
|
71
|
+
<EuiText>
|
|
72
|
+
<p>
|
|
73
|
+
Far out in the uncharted backwaters of the unfashionable end of the
|
|
74
|
+
western spiral arm of the Galaxy lies a small unregarded yellow sun.
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
<p>
|
|
78
|
+
Orbiting this at a distance of roughly ninety-two million miles is an
|
|
79
|
+
utterly insignificant little blue green planet whose ape- descended life
|
|
80
|
+
forms are so amazingly primitive that they still think digital watches
|
|
81
|
+
are a pretty neat idea.
|
|
82
|
+
</p>
|
|
83
|
+
|
|
84
|
+
<ul>
|
|
85
|
+
<li>List item one</li>
|
|
86
|
+
<li>List item two</li>
|
|
87
|
+
<li>Dolphins</li>
|
|
88
|
+
</ul>
|
|
89
|
+
|
|
90
|
+
<p>
|
|
91
|
+
This planet has - or rather had - a problem, which was this: most of the
|
|
92
|
+
people living on it were unhappy for pretty much of the time. Many
|
|
93
|
+
solutions were suggested for this problem, but most of these were
|
|
94
|
+
largely concerned with the movements of small green pieces of paper,
|
|
95
|
+
which is odd because on the whole it was not the small green pieces of
|
|
96
|
+
paper that were unhappy.
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
<h2>This is Heading Two</h2>
|
|
100
|
+
|
|
101
|
+
<ol>
|
|
102
|
+
<li>Number one</li>
|
|
103
|
+
<li>Number two</li>
|
|
104
|
+
<li>Dolphins again</li>
|
|
105
|
+
</ol>
|
|
106
|
+
|
|
107
|
+
<p>
|
|
108
|
+
But the dog wasn’t lazy, it was just practicing mindfulness, so it
|
|
109
|
+
had a greater sense of life-satisfaction than that fox with all its
|
|
110
|
+
silly jumping.
|
|
111
|
+
</p>
|
|
112
|
+
|
|
113
|
+
<p>
|
|
114
|
+
And from the fox’s perspective, life was full of hoops to jump{' '}
|
|
115
|
+
<em>through</em>, low-hanging fruit to jump <em>for</em>, and dead car
|
|
116
|
+
batteries to jump-<em>start</em>.
|
|
117
|
+
</p>
|
|
118
|
+
|
|
119
|
+
<h3>This is Heading Three</h3>
|
|
120
|
+
|
|
121
|
+
<p>
|
|
122
|
+
So it thought the dog was making a poor life choice by focusing so much
|
|
123
|
+
on mindfulness. What if its car broke down?
|
|
124
|
+
</p>
|
|
125
|
+
</EuiText>
|
|
126
|
+
|
|
127
|
+
<EuiCodeBlock
|
|
128
|
+
@isCopyable={{false}}
|
|
129
|
+
@language='html'
|
|
130
|
+
>
|
|
131
|
+
{{this.htmlCode}}
|
|
132
|
+
</EuiCodeBlock>
|
|
133
|
+
|
|
134
|
+
</EuiFlyoutBody>
|
|
135
|
+
<EuiFlyoutFooter>
|
|
136
|
+
<EuiFlexGroup @justifyContent='spaceBetween' @gutterSize='s'>
|
|
137
|
+
<EuiButtonEmpty @iconType="cross" {{on 'click' this.closeFlyout}}>
|
|
138
|
+
Close
|
|
139
|
+
</EuiButtonEmpty>
|
|
140
|
+
<EuiButton
|
|
141
|
+
@fill={{true}}
|
|
142
|
+
{{on 'click' this.closeFlyout}}
|
|
143
|
+
>
|
|
144
|
+
Save
|
|
145
|
+
</EuiButton>
|
|
146
|
+
</EuiFlexGroup>
|
|
147
|
+
</EuiFlyoutFooter>
|
|
148
|
+
</EuiFlyout>
|
|
149
|
+
{{/if}}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```js component
|
|
153
|
+
import Component from '@glimmer/component';
|
|
154
|
+
import { tracked } from '@glimmer/tracking';
|
|
155
|
+
import { action } from '@ember/object';
|
|
156
|
+
|
|
157
|
+
export default class DemoFlyoutDemo2Component extends Component {
|
|
158
|
+
@tracked flyoutOpen = false;
|
|
159
|
+
@tracked selectedTab;
|
|
160
|
+
|
|
161
|
+
htmlCode = `
|
|
162
|
+
<!--I'm an example of HTML-->
|
|
163
|
+
<div>
|
|
164
|
+
asdf
|
|
165
|
+
</div>
|
|
166
|
+
`;
|
|
167
|
+
|
|
168
|
+
constructor() {
|
|
169
|
+
super(...arguments);
|
|
170
|
+
|
|
171
|
+
this.tabs = [
|
|
172
|
+
{
|
|
173
|
+
id: '1',
|
|
174
|
+
name: 'Tab 1'
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: '2',
|
|
178
|
+
name: 'Tab 2'
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
this.selectedTab = this.tabs[0];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@action
|
|
186
|
+
openFlyout() {
|
|
187
|
+
this.flyoutOpen = true;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@action
|
|
191
|
+
closeFlyout(flyout) {
|
|
192
|
+
this.flyoutOpen = false;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
@@ -19,7 +19,7 @@ Flyouts come in three predefined <EuiCode>sizes</EuiCode> of <EuiCode>'s' | 'm'
|
|
|
19
19
|
Show flyout to test widths
|
|
20
20
|
</EuiButton>
|
|
21
21
|
|
|
22
|
-
{{#if this.
|
|
22
|
+
{{#if this.flyoutOpen}}
|
|
23
23
|
<EuiFlyout
|
|
24
24
|
@size={{this.size}}
|
|
25
25
|
@onClose={{this.closeFlyout}}
|
|
@@ -30,6 +30,7 @@ Flyouts come in three predefined <EuiCode>sizes</EuiCode> of <EuiCode>'s' | 'm'
|
|
|
30
30
|
<EuiFlyoutBody>
|
|
31
31
|
<EuiFlexGroup>
|
|
32
32
|
<EuiFlexItem>
|
|
33
|
+
<TodoText @text="missing EuiButtonGroup component"/>
|
|
33
34
|
{{#each this.sizes as |size|}}
|
|
34
35
|
<EuiButton
|
|
35
36
|
@color={{if (eq size.id this.size) 'primary' 'text'}}
|
|
@@ -41,19 +42,6 @@ Flyouts come in three predefined <EuiCode>sizes</EuiCode> of <EuiCode>'s' | 'm'
|
|
|
41
42
|
</EuiFlexItem>
|
|
42
43
|
</EuiFlexGroup>
|
|
43
44
|
</EuiFlyoutBody>
|
|
44
|
-
<EuiFlyoutFooter>
|
|
45
|
-
<EuiFlexGroup @justifyContent='spaceBetween' @gutterSize='s'>
|
|
46
|
-
<EuiButton {{on 'click' (fn this.closeFlyout 'flyout2Open')}}>
|
|
47
|
-
Cancel
|
|
48
|
-
</EuiButton>
|
|
49
|
-
<EuiButton
|
|
50
|
-
@fill={{true}}
|
|
51
|
-
{{on 'click' (fn this.closeFlyout 'flyout2Open')}}
|
|
52
|
-
>
|
|
53
|
-
Send
|
|
54
|
-
</EuiButton>
|
|
55
|
-
</EuiFlexGroup>
|
|
56
|
-
</EuiFlyoutFooter>
|
|
57
45
|
</EuiFlyout>
|
|
58
46
|
{{/if}}
|
|
59
47
|
```
|
|
@@ -64,7 +52,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
64
52
|
import { action } from '@ember/object';
|
|
65
53
|
|
|
66
54
|
export default class DemoFlyoutDemo2Component extends Component {
|
|
67
|
-
@tracked
|
|
55
|
+
@tracked flyoutOpen = false;
|
|
68
56
|
@tracked size = 's';
|
|
69
57
|
|
|
70
58
|
sizes = [
|
|
@@ -88,12 +76,12 @@ export default class DemoFlyoutDemo2Component extends Component {
|
|
|
88
76
|
|
|
89
77
|
@action
|
|
90
78
|
openFlyout() {
|
|
91
|
-
this.
|
|
79
|
+
this.flyoutOpen = true;
|
|
92
80
|
}
|
|
93
81
|
|
|
94
82
|
@action
|
|
95
83
|
closeFlyout(flyout) {
|
|
96
|
-
this.
|
|
84
|
+
this.flyoutOpen = false;
|
|
97
85
|
}
|
|
98
86
|
}
|
|
99
87
|
```
|
|
@@ -19,7 +19,7 @@ All the inner flyout components inherit their padding from the wrapping <strong>
|
|
|
19
19
|
Show flyout to test padding sizes
|
|
20
20
|
</EuiButton>
|
|
21
21
|
|
|
22
|
-
{{#if this.
|
|
22
|
+
{{#if this.flyoutOpen}}
|
|
23
23
|
<EuiFlyout
|
|
24
24
|
@paddingSize={{this.padding}}
|
|
25
25
|
@onClose={{this.closeFlyout}}
|
|
@@ -28,34 +28,38 @@ All the inner flyout components inherit their padding from the wrapping <strong>
|
|
|
28
28
|
<EuiTitle @size='l'>Small Welcome!</EuiTitle>
|
|
29
29
|
</EuiFlyoutHeader>
|
|
30
30
|
<EuiFlyoutBody>
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{{on 'click' (set this 'padding' padding.id)}}
|
|
37
|
-
>
|
|
38
|
-
{{padding.label}}
|
|
39
|
-
</EuiButton>
|
|
40
|
-
{{/each}}
|
|
31
|
+
<:banner>
|
|
32
|
+
<EuiCallOut
|
|
33
|
+
@title='The banner left and right padding is medium to match that of flyout'
|
|
34
|
+
/>
|
|
35
|
+
</:banner>
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
<:default>
|
|
38
|
+
<TodoText @text="missing EuiButtonGroup component"/>
|
|
39
|
+
<EuiFlexGroup>
|
|
40
|
+
<EuiFlexItem>
|
|
41
|
+
{{#each this.paddings as |padding|}}
|
|
42
|
+
<EuiButton
|
|
43
|
+
@color={{if (eq padding.id this.padding) 'primary' 'text'}}
|
|
44
|
+
{{on 'click' (set this 'padding' padding.id)}}
|
|
45
|
+
>
|
|
46
|
+
{{padding.label}}
|
|
47
|
+
</EuiButton>
|
|
48
|
+
{{/each}}
|
|
49
|
+
</EuiFlexItem>
|
|
50
|
+
</EuiFlexGroup>
|
|
51
|
+
</:default>
|
|
48
52
|
</EuiFlyoutBody>
|
|
49
53
|
<EuiFlyoutFooter>
|
|
50
54
|
<EuiFlexGroup @justifyContent='spaceBetween' @gutterSize='s'>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
</
|
|
55
|
+
<EuiButtonEmpty @iconType="cross" {{on 'click' this.closeFlyout}}>
|
|
56
|
+
Close
|
|
57
|
+
</EuiButtonEmpty>
|
|
54
58
|
<EuiButton
|
|
55
59
|
@fill={{true}}
|
|
56
|
-
{{on 'click'
|
|
60
|
+
{{on 'click' this.closeFlyout}}
|
|
57
61
|
>
|
|
58
|
-
|
|
62
|
+
Save
|
|
59
63
|
</EuiButton>
|
|
60
64
|
</EuiFlexGroup>
|
|
61
65
|
</EuiFlyoutFooter>
|
|
@@ -69,18 +73,8 @@ import { tracked } from '@glimmer/tracking';
|
|
|
69
73
|
import { action } from '@ember/object';
|
|
70
74
|
|
|
71
75
|
export default class DemoFlyoutDemo2Component extends Component {
|
|
72
|
-
@tracked
|
|
76
|
+
@tracked flyoutOpen = false;
|
|
73
77
|
@tracked padding = 'l';
|
|
74
|
-
@tracked side = 'right';
|
|
75
|
-
|
|
76
|
-
@action
|
|
77
|
-
toggleSide() {
|
|
78
|
-
if (this.side === 'right') {
|
|
79
|
-
this.side = 'left';
|
|
80
|
-
} else {
|
|
81
|
-
this.side = 'right';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
78
|
|
|
85
79
|
paddings = [
|
|
86
80
|
{
|
|
@@ -103,13 +97,12 @@ export default class DemoFlyoutDemo2Component extends Component {
|
|
|
103
97
|
|
|
104
98
|
@action
|
|
105
99
|
openFlyout() {
|
|
106
|
-
this.
|
|
100
|
+
this.flyoutOpen = true;
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
@action
|
|
110
104
|
closeFlyout(flyout) {
|
|
111
|
-
|
|
112
|
-
this.flyout2Open = false;
|
|
105
|
+
this.flyoutOpen = false;
|
|
113
106
|
}
|
|
114
107
|
}
|
|
115
108
|
```
|
|
@@ -16,10 +16,10 @@ To highlight some information at the top of a flyout, you can pass an <a href="/
|
|
|
16
16
|
|
|
17
17
|
```hbs template
|
|
18
18
|
<EuiButton {{on 'click' this.openFlyout}}>
|
|
19
|
-
Show flyout
|
|
19
|
+
Show flyout with banner
|
|
20
20
|
</EuiButton>
|
|
21
21
|
|
|
22
|
-
{{#if this.
|
|
22
|
+
{{#if this.flyoutOpen}}
|
|
23
23
|
<EuiFlyout @onClose={{this.closeFlyout}}>
|
|
24
24
|
<EuiFlyoutHeader @hasBorder={{true}}>
|
|
25
25
|
<EuiTitle @size='l'>Small Welcome!</EuiTitle>
|
|
@@ -29,7 +29,7 @@ To highlight some information at the top of a flyout, you can pass an <a href="/
|
|
|
29
29
|
<EuiCallOut>
|
|
30
30
|
<:body>
|
|
31
31
|
Here’s some stuff that you need to know. This banner helps highlight
|
|
32
|
-
important information.
|
|
32
|
+
important information. <EuiLink @href="#">View docs</EuiLink>
|
|
33
33
|
</:body>
|
|
34
34
|
</EuiCallOut>
|
|
35
35
|
</:banner>
|
|
@@ -44,16 +44,16 @@ import { tracked } from '@glimmer/tracking';
|
|
|
44
44
|
import { action } from '@ember/object';
|
|
45
45
|
|
|
46
46
|
export default class DemoFlyoutDemo2Component extends Component {
|
|
47
|
-
@tracked
|
|
47
|
+
@tracked flyoutOpen = false;
|
|
48
48
|
|
|
49
49
|
@action
|
|
50
50
|
openFlyout() {
|
|
51
|
-
this.
|
|
51
|
+
this.flyoutOpen = true;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
@action
|
|
55
55
|
closeFlyout(flyout) {
|
|
56
|
-
this.
|
|
56
|
+
this.flyoutOpen = false;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
```
|
|
@@ -10,27 +10,24 @@ order: 6
|
|
|
10
10
|
<p>
|
|
11
11
|
Like modals, you will usually want to obscure the page content beneath with <EuiCode>@ownFocus</EuiCode> which wraps the flyout with an <a href="/docs/core/docs/display/callout">EuiOverlayMask</a>. However, there are use-cases where flyouts present more information or controls, but need to maintain the interactions of the page content. By setting <EuiCode>@ownFocus={{false}}</EuiCode>, the underlying page content will be visible and clickable.
|
|
12
12
|
</p>
|
|
13
|
-
|
|
13
|
+
</EuiText>
|
|
14
14
|
|
|
15
15
|
```hbs template
|
|
16
16
|
<EuiButton {{on 'click' this.openFlyout}}>
|
|
17
17
|
Toggle flyout
|
|
18
18
|
</EuiButton>
|
|
19
19
|
|
|
20
|
-
{{#if this.
|
|
20
|
+
{{#if this.flyoutOpen}}
|
|
21
21
|
<EuiFlyout @ownFocus={{false}} @onClose={{this.closeFlyout}}>
|
|
22
22
|
<EuiFlyoutHeader @hasBorder={{true}}>
|
|
23
|
-
<EuiTitle @size='l'>
|
|
23
|
+
<EuiTitle @size='l'>A flyout without ownFocus</EuiTitle>
|
|
24
24
|
</EuiFlyoutHeader>
|
|
25
25
|
<EuiFlyoutBody>
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</:body>
|
|
32
|
-
</EuiCallOut>
|
|
33
|
-
</:banner>
|
|
26
|
+
<EuiText>
|
|
27
|
+
<p>
|
|
28
|
+
The page contents is still interactable though screenreader users will find themselves still within the bounds of the flyout.
|
|
29
|
+
</p>
|
|
30
|
+
</EuiText>
|
|
34
31
|
</EuiFlyoutBody>
|
|
35
32
|
</EuiFlyout>
|
|
36
33
|
{{/if}}
|
|
@@ -42,16 +39,16 @@ import { tracked } from '@glimmer/tracking';
|
|
|
42
39
|
import { action } from '@ember/object';
|
|
43
40
|
|
|
44
41
|
export default class DemoFlyoutDemo2Component extends Component {
|
|
45
|
-
@tracked
|
|
42
|
+
@tracked flyoutOpen = false;
|
|
46
43
|
|
|
47
44
|
@action
|
|
48
45
|
openFlyout() {
|
|
49
|
-
this.
|
|
46
|
+
this.flyoutOpen = true;
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
@action
|
|
53
50
|
closeFlyout(flyout) {
|
|
54
|
-
this.
|
|
51
|
+
this.flyoutOpen = false;
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
```
|
|
@@ -17,15 +17,29 @@ Another way to allow for continued interactions of the page content while a flyo
|
|
|
17
17
|
|
|
18
18
|
```hbs template
|
|
19
19
|
<EuiButton {{on 'click' this.openFlyout}}>
|
|
20
|
-
Toggle flyout
|
|
20
|
+
Toggle pushed flyout
|
|
21
21
|
</EuiButton>
|
|
22
22
|
|
|
23
23
|
{{#if this.flyout2Open}}
|
|
24
24
|
<EuiFlyout @type='push' @size='s' @onClose={{this.closeFlyout}}>
|
|
25
25
|
<EuiFlyoutHeader @hasBorder={{true}}>
|
|
26
|
-
<EuiTitle @size='l'>
|
|
26
|
+
<EuiTitle @size='l'>A pushed flyout</EuiTitle>
|
|
27
27
|
</EuiFlyoutHeader>
|
|
28
|
-
<EuiFlyoutBody
|
|
28
|
+
<EuiFlyoutBody>
|
|
29
|
+
<EuiText>
|
|
30
|
+
<p>
|
|
31
|
+
A pushed flyout typically contains more information about a particular piece of data or complex form controls for editing.
|
|
32
|
+
</p>
|
|
33
|
+
<p>
|
|
34
|
+
Also, it is good to include a close button in the footer for a larger hit target than the small close button provides.
|
|
35
|
+
</p>
|
|
36
|
+
</EuiText>
|
|
37
|
+
</EuiFlyoutBody>
|
|
38
|
+
<EuiFlyoutFooter>
|
|
39
|
+
<EuiButton {{on 'click' this.closeFlyout}}>
|
|
40
|
+
Close
|
|
41
|
+
</EuiButton>
|
|
42
|
+
</EuiFlyoutFooter>
|
|
29
43
|
</EuiFlyout>
|
|
30
44
|
{{/if}}
|
|
31
45
|
```
|