@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
@@ -43,7 +43,7 @@
43
43
  {{yield this.isOpen to="buttonContent"}}
44
44
  </span>
45
45
  </ButtonElement>
46
- {{#if (and @extraAction (not this.isLoading))}}
46
+ {{#if (and @extraAction (has-block "extraAction") (not this.isLoading))}}
47
47
  <div class="euiAccordion__optionalAction">
48
48
  {{yield this.isOpen to="extraAction"}}
49
49
  </div>
@@ -73,7 +73,15 @@
73
73
  {{else}}
74
74
  <EuiLink
75
75
  {{did-insert setInnerTextRef}}
76
- @color={{if isLastBreadcrumb "text" "subdued"}}
76
+ @color={{if
77
+ breadcrumb.color
78
+ breadcrumb.color
79
+ (if
80
+ isLastBreadcrumb
81
+ "text"
82
+ "subdued"
83
+ )
84
+ }}
77
85
  @onClick={{breadcrumb.onClick}}
78
86
  @href={{breadcrumb.href}}
79
87
  title={{title}}
@@ -16,7 +16,7 @@
16
16
  <EuiPopover
17
17
  @isOpen={{this.pop1}}
18
18
  @anchorPosition="downRight"
19
- @panelPaddingSize={{@panelPaddingSize}}
19
+ @panelPaddingSize={{arg-or-default @panelPaddingSize 'none'}}
20
20
  @closePopover={{set this "pop1" false}}
21
21
  >
22
22
  <:button>
@@ -1,31 +1,37 @@
1
- <EuiPopover
2
- class="euiInputPopover {{if this.fullWidth "euiInputPopover--fullWidth"}}"
3
- @ownFocus={{false}}
4
- @buttonRef={{this.didInsertInput}}
5
- @panelRef={{this.didInsertPanel}}
6
- @anchorPosition={{this.anchorPosition}}
7
- @panelPaddingSize={{this.panelPaddingSize}}
8
- @attachToAnchor={{this.attachToAnchor}}
9
- @display={{this.display}}
10
- @closePopover={{@closePopover}}
11
- @isOpen={{@isOpen}}
12
- ...attributes
13
- >
14
- <:button>
15
- <div {{resize-observer onResize=this.onResize}}>
16
- {{yield to="input"}}
17
- </div>
18
- </:button>
19
- <:content>
20
- <div
21
- tabindex="-1"
22
- {{on-key "_all" this.onKeyDown}}
23
- {{focus-trap
24
- isActive=(not this.disableFocusTrap)
25
- focusTrapOptions=(hash clickOutsideDeactivates=true returnFocusOnDeactivate=false)
26
- }}
27
- >
28
- {{yield to="content"}}
29
- </div>
30
- </:content>
31
- </EuiPopover>
1
+ {{#let (unique-id) as |id|}}
2
+ <EuiPopover
3
+ class="euiInputPopover {{if this.fullWidth "euiInputPopover--fullWidth"}}"
4
+ @ownFocus={{false}}
5
+ @buttonRef={{this.didInsertInput}}
6
+ @panelRef={{this.didInsertPanel}}
7
+ @anchorPosition={{this.anchorPosition}}
8
+ @panelPaddingSize={{this.panelPaddingSize}}
9
+ @attachToAnchor={{this.attachToAnchor}}
10
+ @display={{this.display}}
11
+ @closePopover={{@closePopover}}
12
+ @isOpen={{@isOpen}}
13
+ ...attributes
14
+ >
15
+ <:button>
16
+ <div {{resize-observer onResize=this.onResize}}>
17
+ {{yield to="input"}}
18
+ </div>
19
+ </:button>
20
+ <:content>
21
+ <div
22
+ id={{id}}
23
+ {{on-key "_all" this.onKeyDown}}
24
+ {{focus-trap
25
+ isActive=(not this.disableFocusTrap)
26
+ focusTrapOptions=(hash
27
+ clickOutsideDeactivates=true
28
+ returnFocusOnDeactivate=false
29
+ fallbackFocus=(concat '#' id)
30
+ )
31
+ }}
32
+ >
33
+ {{yield to="content"}}
34
+ </div>
35
+ </:content>
36
+ </EuiPopover>
37
+ {{/let}}
@@ -88,10 +88,10 @@
88
88
  }}
89
89
  />
90
90
  {{/if}}
91
- {{#if @pageTitle}}
92
- {{@pageTitle}}
93
- {{yield to="pageTitle"}}
94
- {{/if}}
91
+
92
+ {{@pageTitle}}
93
+ {{yield to="pageTitle"}}
94
+
95
95
  </EuiTitle>
96
96
  {{/if}}
97
97
 
@@ -135,10 +135,9 @@
135
135
  }}
136
136
  />
137
137
  {{/if}}
138
- {{#if @pageTitle}}
139
- {{@pageTitle}}
140
- {{yield to="pageTitle"}}
141
- {{/if}}
138
+
139
+ {{@pageTitle}}
140
+ {{yield to="pageTitle"}}
142
141
  </EuiTitle>
143
142
  {{/if}}
144
143
 
@@ -226,10 +225,9 @@
226
225
  }}
227
226
  />
228
227
  {{/if}}
229
- {{#if @pageTitle}}
230
- {{@pageTitle}}
231
- {{yield to="pageTitle"}}
232
- {{/if}}
228
+
229
+ {{@pageTitle}}
230
+ {{yield to="pageTitle"}}
233
231
  </EuiTitle>
234
232
  {{/if}}
235
233
 
@@ -1,7 +1,10 @@
1
1
  {{#let
2
2
  (unique-id)
3
3
  (class-names
4
- position=this.anchorPosition display=this.display componentName="EuiPopover"
4
+ (if this.isOpening 'euiPopover-isOpen')
5
+ position=this.anchorPosition
6
+ display=this.display
7
+ componentName="EuiPopover"
5
8
  )
6
9
  (class-names
7
10
  "euiPopover__panel"
@@ -13,29 +16,35 @@
13
16
  )
14
17
  as |descriptionId classes panelClasses|
15
18
  }}
16
- {{#if this.ownFocus}}
19
+ <div
20
+ class={{classes}}
21
+ ...attributes
22
+ {{on-key "_all" this.onKeyDown}}
23
+ {{did-insert this.didInsertPopover}}
24
+ {{did-update this.didUpdateIsOpen @isOpen}}
25
+ {{did-update this.didUpdateRepositionOnScroll @repositionOnScroll}}
26
+ {{did-insert (optional @popoverRef)}}
27
+ >
28
+
29
+ {{!-- button --}}
17
30
  <div
18
- class="{{if this.isOpening 'euiPopover-isOpen'}} {{classes}}"
19
- ...attributes
20
- {{did-insert this.didInsertPopover}}
21
- {{did-insert (optional @popoverRef)}}
22
- {{did-update this.didUpdateIsOpen @isOpen}}
23
- {{did-update this.didUpdateRepositionOnScroll @repositionOnScroll}}
31
+ class="euiPopover__anchor {{@anchorClassName}}"
32
+ {{did-insert this.registerButton}}
24
33
  >
25
- <div
26
- class="euiPopover__anchor {{@anchorClassName}}"
27
- {{did-insert this.registerButton}}
28
- >
29
- {{yield to="button"}}
30
- </div>
31
- {{#if
32
- (and
33
- (not this.suppressingPopover) (or this.isCurrentlyOpen this.isClosing)
34
- )
35
- }}
36
- <EuiPortal @insert={{@insert}}>
37
- {{! template-lint-disable no-positive-tabindex }}
34
+ {{yield to="button"}}
35
+ </div>
36
+
37
+ {{!-- content --}}
38
+ {{#if
39
+ (and
40
+ (not this.suppressingPopover)
41
+ (or this.isCurrentlyOpen this.isClosing)
42
+ )
43
+ }}
44
+ <EuiPortal @insert={{@insert}}>
45
+ {{#let (unique-id) as |panelId|}}
38
46
  <EuiPanel
47
+ id={{panelId}}
39
48
  class={{panelClasses}}
40
49
  aria-live={{if this.ownFocus "off" "assertive"}}
41
50
  role="dialog"
@@ -43,24 +52,32 @@
43
52
  aria-labelledby={{@ariaLabelledBy}}
44
53
  aria-modal="true"
45
54
  aria-describedby={{if this.ownFocus descriptionId}}
55
+ tabindex={{this.tabindex}}
46
56
  @hasShadow={{false}}
47
57
  @paddingSize={{this.panelPaddingSize}}
48
58
  {{simple-style this._popoverStyles}}
49
59
  {{did-insert this.registerPanel}}
50
60
  {{outside-click-detector onOutsideClick=this.onClickOutside}}
51
61
  {{on-key "Escape" this.onEscapeKey}}
52
- tabindex={{this.tabindex}}
53
62
  {{focus-trap
54
63
  isActive=(not
55
- (or (not this.ownFocus) (not this.isOpenStable) this.isClosing)
64
+ (or
65
+ (not this.ownFocus)
66
+ (not this.isOpenStable)
67
+ this.isClosing
68
+ )
56
69
  )
57
- focusTrapOptions=(hash
58
- shouldSelfFocus=true
59
- returnFocusOnDeactivate=this.isOpenStable
60
- initialFocus=(or @initialFocus this.panel)
61
- onDeactivate=(optional @onTrapDeactivation)
62
- preventScroll=true
63
- clickOutsideDeactivates=true
70
+ focusTrapOptions=(merge
71
+ (hash
72
+ shouldSelfFocus=true
73
+ returnFocusOnDeactivate=this.isOpenStable
74
+ initialFocus=(or @initialFocus this.panel)
75
+ onDeactivate=(optional @onTrapDeactivation)
76
+ preventScroll=true
77
+ clickOutsideDeactivates=true
78
+ fallbackFocus=(concat '#' panelId)
79
+ )
80
+ @focusTrapOptions
64
81
  )
65
82
  }}
66
83
  >
@@ -75,87 +92,29 @@
75
92
  </div>
76
93
  {{#if this.ownFocus}}
77
94
  <p id={{descriptionId}} {{screen-reader-only}}>
78
- "You are in a dialog. To close this dialog, hit escape."
79
- </p>
80
- {{/if}}
81
- <div
82
- tabindex={{this.tabindex}}
83
- {{mutation-observer
84
- onMutation=this.onMutation
85
- observerOptions=(hash
86
- attributes=true childList=true characterData=true subtree=true
87
- )
88
- }}
89
- >
90
- {{yield to="content"}}
91
- </div>
92
- </EuiPanel>
93
- </EuiPortal>
94
- {{/if}}
95
- </div>
96
- {{else}}
97
- <div
98
- class={{classes}}
99
- ...attributes
100
- tabindex="-1"
101
- {{on-key "_all" this.onKeyDown}}
102
- {{did-insert this.didInsertPopover}}
103
- {{did-update this.didUpdateIsOpen @isOpen}}
104
- {{did-update this.didUpdateRepositionOnScroll @repositionOnScroll}}
105
- >
106
- <div
107
- class="euiPopover__anchor {{@anchorClassName}}"
108
- {{did-insert this.registerButton}}
109
- >
110
- {{yield to="button"}}
111
- </div>
112
- {{#if
113
- (and (not this.suppressingPopover) (or this.isOpen this.isClosing))
114
- }}
115
- <EuiPortal @insert={{@insert}}>
116
- <EuiPanel
117
- class={{panelClasses}}
118
- tabindex={{if this.ownFocus "0"}}
119
- aria-live={{if this.ownFocus "off" "assertive"}}
120
- role="dialog"
121
- aria-label={{@ariaLabel}}
122
- aria-labelledby={{@ariaLabelledBy}}
123
- aria-modal="true"
124
- aria-describedby={{if this.ownFocus descriptionId}}
125
- @hasShadow={{false}}
126
- @paddingSize={{this.panelPaddingSize}}
127
- {{simple-style this._popoverStyles}}
128
- {{did-insert this.registerPanel}}
129
- {{outside-click-detector onOutsideClick=this.onClickOutside}}
130
- {{on-key "Escape" this.onEscapeKey}}
131
- >
132
- <div
133
- class={{concat
134
- "euiPopover__panelArrow euiPopover__panelArrow--"
135
- this.arrowPosition
136
- }}
137
- style={{this._arrowStyles}}
138
- >
139
- {{yield to="arrowChildren"}}
140
- </div>
141
- {{#if this.ownFocus}}
142
- <p id={{descriptionId}} {{screen-reader-only}}>
143
- "You are in a dialog. To close this dialog, hit escape."
95
+ You are in a dialog. To close this dialog, hit escape.
144
96
  </p>
145
97
  {{/if}}
146
98
  <div
147
99
  {{mutation-observer
148
100
  onMutation=this.onMutation
149
- observerOptions=(hash
150
- attributes=true childList=true characterData=true subtree=true
101
+ observerOptions=(merge
102
+ (hash
103
+ attributes=true
104
+ childList=true
105
+ characterData=true
106
+ subtree=true
107
+ )
108
+ @mutationObserverOptions
151
109
  )
152
110
  }}
153
111
  >
154
112
  {{yield to="content"}}
155
113
  </div>
156
114
  </EuiPanel>
157
- </EuiPortal>
158
- {{/if}}
159
- </div>
160
- {{/if}}
115
+ {{/let}}
116
+ </EuiPortal>
117
+ {{/if}}
118
+
119
+ </div>
161
120
  {{/let}}
@@ -2,18 +2,23 @@
2
2
  (if
3
3
  @disabled
4
4
  "disabled"
5
- (if @isComplete "complete" (if @isSelected @status (unless @status "incomplete")))
6
- ) as |status|
5
+ (if
6
+ @isComplete
7
+ "complete"
8
+ (if @isSelected "current" (arg-or-default @status "incomplete"))
9
+ )
10
+ )
11
+ as |status|
7
12
  }}
8
13
  <li class="euiStepHorizontal__item" aria-current={{if @isSelected "step"}}>
9
14
  <button
10
15
  type="button"
11
16
  class={{class-names
12
17
  "euiStepHorizontal"
13
- (if @isSelected "euiStepHorizontal-isSelected")
14
- (if @isDisabled "isDisabled")
15
- (if @isComplete "euiStepHorizontal-isComplete")
16
- (if (and (not @isSelected) (not @isComplete)) "euiStepHorizontal-isIncomplete")
18
+ (if (eq status "current") "euiStepHorizontal-isSelected")
19
+ (if (eq status "complete") "euiStepHorizontal-isComplete")
20
+ (if (eq status "incomplete") "euiStepHorizontal-isIncomplete")
21
+ (if (eq status "disabled") "euiStepHorizontal-isDisabled")
17
22
  }}
18
23
  title={{@title}}
19
24
  disabled={{@disabled}}
@@ -0,0 +1,5 @@
1
+ import { helper } from '@ember/component/helper';
2
+
3
+ export default helper(function (hashes: Array<object>, hash: object) {
4
+ return Object.assign({}, ...hashes, hash);
5
+ });
@@ -50,6 +50,7 @@ export function inlineStyles({
50
50
  if (!isNamedColor) {
51
51
  checkValidColor(color);
52
52
 
53
+ name = name.length ? name : '';
53
54
  assignedColor =
54
55
  color || VIS_COLORS[Math.floor(name.length % VIS_COLORS.length)];
55
56
 
@@ -17,7 +17,7 @@ export const mobileGutterSizeMapping = {
17
17
  };
18
18
 
19
19
  const mapping: ComponentMapping = {
20
- base: baseClass,
20
+ base: '',
21
21
  properties: {
22
22
  gutterSize: gutterSizeMapping,
23
23
  mobileGutterSize: mobileGutterSizeMapping
@@ -0,0 +1 @@
1
+ export { default } from '@ember-eui/core/helpers/merge';
@@ -1,31 +1,15 @@
1
- <EuiPageHeader @pageTitle="Accordion"/>
2
- <EuiCallOut>
3
- <:body>
4
- <EuiText>
5
- Take care when including flex group content within accordions<br />
6
- <strong>EuiFlexGroup's</strong>
7
- negative margins can sometimes create scrollbars within
8
- <strong>EuiAccordion</strong>
9
- because of the overflow tricks used to hide content. If you run into this
10
- issue make sure your paddingSize prop is large enough to account for the
11
- <EuiCode>gutterSize</EuiCode>
12
- of any nested flex groups.
13
- </EuiText>
14
- </:body>
15
- </EuiCallOut>
1
+ ---
2
+ order: 1
3
+ ---
16
4
 
17
- <EuiSpacer />
18
- <EuiTitle>
19
- Simple and unstyled
20
- </EuiTitle>
21
- <EuiSpacer />
5
+ # Simple and unstyled
22
6
 
23
7
  <EuiText>
24
8
  <strong>EuiAccordion</strong>
25
9
  has been purposely designed with minimal styles, allowing you to visually
26
10
  enhance it as needed (see the accordion form example). The only styling
27
11
  enforced by EUI is the caret icon, which indicates to users that the item can
28
- be opened.<br /><br />
12
+ be opened.
29
13
  A
30
14
  <EuiCode>buttonContent</EuiCode>
31
15
  prop defines the content of the clickable area. On click it will expose the
@@ -36,4 +20,16 @@
36
20
  <EuiCode>buttonClassName</EuiCode>
37
21
  (for the clickable area).
38
22
  </EuiText>
39
- <EuiSpacer />
23
+
24
+ ```hbs template
25
+ <EuiAccordion>
26
+ <:buttonContent>
27
+ Click me to toggle
28
+ </:buttonContent>
29
+ <:content>
30
+ <EuiPanel @color="subdued" @hasShadow={{false}}>
31
+ Any content inside of <strong>EuiAccordion</strong> will appear here.
32
+ </EuiPanel>
33
+ </:content>
34
+ </EuiAccordion>
35
+ ```
@@ -0,0 +1,34 @@
1
+ ---
2
+ order: 2
3
+ ---
4
+
5
+ # Arrow display
6
+
7
+ <EuiText>
8
+ The arrow helps indicate the current state of the accordion (open or not) and points to the main triggering button text.
9
+ If you must hide or change the side in which the arrow appears, use <EuiCode>arrowDisplay: 'right'</EuiCode> or <EuiCode>'none'</EuiCode>
10
+ </EuiText>
11
+
12
+ ```hbs template
13
+ <EuiAccordion @arrowDisplay='right'>
14
+ <:buttonContent>
15
+ This accordion has the arrow on the right
16
+ </:buttonContent>
17
+ <:content>
18
+ <EuiPanel @color="subdued" @hasShadow={{false}}>
19
+ Any content inside of <strong>EuiAccordion</strong> will appear here.
20
+ </EuiPanel>
21
+ </:content>
22
+ </EuiAccordion>
23
+ <EuiSpacer />
24
+ <EuiAccordion @arrowDisplay='none'>
25
+ <:buttonContent>
26
+ This one has it removed entirely
27
+ </:buttonContent>
28
+ <:content>
29
+ <EuiPanel @color="subdued" @hasShadow={{false}}>
30
+ Any content inside of <strong>EuiAccordion</strong> will appear here.
31
+ </EuiPanel>
32
+ </:content>
33
+ </EuiAccordion>
34
+ ```
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 2
2
+ order: 3
3
3
  ---
4
4
 
5
5
  # Multiple accordions
@@ -23,7 +23,7 @@ order: 2
23
23
  An accordion with padding applied through props
24
24
  </:buttonContent>
25
25
  <:content>
26
- <EuiText size='s'>
26
+ <EuiText @size='s'>
27
27
  <p>The content inside can be of any height.</p>
28
28
  <p>The content inside can be of any height.</p>
29
29
  <p>The content inside can be of any height.</p>
@@ -37,7 +37,7 @@ order: 2
37
37
  because of eui-textTruncate
38
38
  </:buttonContent>
39
39
  <:content>
40
- <EuiText size='s'>
40
+ <EuiText @size='s'>
41
41
  <p>The content inside can be of any height.</p>
42
42
  <p>The content inside can be of any height.</p>
43
43
  <p>The content inside can be of any height.</p>
@@ -53,13 +53,14 @@ order: 2
53
53
  A third accordion with nested accordion
54
54
  </:buttonContent>
55
55
  <:content>
56
- <EuiText size='s'>
56
+ <EuiText @size='s'>
57
57
  <p>
58
58
  This content area will grow to accommodate when the accordion below
59
59
  opens
60
60
  </p>
61
61
  </EuiText>
62
- <EuiAccordion @paddingSize='m'>
62
+ <EuiSpacer/>
63
+ <EuiAccordion>
63
64
  <:buttonContent>
64
65
  A fourth nested accordion
65
66
  </:buttonContent>
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 3
2
+ order: 4
3
3
  ---
4
4
 
5
5
  # Extra actions
@@ -9,7 +9,7 @@ order: 3
9
9
  </EuiText>
10
10
 
11
11
  ```hbs template
12
- <EuiAccordion @paddingSize='m' @extraAction={{true}}>
12
+ <EuiAccordion @paddingSize='l' @extraAction={{true}}>
13
13
  <:buttonContent>
14
14
  Click to open
15
15
  </:buttonContent>
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 4
2
+ order: 5
3
3
  ---
4
4
 
5
5
  # Opened on initial render
@@ -11,7 +11,7 @@ order: 4
11
11
  </EuiText>
12
12
 
13
13
  ```hbs template
14
- <EuiAccordion @paddingSize='m' @initialIsOpen={{true}}>
14
+ <EuiAccordion @initialIsOpen={{true}}>
15
15
  <:buttonContent>
16
16
  I am opened by default. Click me to toggle close / open
17
17
  </:buttonContent>
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 5
2
+ order: 6
3
3
  ---
4
4
 
5
5
  # Controlling toggled state
@@ -8,7 +8,7 @@ order: 5
8
8
  Typically, the open and closed state of
9
9
  <strong>EuiAccordion</strong>
10
10
  is maintained by the component's internal state. Though, you can manually
11
- control it with:
11
+ control it.
12
12
  <ul>
13
13
  <li><EuiCode>forceState</EuiCode>: Accepts either
14
14
  <EuiCode>'open'</EuiCode>
@@ -21,6 +21,7 @@ order: 5
21
21
  </EuiText>
22
22
 
23
23
  ```hbs template
24
+ <TodoText @text="missing EuiButtonGroup component"/>
24
25
  <EuiFlexGroup>
25
26
  <EuiFlexItem>
26
27
  <EuiButton {{on 'click' (fn (mut this.accordionState) 'open')}}>
@@ -1,5 +1,5 @@
1
1
  ---
2
- order: 6
2
+ order: 7
3
3
  ---
4
4
 
5
5
  # Loading state
@@ -21,6 +21,7 @@ order: 6
21
21
  </EuiText> -->
22
22
 
23
23
  ```hbs template
24
+ <TodoText @text="missing EuiButtonGroup component"/>
24
25
  <EuiFlexGroup>
25
26
  <EuiFlexItem>
26
27
  <EuiText>