@ember-eui/core 5.0.1 → 5.1.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.
Files changed (168) hide show
  1. package/addon/components/eui-accordion/index.hbs +1 -1
  2. package/addon/components/eui-breadcrumbs/index.hbs +9 -1
  3. package/addon/components/eui-header-links/index.hbs +1 -1
  4. package/addon/components/eui-input-popover/index.hbs +37 -31
  5. package/addon/components/eui-page-header-content/index.hbs +10 -12
  6. package/addon/components/eui-popover/index.hbs +61 -102
  7. package/addon/components/eui-step-horizontal/index.hbs +11 -6
  8. package/addon/helpers/merge.ts +5 -0
  9. package/addon/utils/css-mappings/eui-avatar.ts +1 -0
  10. package/addon/utils/css-mappings/eui-header-links.ts +1 -1
  11. package/app/helpers/merge.js +1 -0
  12. package/docs/layout/{accordion.md → accordion/demo/d01-simple-and-unstyle.md} +18 -22
  13. package/docs/layout/accordion/demo/d02-arrow-display.md +34 -0
  14. package/docs/layout/{accordion-demo/demo2.md → accordion/demo/d03-multiple-accordions.md} +6 -5
  15. package/docs/layout/{accordion-demo/demo3.md → accordion/demo/d04-extra-actions.md} +2 -2
  16. package/docs/layout/{accordion-demo/demo4.md → accordion/demo/d05-opened-on-initial-render.md} +2 -2
  17. package/docs/layout/{accordion-demo/demo5.md → accordion/demo/d06-controlling-toggled-state.md} +3 -2
  18. package/docs/layout/{accordion-demo/demo6.md → accordion/demo/d07-loading-state.md} +2 -1
  19. package/docs/layout/accordion/demo/d08-when-content-changes-dynamically.md +71 -0
  20. package/docs/layout/{accordion-demo/demo8.md → accordion/demo/d09-interactive-content-in-the-trigger.md} +4 -4
  21. package/docs/layout/{accordion-demo/demo9.md → accordion/demo/d10-styled-for-forms.md} +44 -44
  22. package/docs/layout/accordion/index.md +23 -0
  23. package/docs/layout/{bottom-bar-demo/demo1.md → bottom-bar/demo/d01-basic.md} +0 -2
  24. package/docs/layout/{bottom-bar-demo/demo2.md → bottom-bar/demo/d02-positions.md} +0 -0
  25. package/docs/layout/{bottom-bar-demo/demo3.md → bottom-bar/demo/d03-displacement.md} +1 -0
  26. package/docs/layout/bottom-bar/index.md +18 -0
  27. package/docs/layout/flex/demo/d01-flex-group-is-for-a-single-row-layout.md +19 -0
  28. package/docs/layout/flex/demo/d02-flex-items-are-also-flex.md +18 -0
  29. package/docs/layout/flex/demo/d03-spans-instead-of-divs.md +19 -0
  30. package/docs/layout/flex/demo/d04-panels-grow-to-fill-flex-items.md +32 -0
  31. package/docs/layout/flex/demo/d05-turn-off-item-streching.md +12 -0
  32. package/docs/layout/flex/demo/d06-proportional-widths-of-items.md +32 -0
  33. package/docs/layout/flex/demo/d07-justify-and-align.md +11 -0
  34. package/docs/layout/flex/demo/d08-allowing-flex-items-to-wrap.md +43 -0
  35. package/docs/layout/flex/demo/d09-change-direction.md +13 -0
  36. package/docs/layout/flex/demo/d10-flex-grids-are-for-repeatable-items.md +33 -0
  37. package/docs/layout/flex/demo/d11-flex-grids-can-change-direction.md +33 -0
  38. package/docs/layout/flex/demo/d12-flex-grids-and-flex-groups-can-nest.md +30 -0
  39. package/docs/layout/flex/demo/d13-gutter-sizing.md +61 -0
  40. package/docs/layout/flex/demo/d14-responsive-layouts.md +29 -0
  41. package/docs/layout/flex/index.md +18 -0
  42. package/docs/layout/{flyout-demo/demo1.md → flyout/demo/d01-basic.md} +12 -16
  43. package/docs/layout/flyout/demo/d02-more-complicated-flyout.md +195 -0
  44. package/docs/layout/{flyout-demo/demo3.md → flyout/demo/d03-sizing.md} +5 -17
  45. package/docs/layout/{flyout-demo/demo4.md → flyout/demo/d04-adjusting-padding.md} +29 -36
  46. package/docs/layout/{flyout-demo/demo5.md → flyout/demo/d05-adding-a-banner.md} +6 -6
  47. package/docs/layout/{flyout-demo/demo6.md → flyout/demo/d06-without-ownfocus.md} +11 -14
  48. package/docs/layout/{flyout-demo/demo7.md → flyout/demo/d07-push-versus-overlay.md} +17 -3
  49. package/docs/layout/flyout/demo/d08-understanding-max-width.md +9 -0
  50. package/docs/layout/flyout/index.md +7 -0
  51. package/docs/layout/{header-demo/demo1.md → header/demo/d01-header.md} +138 -120
  52. package/docs/layout/header/demo/d02-sections.md +9 -0
  53. package/docs/layout/{header-demo/demo2.md → header/demo/d03-header-links.md} +2 -2
  54. package/docs/layout/{header-demo/demo3.md → header/demo/d04-fixed-header.md} +1 -1
  55. package/docs/layout/{header-demo/demo4.md → header/demo/d05-dark-theme.md} +3 -3
  56. package/docs/layout/{header-demo/demo5.md → header/demo/d06-portal-content-in-the-header.md} +20 -9
  57. package/docs/layout/{header-demo/demo6.md → header/demo/d07-header-notifications.md} +1 -1
  58. package/docs/layout/{header-demo/demo7.md → header/demo/d08-stacked-headers.md} +47 -26
  59. package/docs/layout/header/demo/d09-the-elastic-navigation-pattern.md +9 -0
  60. package/docs/layout/header/index.md +7 -0
  61. package/docs/layout/horizontal-rule/demo/d01-size.md +14 -0
  62. package/docs/layout/horizontal-rule/demo/d02-margins.md +38 -0
  63. package/docs/layout/horizontal-rule/horizontal-rule.md +7 -0
  64. package/docs/layout/modal/demo/d01-modal.md +73 -0
  65. package/docs/layout/modal/demo/d02-forms-in-a-modal.md +107 -0
  66. package/docs/layout/modal/demo/d03-confirm-modal.md +86 -0
  67. package/docs/layout/modal/demo/d04-loading-and-disabling-confirm-button.md +80 -0
  68. package/docs/layout/{modal-demo/demo5.md → modal/demo/d05-widths.md} +20 -39
  69. package/docs/layout/modal/index.md +13 -0
  70. package/docs/layout/page-header/demo/{demo1.md → d01-basic.md} +0 -2
  71. package/docs/layout/page-header/demo/{demo2.md → d02-tabs-in-the-page-header.md} +1 -2
  72. package/docs/layout/page-header/demo/{demo3.md → d03-tabs-in-the-page-header.md} +2 -3
  73. package/docs/layout/page-header/demo/{demo4.md → d04-breadcrumbs-in-the-page-header.md} +3 -2
  74. package/docs/layout/page-header/demo/{demo5.md → d05-breadcrumbs-in-the-page-header.md} +1 -28
  75. package/docs/layout/page-header/demo/{demo6.md → d06-customizing-the-page-header.md} +0 -0
  76. package/docs/layout/page-header/index.md +1 -2
  77. package/docs/layout/{panel-demo/demo1.md → panel/demo/d01-padding.md} +0 -0
  78. package/docs/layout/{panel-demo/demo2.md → panel/demo/d02-shadow-and-border.md} +2 -2
  79. package/docs/layout/{panel-demo/demo3.md → panel/demo/d03-colors-and-corners.md} +0 -0
  80. package/docs/layout/{panel-demo/demo4.md → panel/demo/d04-growing-height.md} +0 -0
  81. package/docs/layout/{panel-demo/demo5.md → panel/demo/d05-split-panels.md} +1 -1
  82. package/docs/layout/{panel.md → panel/index.md} +4 -0
  83. package/docs/layout/{popover-demo/demo1.md → popover/demo/d01-basic.md} +6 -4
  84. package/docs/layout/{popover-demo/demo2.md → popover/demo/d02-anchor-position.md} +0 -0
  85. package/docs/layout/popover/demo/d03-popover-titles-and-footers.md +133 -0
  86. package/docs/layout/{popover-demo/demo5.md → popover/demo/d04-popover-padding-sizes.md} +56 -31
  87. package/docs/layout/{popover-demo/demo6.md → popover/demo/d05-panel-class-name.md} +3 -3
  88. package/docs/layout/{popover-demo/demo7.md → popover/demo/d06-popover-with-block-level-display.md} +2 -3
  89. package/docs/layout/{popover-demo/demo3.md → popover/demo/d07-popover-on-a-fixed-element.md} +3 -11
  90. package/docs/layout/{popover-demo/demo8.md → popover/demo/d08-constraining-a-popover-inside-a-container.md} +0 -0
  91. package/docs/layout/{popover-demo/demo9.md → popover/demo/d09-popover-attached-to-input-element.md} +14 -12
  92. package/docs/layout/popover/demo/d10-setting-an-initial-focus.md +61 -0
  93. package/docs/layout/{popover-demo/demo10.md → popover/demo/d11-removing-the-focus-trap.md} +1 -1
  94. package/docs/layout/popover/demo/d12-popover-using-and-html-element-as-the-anchor.md +9 -0
  95. package/docs/layout/popover/index.md +7 -0
  96. package/docs/layout/resizable-container/demo/d01-horizontal-resizing.md +10 -0
  97. package/docs/layout/resizable-container/demo/d02-resizable-panel-options.md +10 -0
  98. package/docs/layout/resizable-container/demo/d03-horizontal-resizing-with-controlled-widths.md +10 -0
  99. package/docs/layout/resizable-container/demo/d04-vertical-resizing.md +10 -0
  100. package/docs/layout/resizable-container/demo/d05-collapsible-resizable-panels.md +10 -0
  101. package/docs/layout/resizable-container/demo/d06-responsive-layout.md +10 -0
  102. package/docs/layout/resizable-container/demo/d07-collapsible-panels-options.md +10 -0
  103. package/docs/layout/resizable-container/demo/d08-collapsible-panels-with-external-control.md +10 -0
  104. package/docs/layout/resizable-container/index.md +15 -0
  105. package/docs/layout/spacer/demo/d01-basic.md +44 -0
  106. package/docs/layout/spacer/index.md +7 -0
  107. package/docs/navigation/{breadcrumbs-demo/demo1.md → breadcrumbs/demo/d01-basic.md} +9 -6
  108. package/docs/navigation/{breadcrumbs-demo/demo2.md → breadcrumbs/demo/d02-limit-the-number-of-breadcrumbs.md} +0 -0
  109. package/docs/navigation/{breadcrumbs-demo/demo3.md → breadcrumbs/demo/d03-truncate-each-breadcrumb.md} +0 -0
  110. package/docs/navigation/{breadcrumbs-demo/demo4.md → breadcrumbs/demo/d04-truncate-each-breadcrumb-on-each-object.md} +0 -0
  111. package/docs/navigation/{breadcrumbs-demo/demo5.md → breadcrumbs/demo/d05-responsive.md} +14 -0
  112. package/docs/navigation/{breadcrumbs-demo/demo6.md → breadcrumbs/demo/d06-color-for-emphasis.md} +12 -23
  113. package/docs/navigation/breadcrumbs/index.md +7 -0
  114. package/docs/navigation/button/demo/d01-basic.md +85 -0
  115. package/docs/navigation/button/demo/d02-empty-button.md +68 -0
  116. package/docs/navigation/button/demo/d03-flush-empty-button.md +32 -0
  117. package/docs/navigation/button/demo/d04-buttons-with-icons.md +213 -0
  118. package/docs/navigation/button/demo/d05-icon-buttons.md +139 -0
  119. package/docs/navigation/button/demo/d06-buttons-as-links.md +51 -0
  120. package/docs/navigation/button/demo/d07-loading-state.md +38 -0
  121. package/docs/navigation/button/demo/d08-split-buttons.md +43 -0
  122. package/docs/navigation/button/demo/d09-toggle-buttons.md +10 -0
  123. package/docs/navigation/button/demo/d10-button-groups.md +10 -0
  124. package/docs/navigation/button/demo/d11-ghost.md +10 -0
  125. package/docs/navigation/button/index.md +13 -0
  126. package/docs/navigation/steps-demo/demo3.md +0 -1
  127. package/docs/{layout/page-template/demo/demo1.md → templates/page-template/demo/d01-a-full-page-with-everything.md} +1 -24
  128. package/docs/{layout/page-template/demo/demo2.md → templates/page-template/demo/d02-restricting-page-width.md} +0 -0
  129. package/docs/{layout/page-template/demo/demo3.md → templates/page-template/demo/d03-showing-a-bottom-bar.md} +0 -0
  130. package/docs/{layout/page-template/demo/demo4.md → templates/page-template/demo/d04-centered-body.md} +1 -1
  131. package/docs/{layout/page-template/demo/demo5.md → templates/page-template/demo/d05-centered-content.md} +1 -1
  132. package/docs/{layout/page-template/demo/demo6.md → templates/page-template/demo/d06-a-simple-page-with-tabs.md} +0 -0
  133. package/docs/{layout/page-template/demo/demo7.md → templates/page-template/demo/d07-full-height-layout.md} +0 -0
  134. package/docs/{layout/page-template/demo/demo8.md → templates/page-template/demo/d08-simple-layout-with-centered-body.md} +0 -0
  135. package/docs/{layout/page-template/demo/demo9.md → templates/page-template/demo/d09-simple-layout-with-centered-content.md} +0 -0
  136. package/docs/{layout/page-template/demo/demo10.md → templates/page-template/demo/d10-a-simple-page-layout-with-custom-content.md} +0 -0
  137. package/docs/templates/page-template/index.md +37 -0
  138. package/docs/templates/sitewide-search/demo/d01-basic-setup.md +10 -0
  139. package/docs/templates/sitewide-search/demo/d02-options.md +10 -0
  140. package/docs/templates/sitewide-search/index.md +9 -0
  141. package/docs/templates/super-date-picker/demo/d01-update-button.md +10 -0
  142. package/docs/templates/super-date-picker/demo/d02-quick-select-panels.md +10 -0
  143. package/docs/templates/super-date-picker/demo/d03-sizing.md +10 -0
  144. package/docs/templates/super-date-picker/demo/d04-auto-refresh.md +11 -0
  145. package/docs/templates/super-date-picker/demo/d05-elastic-pattern-with-kql.md +10 -0
  146. package/docs/templates/super-date-picker/index.md +12 -0
  147. package/package.json +3 -3
  148. package/docs/layout/accordion-demo/demo1.md +0 -33
  149. package/docs/layout/accordion-demo/demo7.md +0 -66
  150. package/docs/layout/bottom-bar.md +0 -1
  151. package/docs/layout/flex-demo/demo1.md +0 -358
  152. package/docs/layout/flex.md +0 -1
  153. package/docs/layout/flyout-demo/demo2.md +0 -87
  154. package/docs/layout/flyout.md +0 -1
  155. package/docs/layout/header.md +0 -1
  156. package/docs/layout/horizontal-rule-demo/demo1.md +0 -70
  157. package/docs/layout/horizontal-rule.md +0 -1
  158. package/docs/layout/modal-demo/demo1.md +0 -97
  159. package/docs/layout/modal-demo/demo2.md +0 -126
  160. package/docs/layout/modal-demo/demo3.md +0 -55
  161. package/docs/layout/modal-demo/demo4.md +0 -65
  162. package/docs/layout/modal.md +0 -1
  163. package/docs/layout/page-template/index.md +0 -11
  164. package/docs/layout/popover-demo/demo4.md +0 -118
  165. package/docs/layout/popover.md +0 -1
  166. package/docs/navigation/breadcrumbs.md +0 -1
  167. package/docs/navigation/button-demo/demo1.md +0 -413
  168. package/docs/navigation/button.md +0 -1
