@ember-eui/core 5.0.0-alpha.1 → 5.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/addon/components/eui-combo-box/index.ts +1 -1
  2. package/addon/components/eui-empty-prompt/index.hbs +79 -73
  3. package/addon/components/eui-field-number/types.ts +4 -1
  4. package/addon/components/eui-flyout/index.ts +1 -1
  5. package/addon/components/eui-form-control-layout-custom-icon/types.ts +3 -1
  6. package/addon/components/eui-form-control-layout-icons/types.ts +4 -1
  7. package/addon/components/eui-global-toast-list/index.ts +5 -6
  8. package/addon/components/eui-image/index.ts +7 -2
  9. package/addon/components/eui-loading-logo/index.hbs +14 -0
  10. package/addon/components/eui-page-header/index.hbs +2 -2
  11. package/addon/components/eui-page-header-content/index.ts +1 -1
  12. package/addon/components/eui-page-template/index.ts +1 -1
  13. package/addon/components/eui-portal/index.ts +2 -1
  14. package/addon/components/eui-range-levels/index.ts +14 -3
  15. package/addon/components/eui-split-panel/inner/index.hbs +2 -1
  16. package/addon/components/eui-tab/index.hbs +57 -68
  17. package/addon/components/eui-tab/index.ts +6 -7
  18. package/addon/components/eui-tabs/index.hbs +2 -10
  19. package/addon/helpers/arg-or-default.ts +4 -1
  20. package/addon/helpers/eui-palette.ts +4 -1
  21. package/addon/helpers/get-tab-id.ts +8 -2
  22. package/addon/helpers/hex-to-rgb.ts +4 -1
  23. package/addon/helpers/inline-styles.ts +10 -3
  24. package/addon/helpers/is-within-number.ts +4 -1
  25. package/addon/helpers/starts-with.ts +3 -1
  26. package/addon/initializers/eui-config.ts +12 -0
  27. package/addon/modifiers/mutation-observer.ts +4 -1
  28. package/addon/modifiers/outside-click-detector.ts +4 -4
  29. package/addon/utils/accesibility/cascading-menu-keys.ts +8 -1
  30. package/addon/utils/code/utils.ts +1 -1
  31. package/addon/utils/color/color_palette.ts +3 -3
  32. package/addon/utils/color/eui_palettes.ts +23 -6
  33. package/addon/utils/css-mappings/eui-health.ts +1 -4
  34. package/addon/utils/css-mappings/eui-icon.ts +1 -2
  35. package/addon/utils/css-mappings/eui-list-group.ts +5 -1
  36. package/addon/utils/css-mappings/eui-modal.ts +5 -1
  37. package/addon/utils/markdown/markdown-types.ts +10 -11
  38. package/addon/utils/markdown/plugins/markdown-default-plugins/parsing-plugins.ts +1 -1
  39. package/addon/utils/markdown/plugins/markdown-default-plugins/plugins.ts +1 -1
  40. package/addon/utils/markdown/plugins/markdown-default-plugins/processing-plugins.ts +1 -1
  41. package/addon/utils/markdown/plugins/markdown-default-plugins/ui-plugins.ts +1 -1
  42. package/addon/utils/transition.ts +10 -3
  43. package/addon/version.ts +6 -0
  44. package/app/components/eui-avatar/index.js +1 -1
  45. package/app/components/eui-badge-group/badge-group-item/index.js +1 -1
  46. package/app/components/eui-badge-group/index.js +1 -1
  47. package/app/components/eui-button-icon/index.js +1 -1
  48. package/app/components/eui-combo-box/create-option/index.js +1 -1
  49. package/app/components/eui-comment/eui-comment-timeline/index.js +1 -1
  50. package/app/components/eui-comment/index.js +1 -1
  51. package/app/components/eui-dual-range/index.js +1 -1
  52. package/app/components/eui-field-number/index.js +1 -1
  53. package/app/components/eui-field-password/index.js +1 -1
  54. package/app/components/eui-field-search/index.js +1 -1
  55. package/app/components/eui-field-text/index.js +1 -1
  56. package/app/components/eui-file-picker/index.js +1 -1
  57. package/app/components/eui-form/index.js +1 -1
  58. package/app/components/eui-form-control-layout/index.js +1 -1
  59. package/app/components/eui-form-control-layout-clear-button/index.js +1 -1
  60. package/app/components/eui-form-control-layout-custom-icon/index.js +1 -1
  61. package/app/components/eui-form-control-layout-delimited/index.js +1 -1
  62. package/app/components/eui-form-control-layout-icons/index.js +1 -1
  63. package/app/components/eui-form-error-text/index.js +1 -1
  64. package/app/components/eui-form-fieldset/index.js +1 -1
  65. package/app/components/eui-form-help-text/index.js +1 -1
  66. package/app/components/eui-form-label/index.js +1 -1
  67. package/app/components/eui-form-legend/index.js +1 -1
  68. package/app/components/eui-form-row/index.js +1 -1
  69. package/app/components/eui-image.js +1 -1
  70. package/app/components/eui-list-group/index.js +1 -1
  71. package/app/components/eui-list-group-item/index.js +1 -1
  72. package/app/components/eui-loading-logo/index.js +1 -0
  73. package/app/components/eui-overlay-mask.js +1 -1
  74. package/app/components/eui-page/index.js +1 -1
  75. package/app/components/eui-page-body/index.js +1 -1
  76. package/app/components/eui-page-content/index.js +1 -1
  77. package/app/components/eui-page-content-body/index.js +1 -1
  78. package/app/components/eui-page-content-header/index.js +1 -1
  79. package/app/components/eui-page-content-header-section/index.js +1 -1
  80. package/app/components/eui-page-header/index.js +1 -1
  81. package/app/components/eui-page-header-content/index.js +1 -1
  82. package/app/components/eui-page-header-section/index.js +1 -1
  83. package/app/components/eui-panel/index.js +1 -1
  84. package/app/components/eui-popover/index.js +1 -1
  85. package/app/components/eui-popover-footer/index.js +1 -1
  86. package/app/components/eui-popover-title/index.js +1 -1
  87. package/app/components/eui-portal/index.js +1 -1
  88. package/app/components/eui-progress/index.js +1 -1
  89. package/app/components/eui-radio/index.js +1 -1
  90. package/app/components/eui-radio-group/index.js +1 -1
  91. package/app/components/eui-range/index.js +1 -1
  92. package/app/components/eui-range-highlight/index.js +1 -1
  93. package/app/components/eui-range-input/index.js +1 -1
  94. package/app/components/eui-range-label/index.js +1 -1
  95. package/app/components/eui-range-levels/index.js +1 -1
  96. package/app/components/eui-range-slider/index.js +1 -1
  97. package/app/components/eui-range-thumb/index.js +1 -1
  98. package/app/components/eui-range-ticks/index.js +1 -1
  99. package/app/components/eui-range-tooltip/index.js +1 -1
  100. package/app/components/eui-range-track/index.js +1 -1
  101. package/app/components/eui-range-wrapper/index.js +1 -1
  102. package/app/components/eui-select/index.js +1 -1
  103. package/app/components/eui-side-nav/index.js +1 -1
  104. package/app/components/eui-side-nav-item/button/index.js +1 -1
  105. package/app/components/eui-side-nav-item/index.js +1 -1
  106. package/app/components/eui-spacer/index.js +1 -1
  107. package/app/components/eui-switch/index.js +1 -1
  108. package/app/components/eui-tab/index.js +1 -1
  109. package/app/components/eui-tabs/index.js +1 -1
  110. package/app/components/eui-text/index.js +1 -1
  111. package/app/components/eui-text-align/index.js +1 -1
  112. package/app/components/eui-text-area/index.js +1 -1
  113. package/app/components/eui-text-color/index.js +1 -1
  114. package/app/components/eui-title/index.js +1 -1
  115. package/app/components/eui-tool-tip/index.js +1 -1
  116. package/app/components/eui-tool-tip-popover/index.js +1 -1
  117. package/app/helpers/eui-palette.js +1 -1
  118. package/app/helpers/hex-to-rgb.js +1 -1
  119. package/app/initializers/eui-config.js +1 -0
  120. package/docs/display/avatar.md +1 -9
  121. package/docs/display/badge-demo/demo1.md +93 -95
  122. package/docs/display/badge-demo/demo2.md +15 -17
  123. package/docs/display/badge-demo/demo3.md +19 -22
  124. package/docs/display/badge-demo/demo4.md +12 -14
  125. package/docs/display/badge-demo/demo5.md +16 -18
  126. package/docs/display/badge-demo/demo6.md +39 -51
  127. package/docs/display/badge-demo/demo7.md +43 -47
  128. package/docs/display/badge-demo/demo8.md +3 -6
  129. package/docs/display/badge.md +1 -9
  130. package/docs/display/callout.md +3 -9
  131. package/docs/display/comment-list.md +1 -9
  132. package/docs/display/description-list-demo/demo1.md +0 -1
  133. package/docs/display/description-list.md +1 -9
  134. package/docs/display/empty-prompt-demo/demo1.md +0 -24
  135. package/docs/display/empty-prompt-demo/demo2.md +16 -0
  136. package/docs/display/empty-prompt-demo/demo3.md +67 -0
  137. package/docs/display/empty-prompt-demo/demo4.md +21 -0
  138. package/docs/display/empty-prompt-demo/demo5.md +33 -0
  139. package/docs/display/empty-prompt-demo/demo6.md +43 -0
  140. package/docs/display/empty-prompt-demo/demo7.md +162 -0
  141. package/docs/display/empty-prompt-demo/demo8.md +57 -0
  142. package/docs/display/empty-prompt.md +1 -11
  143. package/docs/display/health-demo/demo1.md +0 -1
  144. package/docs/display/health.md +4 -10
  145. package/docs/display/icons.md +1 -9
  146. package/docs/display/image.md +6 -10
  147. package/docs/display/list-group.md +1 -9
  148. package/docs/display/loading/logo-demo/demo1.md +15 -0
  149. package/docs/display/loading/logo.md +1 -0
  150. package/docs/display/progress.md +1 -9
  151. package/docs/display/stat.md +4 -11
  152. package/docs/display/text.md +4 -12
  153. package/docs/display/title.md +1 -9
  154. package/docs/display/tool-tip-demo/demo1.md +40 -42
  155. package/docs/display/tool-tip-demo/demo2.md +24 -27
  156. package/docs/display/tool-tip-demo/demo3.md +33 -35
  157. package/docs/display/tool-tip-demo/demo4.md +4 -7
  158. package/docs/display/tool-tip.md +6 -10
  159. package/docs/editors/code/code-block.md +3 -9
  160. package/docs/editors/code/inline.md +1 -9
  161. package/docs/editors/markdown-editor/base-editor.md +1 -9
  162. package/docs/forms/form-controls/checkbox/index.md +1 -9
  163. package/docs/forms/form-controls/checkbox-group/index.md +1 -9
  164. package/docs/forms/form-controls/combo-box/index.md +1 -9
  165. package/docs/forms/form-controls/file-picker/index.md +1 -9
  166. package/docs/forms/form-controls/form-control-layout/index.md +1 -9
  167. package/docs/forms/form-controls/form-control-layout-delimited/index.md +1 -9
  168. package/docs/forms/form-controls/number-field/index.md +1 -9
  169. package/docs/forms/form-controls/password-field/index.md +1 -9
  170. package/docs/forms/form-controls/radio/index.md +1 -9
  171. package/docs/forms/form-controls/radio-group/index.md +1 -9
  172. package/docs/forms/form-controls/range/index.md +1 -9
  173. package/docs/forms/form-controls/search-field/index.md +1 -9
  174. package/docs/forms/form-controls/select/index.md +1 -9
  175. package/docs/forms/form-controls/switch/index.md +1 -9
  176. package/docs/forms/form-controls/text-field/index.md +1 -9
  177. package/docs/forms/form-controls/textarea/index.md +1 -10
  178. package/docs/forms/form-layouts/described-form-groups.md +1 -9
  179. package/docs/layout/accordion.md +1 -10
  180. package/docs/layout/bottom-bar.md +1 -9
  181. package/docs/layout/flex.md +1 -9
  182. package/docs/layout/flyout.md +1 -9
  183. package/docs/layout/header.md +1 -9
  184. package/docs/layout/horizontal-rule.md +1 -9
  185. package/docs/layout/modal.md +1 -9
  186. package/docs/layout/page.md +1 -9
  187. package/docs/layout/panel.md +2 -10
  188. package/docs/layout/popover.md +1 -9
  189. package/docs/navigation/breadcrumbs.md +1 -9
  190. package/docs/navigation/button.md +1 -9
  191. package/docs/navigation/collapsible-nav.md +1 -9
  192. package/docs/navigation/key-pad-menu.md +1 -9
  193. package/docs/navigation/link.md +1 -9
  194. package/docs/navigation/side-nav.md +1 -9
  195. package/docs/navigation/steps.md +1 -9
  196. package/docs/navigation/tabs-demo/demo1.md +38 -111
  197. package/docs/navigation/tabs-demo/demo2.md +56 -0
  198. package/docs/navigation/tabs-demo/demo3.md +79 -0
  199. package/docs/navigation/tabs-demo/demo4.md +102 -0
  200. package/docs/navigation/tabs.md +1 -9
  201. package/docs/utilities/auto-sizer.md +1 -9
  202. package/docs/utilities/copy.md +1 -9
  203. package/docs/utilities/mutation-observer.md +1 -9
  204. package/docs/utilities/outside-click-detector.md +1 -9
  205. package/docs/utilities/overlay-mask.md +1 -9
  206. package/docs/utilities/portal.md +1 -9
  207. package/docs/utilities/resize-observer.md +1 -9
  208. package/docs/utilities/responsive.md +1 -9
  209. package/index.js +4 -1
  210. package/package.json +2 -2