@@ -2,8 +2,6 @@
2
2
  order: 1
3
3
  ---
4
4
 
5
- # Header
6
-
7
5
  <EuiText>
8
6
  The header is made up of
9
7
  <strong>many</strong>
@@ -33,47 +31,113 @@ order: 1
33
31
  </EuiText>
34
32
 
35
33
  ```hbs template
34
+
35
+ <TodoText @text="missing EuiSelectableTemplateSitewide and EuiSelectable components"/>
36
+ <EuiSpacer/>
37
+
36
38
  <EuiHeader>
39
+
37
40
  <EuiHeaderSection @side='left'>
38
41
  <EuiHeaderSectionItem @border='right'>
39
42
  <EuiHeaderLogo @iconType='logoElastic' aria-label='Go to home page' />
40
43
  </EuiHeaderSectionItem>
44
+
45
+ <!-- spaces -->
41
46
  <EuiHeaderSectionItem @border='right'>
42
- <EuiHeaderSectionItemButton @ref={{set this 'btn'}}>
43
- <EuiAvatar
44
- @name='Planta Prysmex'
45
- @type='space'
46
- @initialLength={{2}}
47
- @size='s'
48
- />
49
- </EuiHeaderSectionItemButton>
47
+
48
+ <!-- <EuiPopover
49
+ @isOpen={{isOpen}}
50
+ @anchorPosition="downLeft"
51
+ @closePopover={{set this 'spacePopover' false}}
52
+ @panelPaddingSize="none"
53
+ >
54
+ <EuiSelectable
55
+ searchable={{this.listIsExtended}}
56
+ searchProps={{this.todo}}
57
+ options={{this.spaces}}
58
+ singleSelection="always"
59
+ style="width: 300"
60
+ onChange={{onChange}}
61
+ listProps={{this.todo}}
62
+ >
63
+ <:button>
64
+ <EuiHeaderSectionItemButton
65
+ aria-controls='header1'
66
+ aria-expanded={{this.spacePopover}}
67
+ aria-haspopup='true'
68
+ aria-label='Account menu'
69
+ @onClick={{this.onMenuButtonClick}}
70
+ >
71
+ <EuiAvatar
72
+ @name={{this.space.label}}
73
+ @type='space'
74
+ @initialLength={{2}}
75
+ @size='s'
76
+ />
77
+ </EuiHeaderSectionItemButton>
78
+ </:button>
79
+ <:content>
80
+ <EuiPopoverTitle paddingSize="s">
81
+ TODO: search
82
+ </EuiPopoverTitle>
83
+ TODO: list
84
+ <EuiPopoverFooter paddingSize="s">
85
+ <EuiButton
86
+ size="s"
87
+ @fullWidth={{true}}
88
+ onClick={{this.addMoreSpaces}}
89
+ disabled={{this.listIsExtended}}
90
+ >
91
+ Add more spaces
92
+ </EuiButton>
93
+ </EuiPopoverFooter>
94
+ </:content>
95
+ </EuiSelectable>
96
+ </EuiPopover> -->
97
+
50
98
  </EuiHeaderSectionItem>
51
99
  </EuiHeaderSection>
100
+
52
101
  <EuiHeaderBreadcrumbs
53
102
  aria-label='Header breadcrumbs example'
54
103
  @breadcrumbs={{this.breadcrumbs}}
55
104
  />
105
+
56
106
  <EuiHeaderSection @side='right'>
107
+
108
+ <!-- search -->
109
+ <EuiHeaderSectionItem @border='left'>
110
+ <EuiHeaderSectionItemButton
111
+ @ref={{set this 'cheerRef'}}
112
+ >
113
+ <EuiIcon @type='search' />
114
+ </EuiHeaderSectionItemButton>
115
+ </EuiHeaderSectionItem>
116
+
117
+ <!-- profile -->
57
118
  <EuiHeaderSectionItem @border='left'>
58
119
  <EuiPopover
59
120
  @isOpen={{this.userPopover}}
60
121
  @closePopover={{set this 'userPopover' false}}
61
122
  >
62
123
  <:button>
124
+
63
125
  <EuiHeaderSectionItemButton
64
126
  aria-controls='header1'
65
- aria-expanded={{this.isOpen}}
127
+ aria-expanded={{this.userPopover}}
66
128
  aria-haspopup='true'
67
129
  aria-label='Account menu'
68
130
  @onClick={{this.onMenuButtonClick}}
69
131
  >
70
132
  <EuiAvatar
71
- @name='David Martinez'
133
+ @name={{this.name}}
72
134
  @type='user'
73
135
  @initialLength={{2}}
74
136
  @size='s'
75
137
  />
76
138
  </EuiHeaderSectionItemButton>
139
+
140
+
77
141
  </:button>
78
142
  <:content>
79
143
  <div style='width:320px;'>
@@ -83,12 +147,12 @@ order: 1
83
147
  @responsive={{false}}
84
148
  >
85
149
  <EuiFlexItem @grow={{false}}>
86
- <EuiAvatar @name='David Martinez' @size='xl' />
150
+ <EuiAvatar @name={{this.name}} @size='xl' />
87
151
  </EuiFlexItem>
88
152
 
89
153
  <EuiFlexItem>
90
154
  <EuiText>
91
- <p>David Martinez</p>
155
+ <p>{{this.name}}</p>
92
156
  </EuiText>
93
157
 
94
158
  <EuiSpacer @size='m' />
@@ -111,15 +175,10 @@ order: 1
111
175
  </div>
112
176
  </:content>
113
177
  </EuiPopover>
114
-
115
178
  </EuiHeaderSectionItem>
116
- <EuiHeaderSectionItem @border='left'>
117
- <EuiHeaderSectionItemButton @notification='3' @notificationColor='accent'>
118
- <EuiIcon @type='bell' @size='m' />
119
- </EuiHeaderSectionItemButton>
120
- </EuiHeaderSectionItem>
121
- <EuiHeaderSectionItem @border='left'>
122
179
 
180
+ <!-- apps -->
181
+ <EuiHeaderSectionItem @border='left'>
123
182
  <EuiPopover
124
183
  @isOpen={{this.appsPopover}}
125
184
  @closePopover={{set this 'appsPopover' false}}
@@ -136,38 +195,16 @@ order: 1
136
195
  </:button>
137
196
  <:content>
138
197
  <EuiKeyPadMenu id='headerAppKeyPadMenuId' style="width: 288px">
139
- <EuiKeyPadMenuItem @label='Discover'>
140
- <EuiIcon @type='discoverApp' @size='l' />
141
- </EuiKeyPadMenuItem>
142
-
143
- <EuiKeyPadMenuItem @label='Dashboard'>
144
- <EuiIcon @type='dashboardApp' @size='l' />
145
- </EuiKeyPadMenuItem>
146
-
147
- <EuiKeyPadMenuItem @label='Dev Tools'>
148
- <EuiIcon @type='devToolsApp' @size='l' />
149
- </EuiKeyPadMenuItem>
150
-
151
- <EuiKeyPadMenuItem @label='Machine Learning'>
152
- <EuiIcon @type='machineLearningApp' @size='l' />
153
- </EuiKeyPadMenuItem>
154
-
155
- <EuiKeyPadMenuItem @label='Graph'>
156
- <EuiIcon @type='graphApp' @size='l' />
157
- </EuiKeyPadMenuItem>
158
-
159
- <EuiKeyPadMenuItem @label='Visualize'>
160
- <EuiIcon @type='visualizeApp' @size='l' />
161
- </EuiKeyPadMenuItem>
162
-
163
- <EuiKeyPadMenuItem @label='Timelion' @betaBadgeLabel='Beta'>
164
- <EuiIcon @type='timelionApp' @size='l' />
165
- </EuiKeyPadMenuItem>
198
+ {{#each this.apps as |appObj|}}
199
+ <EuiKeyPadMenuItem @label={{appObj.label}}>
200
+ <EuiIcon @type={{appObj.type}} @size='l' />
201
+ </EuiKeyPadMenuItem>
202
+ {{/each}}
166
203
  </EuiKeyPadMenu>
167
204
  </:content>
168
205
  </EuiPopover>
169
-
170
206
  </EuiHeaderSectionItem>
207
+
171
208
  </EuiHeaderSection>
172
209
  </EuiHeader>
173
210
  ```