@@ -1,15 +1,9 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Callout
6
- </h1>
7
- </EuiTitle>
1
+ <EuiPageHeader @pageTitle="Callout"/>
2
+
8
3
  <EuiSpacer />
9
4
  <EuiText>
10
5
  <p>
11
6
  <strong>EuiCallOut</strong> contains a message directly related to content on the page. This includes general information, success, warning, and error messages.</p><p><strong>Keep these guidelines in mind:</strong></p><ul><li>Minimize the number of callouts per page.</li><li>Stack callouts in the order in which they require users' attention: error, warning, info, and then success.</li><li>Offer only one action per callout and ensure it's an action users can perform quickly.</li><li>If the callout has a permanent spot in the UI, but needs to be less obstructive, set the <EuiCode @language="text">size</EuiCode> property to <EuiCode @language=="text">s</EuiCode> (small).</li><li>Use an <EuiCode @language="text">icon</EuiCode> prop if it adds context.</li></ul>
12
7
  </EuiText>
13
8
 
14
- </EuiPageHeaderSection>
15
- </EuiPageHeader>
9
+ <EuiHorizontalRule />
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Comment List
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Comment List"/>
@@ -2,7 +2,6 @@
2
2
  order: 1
3
3
  ---
4
4
 
5
- # Description list
6
5
 
7
6
  <EuiText>
8
7
  <p>
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Description list
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Description list"/>
@@ -2,8 +2,6 @@
2
2
  order: 1
3
3
  ---
4
4
 
5
- # Basic Empty prompt
6
-
7
5
  <EuiText>
8
6
  While no one piece of content is required, each <strong>EuiEmptyPrompt</strong> should contain at least a <EuiCode>title</EuiCode> (wrapped in an HTML heading element) and/or a <EuiCode>description</EuiCode>. They usually contain one or more <EuiCode>actions</EuiCode> that promotes the primary call-to-actions. You can also provide a <EuiCode>footer</EuiCode> to direct users towards making informed decisions.
9
7
  </EuiText>
@@ -25,25 +23,3 @@ order: 1
25
23
  </:footer>
26
24
  </EuiEmptyPrompt>
27
25
  ```
28
-
29
- ```js component
30
- import Component from '@glimmer/component';
31
- import { tracked } from '@glimmer/tracking';
32
- import { action } from '@ember/object';
33
-
34
- export default class DemoIconComponent extends Component {
35
- tabs = [
36
- { label: 'Tab 1', isSelected: true },
37
- {
38
- label: 'Tab 2',
39
- onClick: this.setShowBottomBar
40
- }
41
- ];
42
- @tracked showing = false;
43
-
44
- @action
45
- setSHowBottomBar() {
46
- this.showing = !this.showing;
47
- }
48
- }
49
- ```
@@ -0,0 +1,16 @@
1
+ ---
2
+ order: 2
3
+ ---
4
+
5
+ # Less content, more actions
6
+
7
+ <EuiText>
8
+ You can remove parts of the prompt to simplify it. You can also provide an array of multiple actions. Be sure to list primary actions first and secondary actions as empty buttons.
9
+ </EuiText>
10
+
11
+ ```hbs template
12
+ <EuiEmptyPrompt
13
+ @title="Upgrade your license to use Machine Learning"
14
+ @actions={{array (component "eui-button-title" title="Add a case") (component "eui-button-title" title="Start a trial")}}
15
+ />
16
+ ```
@@ -0,0 +1,67 @@
1
+ ---
2
+ order: 3
3
+ ---
4
+
5
+ # Panel options
6
+
7
+ <EuiText>
8
+ The <strong>EuiEmptyPrompt</strong> is wrapped by <strong>EuiPanel</strong>. By default, the panel is set to <EuiCode>transparent</EuiCode> but you can customize other panel options like <EuiCode>color</EuiCode>, <EuiCode>hasBorder</EuiCode> and <EuiCode>paddingSize</EuiCode>. Changing the <EuiCode>color</EuiCode> prop will also attempt to adjust the <EuiCode>iconColor</EuiCode> and <EuiCode>footer</EuiCode> color.
9
+ </EuiText>
10
+
11
+ ```hbs template
12
+ {{#let (unique-id) as |selectId|}}
13
+ <EuiFormRow
14
+ @id={{selectId}}
15
+ >
16
+ <EuiSelect
17
+ @value={{this.panelColor}}
18
+ @hasNoInitialSelection={{true}}
19
+ @options={{array
20
+ (hash value='transparent' text='transparent')
21
+ (hash value='plain' text='plain')
22
+ (hash value='subdued' text='subdued')
23
+ (hash value='accent' text='accent')
24
+ (hash value='primary' text='primary')
25
+ (hash value='success' text='success')
26
+ (hash value='warning' text='warning')
27
+ (hash value='danger' text='danger')
28
+ }}
29
+ @id={{selectId}}
30
+ {{on 'change' (pick 'target.value' (set this 'panelColor'))}}
31
+ >
32
+ <:prepend as |classes|>
33
+ <EuiFormLabel class={{classes}} for={{selectId}}>
34
+ Color
35
+ </EuiFormLabel>
36
+ </:prepend>
37
+ </EuiSelect>
38
+ </EuiFormRow>
39
+ {{/let}}
40
+ <EuiSpacer @size="l" />
41
+ <EuiEmptyPrompt
42
+ @iconType='securityAnalyticsApp'
43
+ @color={{this.panelColor}}
44
+ @title='Start adding cases'
45
+ @body='There are no cases to display. Add a new case or change your filter
46
+ settings.'
47
+ @actions={{array (component 'eui-button-title' title='Add a case')}}
48
+ >
49
+ <:footer>
50
+ <EuiTitle @size='xxs'>
51
+ <h3>Want to learn more?</h3>
52
+ </EuiTitle>
53
+ <EuiLink href='#' target='_blank'>
54
+ Read documentation
55
+ </EuiLink>
56
+ </:footer>
57
+ </EuiEmptyPrompt>
58
+ ```
59
+
60
+ ```js component
61
+ import Component from '@glimmer/component';
62
+ import { tracked } from '@glimmer/tracking';
63
+
64
+ export default class DemoComponent extends Component {
65
+ @tracked panelColor = 'accent';
66
+ }
67
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ order: 4
3
+ ---
4
+
5
+ # Title sizes and icon colors
6
+
7
+ <EuiText>
8
+ Other customization options include changing the <EuiCode>titleSize</EuiCode> to any of the <strong>EuiTitle</strong> sizes and <EuiCode>iconColor</EuiCode>. When using an application or solution logo as the <EuiCode>iconType</EuiCode>, you can reset to the multi-tone colors with <EuiCode>iconColor="default"</EuiCode>
9
+ </EuiText>
10
+
11
+ ```hbs template
12
+ <EuiEmptyPrompt
13
+ @iconType='securityAnalyticsApp'
14
+ @iconColor='default'
15
+ @title='Start adding cases'
16
+ @titleSize='xs'
17
+ @body='There are no cases to display. Add a new case or change your filter
18
+ settings.'
19
+ @actions={{array (component 'eui-button-title' title='Add a case')}}
20
+ />
21
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ order: 5
3
+ ---
4
+
5
+ # Loading and error prompts
6
+
7
+ <EuiText>
8
+ Empty prompts can also be used to emulate loading and error states, by utilizing the same patterns.
9
+ For <strong>loading</strong> states, instead of passing a <EuiCode>iconType</EuiCode>, you can provide a custom <EuiCode>icon</EuiCode> and pass in one of our loading components.
10
+ </EuiText>
11
+
12
+ ```hbs template
13
+ <EuiEmptyPrompt @title='Loading Dashboards'>
14
+ <:icon>
15
+ <EuiLoadingLogo @logo='logoKibana' @size='xl' />
16
+ </:icon>
17
+ </EuiEmptyPrompt>
18
+ <EuiSpacer @size='l' />
19
+ <EuiText>
20
+ For error states, you can simply set the
21
+ <EuiCode>color</EuiCode>
22
+ to
23
+ <EuiCode>danger</EuiCode>.
24
+ </EuiText>
25
+ <EuiSpacer />
26
+ <EuiEmptyPrompt
27
+ @iconType='alert'
28
+ @color='danger'
29
+ @title='Error loading Dashboards'
30
+ @body='There was an error loading the Dashboard application. Contact your
31
+ administrator for help.'
32
+ />
33
+ ```
@@ -0,0 +1,43 @@
1
+ ---
2
+ order: 6
3
+ ---
4
+
5
+ # Layout
6
+
7
+ <EuiText>
8
+ You can supply a <EuiCode>layout</EuiCode> of either <EuiCode>"horizontal"</EuiCode> or <EuiCode>"vertical"</EuiCode> with the default being <EuiCode>vertical</EuiCode>. When creating empty states we want the content to be short and straight to the point. So most of the time, the <EuiCode>vertical</EuiCode> layout is enough.
9
+ All the content will be center aligned and this type of text alignment only works with small content. When you have longer body text with multiple calls to action, you can use the <EuiCode>horizontal</EuiCode> layout. This layout works best when you can provide a larger graphic like an illustration as the <EuiCode>icon</EuiCode>. For consistency, we recommend providing the illustration using a <strong>EuiImage</strong> with <EuiCode>size="fullWidth"</EuiCode>.
10
+ </EuiText>
11
+
12
+ ```hbs template
13
+ <EuiEmptyPrompt
14
+ @title='Create your first visualization'
15
+ @layout='horizontal'
16
+ @color='plain'
17
+ @body='There are no cases to display. Add a new case or change your filter
18
+ settings.'
19
+ @actions={{array (component 'eui-button-title' title='Create visualization')}}
20
+ >
21
+ <:icon>
22
+ <EuiImage @size='fullWidth' @src={{this.illustration}} alt='' />
23
+ </:icon>
24
+ <:body>
25
+ <p>
26
+ There are no visualizations to display. This tool allows you to create a
27
+ wide range of charts, graphs, maps, and other graphics.
28
+ </p>
29
+ <p>
30
+ The visualizations you create can be easily shared with your peers.
31
+ </p>
32
+ </:body>
33
+ </EuiEmptyPrompt>
34
+ ```
35
+
36
+ ```js component
37
+ import Component from '@glimmer/component';
38
+ import { tracked } from '@glimmer/tracking';
39
+
40
+ export default class DemoComponent extends Component {
41
+ @tracked illustration = 'https://source.unsplash.com/64x64/?cat';
42
+ }
43
+ ```
@@ -0,0 +1,162 @@
1
+ ---
2
+ order: 7
3
+ ---
4
+
5
+ # More types of empty states
6
+
7
+ <EuiText>
8
+ <strong>EuiEmptyPrompt</strong> can be used for more than just empty pages. The following example showcases different types of empty states that you can create with the <strong>EuiEmptyPrompt</strong>. For a full list see the usage guidelines.
9
+ </EuiText>
10
+
11
+ ```hbs template
12
+ {{#let (unique-id) as |selectId|}}
13
+ <EuiFormRow
14
+ @id={{selectId}}
15
+ >
16
+ <EuiSelect
17
+ @value={{this.exampleValue}}
18
+ @hasNoInitialSelection={{true}}
19
+ @options={{array
20
+ (hash value='page not found' text='Page not found')
21
+ (hash value='no permission' text='No permission')
22
+ (hash value='license upgrade' text='License Upgrade')
23
+ (hash value='complex' text='Complex')
24
+ }}
25
+ @id={{selectId}}
26
+ {{on 'change' (pick 'target.value' (set this 'exampleValue'))}}
27
+ >
28
+ <:prepend as |classes|>
29
+ <EuiFormLabel class={{classes}} for={{selectId}}>
30
+ Examples
31
+ </EuiFormLabel>
32
+ </:prepend>
33
+ </EuiSelect>
34
+ </EuiFormRow>
35
+ {{/let}}
36
+ <EuiSpacer @size="xl"/>
37
+ {{#if (eq this.exampleValue 'page not found')}}
38
+ <EuiEmptyPrompt
39
+ @title='Page not found'
40
+ @layout='vertical'
41
+ @body='The page you are looking for might have been removed or temporarily
42
+ unavailable.'
43
+ @actions={{array
44
+ (component 'eui-button-title' title='Go Home')
45
+ (component
46
+ 'eui-button-title' title='Go Back' iconType='arrowLeft' flush='left'
47
+ )
48
+ }}
49
+ >
50
+ <:icon>
51
+ <EuiImage @size='fullWidth' @src={{this.illustration}} alt='' />
52
+ </:icon>
53
+ </EuiEmptyPrompt>
54
+ {{else if (eq this.exampleValue 'no permission')}}
55
+ <EuiEmptyPrompt
56
+ @iconType='lock'
57
+ @color='subdued'
58
+ @title='Contact your administrator for access'
59
+ @body='To view cases in this space, you need additional privileges.'
60
+ />
61
+ {{else if (eq this.exampleValue 'license upgrade')}}
62
+ <EuiEmptyPrompt
63
+ @iconType='logoKibana'
64
+ @title='Do more with Kibana!'
65
+ @layout='vertical'
66
+ @hasBorder={{true}}
67
+ @body='Start a free trial or upgrade your license to use anomaly detection.'
68
+ @actions={{array
69
+ (component 'eui-button-title' title='Update')
70
+ (component 'eui-button-title' title='start a free trial' color='warning')
71
+ }}
72
+ >
73
+ <:footer>
74
+ <EuiTitle @size='xxs'>
75
+ <h3>Want to learn more?</h3>
76
+ </EuiTitle>
77
+ <EuiLink href='#' target='_blank'>
78
+ Read documentation
79
+ </EuiLink>
80
+ </:footer>
81
+ </EuiEmptyPrompt>
82
+ {{else}}
83
+ <EuiEmptyPrompt
84
+ @title='Get started by adding your data'
85
+ @layout='horizontal'
86
+ @color='plain'
87
+ @actions={{array
88
+ (component 'eui-button-title' title='Add your data')
89
+ (component
90
+ 'eui-button-title' title='Try sample data' color='warning'
91
+ )
92
+ }}
93
+ >
94
+ <:icon>
95
+ <EuiImage @size='fullWidth' @src={{this.illustration}} alt='' />
96
+ </:icon>
97
+ <:body>
98
+ <p>
99
+ To start working with your data, use one of our many ingest options.
100
+ Collect data from an app or service, or upload a file.
101
+ </p>
102
+ <p>
103
+ If you&apos;re not ready to use your own data, add a sample data set.
104
+ </p>
105
+ </:body>
106
+ <:footer>
107
+ <EuiFlexGroup class="eui-textLeft">
108
+ <EuiFlexItem @grow={{false}}>
109
+ <EuiTitle @size="xxs">
110
+ <h3>Want to learn more?</h3>
111
+ </EuiTitle>
112
+ <span>
113
+ <EuiButtonEmpty
114
+ href="#"
115
+ @iconType="popout"
116
+ @iconSide="right"
117
+ @iconSize="s"
118
+ @flush="both"
119
+ @size="s"
120
+ >
121
+ Read documentation
122
+ </EuiButtonEmpty>
123
+ </span>
124
+ </EuiFlexItem>
125
+ <EuiFlexItem @grow={{false}}>
126
+ <EuiTitle @size="xxs">
127
+ <h3>Pretty sure you have data?</h3>
128
+ </EuiTitle>
129
+ <span>
130
+ <EuiButtonEmpty
131
+ onClick={{this.onClick}}
132
+ @iconType="refresh"
133
+ @iconSide="right"
134
+ @iconSize="s"
135
+ @flush="both"
136
+ @size="s"
137
+ >
138
+ Check for new data
139
+ </EuiButtonEmpty>
140
+ </span>
141
+ </EuiFlexItem>
142
+ </EuiFlexGroup>
143
+ </:footer>
144
+ </EuiEmptyPrompt>
145
+ {{/if}}
146
+ ```
147
+
148
+ ```js component
149
+ import Component from '@glimmer/component';
150
+ import { tracked } from '@glimmer/tracking';
151
+ import { action } from '@ember/object';
152
+
153
+ export default class DemoComponent extends Component {
154
+ @tracked illustration = 'https://source.unsplash.com/64x64/?cat';
155
+ @tracked exampleValue = 'page not found';
156
+
157
+ @action
158
+ onClick(e){
159
+ e.preventDefault();
160
+ }
161
+ }
162
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ order: 8
3
+ ---
4
+
5
+ # Using in a page template
6
+
7
+ <EuiText>
8
+ When using a <strong>EuiEmptyPrompt</strong> in a <strong>EuiPageTemplate</strong>, pay attention to the template you’re passing. The template will determine which <EuiCode>color</EuiCode> and <EuiCode>hasBorder</EuiCode> prop you should use to ensure consistency across our Elastic products.
9
+
10
+ <!-- The following example shows the usage of a <strong>EuiEmptyPrompt</strong> in a page template where the template is set to "empty". -->
11
+ </EuiText>
12
+
13
+ ```hbs template
14
+ <EuiPageTemplate
15
+ @template='empty'
16
+ @pageContentProps={{hash paddingSize='none'}}
17
+ >
18
+ <EuiEmptyPrompt
19
+ @title='Create your first visualization'
20
+ @color='plain'
21
+ @layout='horizontal'
22
+ @actions={{array
23
+ (component 'eui-button-title' title='Create visualization')
24
+ }}
25
+ >
26
+ <:icon>
27
+ <EuiImage @size="fullWidth" @src={{this.illustration}} alt="" />
28
+ </:icon>
29
+ <:body>
30
+ <p>
31
+ There are no visualizations to display. This tool allows you to create a
32
+ wide range of charts, graphs, maps, and other graphics.
33
+ </p>
34
+ <p>
35
+ The visualizations you create can be easily shared with your peers.
36
+ </p>
37
+ </:body>
38
+ <:footer>
39
+ <EuiTitle @size='xxs'>
40
+ <span>Want to learn more?</span>
41
+ </EuiTitle>
42
+ <EuiLink href='#' target='_blank'>
43
+ Read documentation
44
+ </EuiLink>
45
+ </:footer>
46
+ </EuiEmptyPrompt>
47
+ </EuiPageTemplate>
48
+ ```
49
+
50
+ ```js component
51
+ import Component from '@glimmer/component';
52
+ import { tracked } from '@glimmer/tracking';
53
+
54
+ export default class DemoComponent extends Component {
55
+ @tracked illustration = 'https://source.unsplash.com/64x64/?cat';
56
+ }
57
+ ```
@@ -1,11 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Empty Prompt
6
- </h1>
7
- </EuiTitle>
8
- <EuiHorizontalRule @margin="m" />
9
- <EuiSpacer></EuiSpacer>
10
- </EuiPageHeaderSection>
11
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Empty Prompt"/>
@@ -2,7 +2,6 @@
2
2
  order: 1
3
3
  ---
4
4
 
5
- # Demo
6
5
 
7
6
  ```hbs template
8
7
  <EuiHealth @color='subdued'>
@@ -1,15 +1,9 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Health
6
- </h1>
7
- </EuiTitle>
8
- <EuiSpacer />
1
+ <EuiPageHeader @pageTitle="Health"/>
2
+
3
+ <EuiSpacer />
9
4
  <EuiText>
10
5
  <p>
11
6
  <p>The <strong>EuiHealth</strong> component should be used when showing comparitive health of listed objects (like servers, HTTP response status codes(as per convenience), nodes, indexes..etc). Because icons are vague and bulky and color alone does not work, color plus text provides a recognizable, lightweight combo that works in most situations.</p>
12
7
  </p>
13
8
  </EuiText>
14
- </EuiPageHeaderSection>
15
- </EuiPageHeader>
9
+ <EuiHorizontalRule />
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Icons
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Icons"/>
@@ -1,13 +1,9 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Image
6
- </h1>
7
- </EuiTitle>
8
- <EuiSpacer />
1
+
2
+ <EuiPageHeader @pageTitle="Image"/>
3
+
4
+ <EuiSpacer />
9
5
  <EuiText>
10
6
  <p>Use <strong>EuiImage</strong> when you need to place a static image into a page with an optional caption.</p>
11
7
  </EuiText>
12
- </EuiPageHeaderSection>
13
- </EuiPageHeader>
8
+
9
+ <EuiHorizontalRule />
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- List Group
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="List Group"/>
@@ -0,0 +1,15 @@
1
+ # Basic loading logo
2
+
3
+ <EuiText>
4
+ <strong>EuiLoadingLogo</strong> accepts any of our <strong>EuiIcon</strong> logos. It should only be used in very large panels, like full screen pages.
5
+ </EuiText>
6
+
7
+ ```hbs template
8
+ <div>
9
+ <EuiLoadingLogo />
10
+ &emsp;
11
+ <EuiLoadingLogo @logo='logoObservability' @size='l' />
12
+ &emsp;
13
+ <EuiLoadingLogo @logo='logoSecurity' @size='xl' />
14
+ </div>
15
+ ```
@@ -0,0 +1 @@
1
+ # Logo
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Progress
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Progress"/>
@@ -1,15 +1,8 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Stat
6
- </h1>
7
- </EuiTitle>
8
- <EuiSpacer></EuiSpacer>
9
- <EuiText>
1
+ <EuiPageHeader @pageTitle="Stat"/>
2
+
3
+ <EuiText>
10
4
  <p>
11
5
  <strong>EuiStat</strong> can be used to display prominent text or number values. It consists of <EuiCode>title</EuiCode> and <EuiCode>description</EuiCode> elements with several visual styling properties (examples below).
12
6
  </p>
13
7
  </EuiText>
14
- </EuiPageHeaderSection>
15
- </EuiPageHeader>
8
+ <EuiHorizontalRule />
@@ -1,13 +1,6 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Text
6
- </h1>
7
- </EuiTitle>
8
- <EuiHorizontalRule @margin="m" />
9
- <EuiSpacer></EuiSpacer>
10
- <EuiText>
1
+ <EuiPageHeader @pageTitle="Text"/>
2
+
3
+ <EuiText>
11
4
  <p>
12
5
  <strong>EuiText</strong> is a generic catchall wrapper that will apply our standard typography styling and spacing to naked HTML. Because of its forced style it <strong>only accepts raw XHTML</strong> and can not / should not be used to wrap React components (which would break their styling).
13
6
 
@@ -16,5 +9,4 @@ EuiText can ensure proper line-length for readability by setting a <EuiCode>max-
16
9
  </p>
17
10
  </EuiText>
18
11
 
19
- </EuiPageHeaderSection>
20
- </EuiPageHeader>
12
+ <EuiHorizontalRule />
@@ -1,9 +1 @@
1
- <EuiPageHeader>
2
- <EuiPageHeaderSection>
3
- <EuiTitle @size="l">
4
- <h1>
5
- Title
6
- </h1>
7
- </EuiTitle>
8
- </EuiPageHeaderSection>
9
- </EuiPageHeader>
1
+ <EuiPageHeader @pageTitle="Title"/>