@@ -178,124 +215,105 @@ import { tracked } from '@glimmer/tracking';
178
215
  import { action } from '@ember/object';
179
216
 
180
217
  export default class DemoHeaderComponent extends Component {
181
- @tracked isOpen = false;
218
+ @tracked spacePopover = false;
182
219
  @tracked userPopover = false;
183
220
  @tracked appsPopover = false;
184
221
  @tracked btn;
185
-
186
- spacesValues = [
222
+ @tracked spaces = [
187
223
  {
188
- label: 'Sales team',
189
- prepend: {
190
- type: 'space',
191
- name: 'Sales Team',
192
- size: 's'
193
- },
194
- checked: 'on'
224
+ label: 'Sales Team'
195
225
  },
196
226
  {
197
- label: 'Engineering',
198
- prepend: {
199
- type: 'space',
200
- name: 'Engineering',
201
- size: 's'
202
- }
227
+ label: 'Engineering'
203
228
  },
204
229
  {
205
- label: 'Security',
206
- prepend: {
207
- type: 'space',
208
- name: 'Security',
209
- size: 's'
210
- }
230
+ label: 'Security'
211
231
  },
212
232
  {
213
- label: 'Default',
214
- prepend: {
215
- type: 'space',
216
- name: 'Default',
217
- size: 's'
218
- }
233
+ label: 'Default'
219
234
  }
220
235
  ];
236
+ @tracked space = this.spaces.firstObject
221
237
 
222
238
  additionalSpaces = [
223
239
  {
224
- label: 'Sales team 2',
225
- prepend: {
226
- type: 'space',
227
- name: 'Sales Team 2',
228
- size: 's'
229
- }
240
+ label: 'Sales Team 2'
230
241
  },
231
242
  {
232
- label: 'Engineering 2',
233
- prepend: {
234
- type: 'space',
235
- name: 'Engineering 2',
236
- size: 's'
237
- }
243
+ label: 'Engineering 2'
238
244
  },
239
245
  {
240
- label: 'Security 2',
241
- prepend: {
242
- type: 'space',
243
- name: 'Security 2',
244
- size: 's'
245
- }
246
+ label: 'Security 2'
246
247
  },
247
248
  {
248
- label: 'Default 2',
249
- prepend: {
250
- type: 'space',
251
- name: 'Default 2',
252
- size: 's'
253
- }
249
+ label: 'Default 2'
254
250
  }
255
251
  ];
256
252
 
257
- animate = () => {
258
- this.btn?.euiAnimate?.();
259
- };
253
+ apps = [
254
+ {
255
+ label: 'Discover',
256
+ type: 'discoverApp'
257
+ },
258
+ {
259
+ label: 'Dashboard',
260
+ type: 'dashboardApp'
261
+ },
262
+ {
263
+ label: 'Dev Tools',
264
+ type: 'devToolsApp'
265
+ },
266
+ {
267
+ label: 'Machine Learning',
268
+ type: 'machineLearningApp'
269
+ },
270
+ {
271
+ label: 'Graph',
272
+ type: 'graphApp'
273
+ },
274
+ {
275
+ label: 'Visualize',
276
+ type: 'visualizeApp'
277
+ },
278
+ {
279
+ label: 'Timelion',
280
+ type: 'timelionApp'
281
+ }
282
+ ]
283
+
284
+ name = 'John Username'
260
285
 
261
286
  breadcrumbs = [
262
287
  {
263
288
  text: 'Management',
264
289
  href: '#',
265
- onClick: (e) => {
266
- e.preventDefault();
267
- },
268
- 'data-test-subj': 'breadcrumbsAnimals',
269
- className: 'customClass'
290
+ onClick: this.breadcrumOnClick
270
291
  },
271
292
  {
272
293
  text: 'Truncation test is here for a really long item',
273
294
  href: '#',
274
- onClick: (e) => {
275
- e.preventDefault();
276
- }
295
+ onClick: this.breadcrumOnClick
277
296
  },
278
297
  {
279
298
  text: 'Hidden',
280
299
  href: '#',
281
- onClick: (e) => {
282
- e.preventDefault();
283
- }
300
+ onClick: this.breadcrumOnClick
284
301
  },
285
302
  {
286
303
  text: 'Users',
287
304
  href: '#',
288
- onClick: (e) => {
289
- e.preventDefault();
290
- }
305
+ onClick: this.breadcrumOnClick
291
306
  },
292
307
  {
293
308
  text: 'Create'
294
309
  }
295
310
  ];
296
311
 
297
- @action
298
- onClick(e) {
312
+ get listIsExtended() {
313
+ return this.spaces.length > 4
314
+ }
315
+
316
+ breadcrumOnClick(e) {
299
317
  e.preventDefault();
300
318
  }
301
319
 
@@ -0,0 +1,9 @@
1
+ ---
2
+ order: 3
3
+ ---
4
+
5
+ # Sections
6
+
7
+ ```hbs template
8
+ <TodoText/>
9
+ ```
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 2
2
+ order: 3
3
3
  ---
4
4
 
5
5
  # Header links
@@ -21,7 +21,7 @@ order: 2
21
21
 
22
22
  <EuiHeaderSectionItem>
23
23
  <EuiHeaderLinks aria-label='App navigation links example'>
24
- <EuiHeaderLink @isActive={{false}}>Docs</EuiHeaderLink>
24
+ <EuiHeaderLink @isActive={{true}}>Docs</EuiHeaderLink>
25
25
 
26
26
  <EuiHeaderLink>Code</EuiHeaderLink>
27
27
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 3
2
+ order: 4
3
3
  ---
4
4
 
5
5
  # Fixed header
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 4
2
+ order: 5
3
3
  ---
4
4
 
5
5
  # Dark theme
@@ -12,8 +12,8 @@ order: 4
12
12
 
13
13
  ```hbs template
14
14
  <EuiHeader @theme='dark'>
15
- <EuiHeaderSection @side='left' @border='right'>
16
- <EuiHeaderSectionItem>
15
+ <EuiHeaderSection @side='left'>
16
+ <EuiHeaderSectionItem @border='right'>
17
17
  <EuiHeaderLogo>Elastic</EuiHeaderLogo>
18
18
  </EuiHeaderSectionItem>
19
19
  <EuiHeaderSectionItem>
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 5
2
+ order: 6
3
3
  ---
4
4
 
5
5
  # Portal content in the header
@@ -53,6 +53,7 @@ order: 5
53
53
  <EuiPopover
54
54
  @isOpen={{this.popover}}
55
55
  @closePopover={{set this 'popover' false}}
56
+ @anchorPosition='leftCenter'
56
57
  @panelPaddingSize='none'
57
58
  >
58
59
  <:button>
@@ -86,7 +87,7 @@ order: 5
86
87
  {{alert.date}}
87
88
  </:date>
88
89
  <:badge>
89
- <EuiBadge>{{alert.badge}}</EuiBadge>
90
+ <EuiBadge @color={{alert.badgeColor}}>{{alert.badge}}</EuiBadge>
90
91
  </:badge>
91
92
  </EuiHeaderAlert>
92
93
  {{/each}}
@@ -127,7 +128,11 @@ order: 5
127
128
  {{alert.date}}
128
129
  </:date>
129
130
  <:badge>
130
- <EuiBadge>{{alert.badge}}</EuiBadge>
131
+ <EuiBadge
132
+ @color={{alert.badgeColor}}
133
+ >
134
+ {{alert.badge}}
135
+ </EuiBadge>
131
136
  </:badge>
132
137
  </EuiHeaderAlert>
133
138
  {{/each}}
@@ -174,42 +179,48 @@ export default class DemoHeaderComponent extends Component {
174
179
  text: 'Show or hide applications and features per space in Kibana.',
175
180
  action: 'Learn about feature controls',
176
181
  date: '1 May 2019',
177
- badge: 7.1
182
+ badge: '7.1',
183
+ badgeColor: 'default'
178
184
  },
179
185
  {
180
186
  title: 'Kibana 7.0 is turning heads',
181
187
  text: 'Simplified navigation, responsive dashboards, dark mode… pick your favorite.',
182
188
  action: 'Read the blog',
183
189
  date: '10 April 2019',
184
- badge: 7.0
190
+ badge: '7.0',
191
+ badgeColor: 'hollow'
185
192
  },
186
193
  {
187
194
  title: 'Enter dark mode',
188
195
  text: 'Kibana now supports the easy-on-the-eyes theme across the entire UI.',
189
196
  action: 'Go to Advanced Settings',
190
197
  date: '10 April 2019',
191
- badge: 7.0
198
+ badge: '7.0',
199
+ badgeColor: 'hollow'
192
200
  },
193
201
  {
194
202
  title: 'Pixel-perfect Canvas is production ready',
195
203
  text: 'Your creative space for visualizing data awaits.',
196
204
  action: 'Watch the webinar',
197
205
  date: '26 March 2019',
198
- badge: 6.7
206
+ badge: '6.7',
207
+ badgeColor: 'hollow'
199
208
  },
200
209
  {
201
210
  title: '6.7 release notes',
202
211
  text: 'Stay up-to-date on the latest and greatest features.',
203
212
  action: 'Check out the docs',
204
213
  date: '26 March 2019',
205
- badge: 6.7
214
+ badge: '6.7',
215
+ badgeColor: 'hollow'
206
216
  },
207
217
  {
208
218
  title: 'Rollups made simple in Kibana',
209
219
  text: 'Save space and preserve the integrity of your data directly in the UI.',
210
220
  action: 'Read the blog',
211
221
  date: '10 January 2019',
212
- badge: 6.5
222
+ badge: '6.5',
223
+ badgeColor: 'hollow'
213
224
  }
214
225
  ];
215
226
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 6
2
+ order: 7
3
3
  ---
4
4
 
5
5
  # Header notifications
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 6
2
+ order: 8
3
3
  ---
4
4
 
5
5
  # Stacked headers
@@ -18,8 +18,11 @@ order: 6
18
18
  />
19
19
  </EuiFlexItem>
20
20
  </EuiFlexGroup>
21
+
21
22
  <EuiSpacer />
22
- <EuiHeader @position={{this.position}}>
23
+
24
+ <!-- header 1 -->
25
+ <EuiHeader @position={{this.position}} @theme='dark'>
23
26
  <EuiHeaderSection @side='left'>
24
27
  <EuiHeaderSectionItem @border='right'>
25
28
  <EuiHeaderLogo>Elastic</EuiHeaderLogo>
@@ -28,43 +31,46 @@ order: 6
28
31
  <EuiHeaderSection @side='right'>
29
32
  <EuiHeaderSectionItem>
30
33
  <EuiHeaderSectionItemButton
31
- @notification={{if this.notificationNumber true false}}
32
- @notificationColor='accent'
33
- @ref={{set this 'bellRef'}}
34
+ aria-label='Account menu'
34
35
  >
35
- <EuiIcon @type='bell' />
36
- </EuiHeaderSectionItemButton>
37
- </EuiHeaderSectionItem>
38
- <EuiHeaderSectionItem>
39
- <EuiHeaderSectionItemButton
40
- @notification={{this.notificationNumber}}
41
- @notificationColor='accent'
42
- @ref={{set this 'cheerRef'}}
43
- >
44
- <EuiIcon @type='cheer' />
36
+ <EuiAvatar
37
+ @name='John Username'
38
+ @type='user'
39
+ @initialLength={{2}}
40
+ @size='s'
41
+ />
45
42
  </EuiHeaderSectionItemButton>
46
43
  </EuiHeaderSectionItem>
47
44
  </EuiHeaderSection>
48
45
  </EuiHeader>
49
- <EuiHeader @position={{this.position}} @theme='dark'>
46
+
47
+ <!-- header 2 -->
48
+ <EuiHeader @position={{this.position}}>
50
49
  <EuiHeaderSection @side='left'>
51
- <EuiHeaderSectionItem @border='right'>
52
- <EuiHeaderLogo>Elastic</EuiHeaderLogo>
53
- </EuiHeaderSectionItem>
54
- </EuiHeaderSection>
55
- <EuiHeaderSection @side='right'>
56
50
  <EuiHeaderSectionItem>
57
51
  <EuiHeaderSectionItemButton
58
- @notification={{if this.notificationNumber true false}}
59
- @notificationColor='accent'
60
- @ref={{set this 'bellRef'}}
52
+ @border='right'
53
+ aria-label='Account menu'
61
54
  >
62
- <EuiIcon @type='bell' />
55
+ <EuiAvatar
56
+ @name="Default Space"
57
+ @type='space'
58
+ @initialLength={{2}}
59
+ @size='s'
60
+ />
63
61
  </EuiHeaderSectionItemButton>
64
62
  </EuiHeaderSectionItem>
63
+ </EuiHeaderSection>
64
+
65
+ <EuiHeaderBreadcrumbs
66
+ aria-label='Header breadcrumbs example'
67
+ @breadcrumbs={{this.breadcrumbs}}
68
+ />
69
+
70
+ <EuiHeaderSection @side='right'>
65
71
  <EuiHeaderSectionItem>
66
72
  <EuiHeaderSectionItemButton
67
- @notification={{this.notificationNumber}}
73
+ @notification={{true}}
68
74
  @notificationColor='accent'
69
75
  @ref={{set this 'cheerRef'}}
70
76
  >
@@ -83,6 +89,21 @@ import { action } from '@ember/object';
83
89
  export default class DemoHeaderComponent extends Component {
84
90
  @tracked position = 'static';
85
91
 
92
+ breadcrumbs = [
93
+ {
94
+ text: 'Management',
95
+ href: '#',
96
+ onClick: this.breadcrumOnClick
97
+ },
98
+ {
99
+ text: 'Users'
100
+ }
101
+ ];
102
+
103
+ breadcrumOnClick(e) {
104
+ e.preventDefault();
105
+ }
106
+
86
107
  setPosition = (e) => {
87
108
  if (e.target.checked) {
88
109
  this.position = 'fixed';
@@ -0,0 +1,9 @@
1
+ ---
2
+ order: 9
3
+ ---
4
+
5
+ # The Elastic navigation pattern
6
+
7
+ ```hbs template
8
+ <TodoText/>
9
+ ```
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Header
3
+ ---
4
+
5
+ <EuiPageHeader @pageTitle="Header"/>
6
+
7
+ <EuiHorizontalRule/>
@@ -0,0 +1,14 @@
1
+ ---
2
+ order: 1
3
+ ---
4
+
5
+ ```hbs template
6
+ <div class="eui-textCenter">
7
+ <EuiCode>quarter</EuiCode>
8
+ <EuiHorizontalRule @size="quarter" />
9
+ <EuiCode>half</EuiCode>
10
+ <EuiHorizontalRule @size="half" />
11
+ <EuiCode>full (default)</EuiCode>
12
+ <EuiHorizontalRule />
13
+ </div>
14
+ ```