@ember-eui/core 5.0.0-alpha.6 → 5.0.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 (41) hide show
  1. package/addon/components/eui-page/index.hbs +13 -18
  2. package/addon/components/eui-page-body/index.hbs +19 -36
  3. package/addon/components/eui-page-content/index.hbs +20 -17
  4. package/addon/components/eui-page-content-body/index.hbs +16 -15
  5. package/addon/components/eui-page-content-header/index.hbs +1 -13
  6. package/addon/components/eui-page-header/index.hbs +91 -33
  7. package/addon/components/eui-page-header-content/index.hbs +247 -182
  8. package/addon/components/eui-page-template/index.hbs +723 -395
  9. package/addon/components/eui-page-template/index.ts +44 -16
  10. package/addon/components/eui-split-panel/outer/index.hbs +5 -4
  11. package/addon/helpers/eui-page-restrict-width.ts +37 -0
  12. package/addon/{components/eui-split-panel/outer/index.ts → modifiers/use-is-within-breakpoints.ts} +2 -11
  13. package/addon/utils/css-mappings/eui-page.ts +19 -1
  14. package/addon/utils/css-mappings/eui-tabs.ts +1 -1
  15. package/app/helpers/eui-page-restrict-width.js +4 -0
  16. package/app/modifiers/use-is-within-breakpoints.js +1 -0
  17. package/docs/layout/page-header/demo/demo1.md +23 -0
  18. package/docs/layout/page-header/demo/demo2.md +23 -0
  19. package/docs/layout/page-header/demo/demo3.md +14 -0
  20. package/docs/layout/page-header/demo/demo4.md +52 -0
  21. package/docs/layout/page-header/demo/demo5.md +64 -0
  22. package/docs/layout/page-header/demo/demo6.md +21 -0
  23. package/docs/layout/page-header/index.md +11 -0
  24. package/docs/layout/{page-demo → page-template/demo}/demo1.md +36 -14
  25. package/docs/layout/page-template/demo/demo10.md +58 -0
  26. package/docs/layout/{page-demo → page-template/demo}/demo2.md +14 -4
  27. package/docs/layout/{page-demo → page-template/demo}/demo3.md +19 -8
  28. package/docs/layout/page-template/demo/demo4.md +43 -0
  29. package/docs/layout/page-template/demo/demo5.md +54 -0
  30. package/docs/layout/{page-demo → page-template/demo}/demo6.md +10 -2
  31. package/docs/layout/{page-demo → page-template/demo}/demo7.md +0 -0
  32. package/docs/layout/page-template/demo/demo8.md +46 -0
  33. package/docs/layout/page-template/demo/demo9.md +43 -0
  34. package/docs/layout/page-template/index.md +11 -0
  35. package/package.json +2 -2
  36. package/docs/layout/page-demo/demo10.md +0 -42
  37. package/docs/layout/page-demo/demo4.md +0 -38
  38. package/docs/layout/page-demo/demo5.md +0 -30
  39. package/docs/layout/page-demo/demo8.md +0 -19
  40. package/docs/layout/page-demo/demo9.md +0 -29
  41. package/docs/layout/page.md +0 -1
@@ -1,27 +1,22 @@
1
- {{#let (arg-or-default @restrictWidth false) as |restrictWidth|}}
2
- {{#let
3
- (if
4
- (eq restrictWidth true)
5
- (hash widthClassName="euiPage--restrictWidth-default")
6
- (if
7
- (not-eq restrictWidth false)
8
- (hash
9
- widthClassName="euiPage--restrictWidth-custom"
10
- widthStyle=restrictWidth
11
- )
12
- )
13
- ) as |styling|
14
- }}
1
+ {{#let
2
+ (arg-or-default @restrictWidth false)
3
+ (arg-or-default @paddingSize "m")
4
+ (arg-or-default @grow true)
5
+ (arg-or-default @direction "row")
6
+ as |restrictWidth paddingSize grow direction|
7
+ }}
8
+ {{#let (eui-page-restrict-width restrictWidth @style) as |styling|}}
15
9
  <div
16
10
  class={{class-names
17
- (if @grow "euiPage--grow" "")
18
- styling.widthClassName
11
+ (if grow "euiPage--grow")
12
+ (concat "euiPage--" styling.widthClassName)
19
13
  componentName="EuiPage"
20
- paddingSize=(arg-or-default @paddingSize "m")
14
+ paddingSize=paddingSize
15
+ direction=direction
21
16
  }}
22
17
  ...attributes
23
18
  {{style
24
- (if styling.widthStyle (inline-styles max-width=styling.widthStyle))
19
+ (if styling.newStyle (inline-styles styling.newStyle))
25
20
  (inline-styles min-height="460px;")
26
21
  }}
27
22
  >
@@ -1,63 +1,46 @@
1
1
  {{#let
2
- (arg-or-default @tagName "div")
3
2
  (arg-or-default @restrictWidth false)
3
+ (arg-or-default @tagName "div")
4
4
  (arg-or-default @borderRadius "none")
5
5
  (arg-or-default @paddingSize (if @panelled "l" "none"))
6
- as |tagName restrictWidth borderRadius paddingSize|
6
+ as |restrictWidth tagName borderRadius paddingSize|
7
7
  }}
8
8
 
9
- {{#let
10
- (if
11
- (eq restrictWidth true)
12
- (hash widthClassName="euiPageBody--restrictWidth-custom")
13
- (if
14
- (eq restrictWidth false)
15
- (hash
16
- widthClassName="euiPageBody--restrictWidth-default"
17
- widthStyle=restrictWidth
18
- )
19
- )
20
- )
21
- as |styling|
22
- }}
9
+ {{#let (eui-page-restrict-width restrictWidth @style) as |styling|}}
23
10
  {{#if @panelled}}
24
11
  <EuiPanel
25
12
  class={{class-names
13
+ (if (eq borderRadius "none") "euiPageBody--borderRadiusNone")
14
+ (if
15
+ styling.widthClassName
16
+ (concat "euiPageBody--" styling.widthClassName)
17
+ )
26
18
  componentName="EuiPageBody"
27
- borderRadiusSize=borderRadius
28
19
  paddingSize=@paddingSize
29
20
  }}
30
21
  @paddingSize={{paddingSize}}
31
22
  @borderRadius={{borderRadius}}
32
- {{!-- @paddingSize={{arg-or-default @paddingSize "none"}} --}}
33
- {{!-- @restrictWidth={{@restrictWidth}} --}}
23
+ @color={{@color}}
24
+ @hasBorder={{@hasBorder}}
25
+ @hasShadow={{@hasShadow}}
26
+ {{style styling.newStyle}}
34
27
  ...attributes
35
- {{style
36
- (if styling.widthStyle (inline-styles max-width=styling.widthStyle))
37
- }}
38
28
  >
39
- {{!-- <div
40
- class={{class-names
41
- componentName="EuiPageBody"
42
- borderRadiusSize=borderRadius
43
- paddingSize=paddingSize
44
- }}
45
- > --}}
46
29
  {{yield}}
47
- {{! </div> }}
48
30
  </EuiPanel>
49
31
  {{else}}
50
32
  {{#let (element tagName) as |Tag|}}
51
33
  <Tag
52
34
  class={{class-names
35
+ (if (eq borderRadius "none") "euiPageBody--borderRadiusNone")
36
+ (if
37
+ styling.widthClassName
38
+ (concat "euiPageBody--" styling.widthClassName)
39
+ )
53
40
  componentName="EuiPageBody"
54
- borderRadiusSize=borderRadius
55
- paddingSize=paddingSize
56
- }}
57
- style={{if
58
- styling.widthStyle
59
- (inline-styles max-width=styling.widthStyle)
41
+ paddingSize=@paddingSize
60
42
  }}
43
+ {{style styling.newStyle}}
61
44
  ...attributes
62
45
  >
63
46
  {{yield}}
@@ -1,17 +1,20 @@
1
- <EuiPanel
2
- class={{class-names
3
- componentName="EuiPageContent"
4
- verticalPosition=@verticalPosition
5
- horizontalPosition=@horizontalPosition
6
- borderRadius=@borderRadius
7
- }}
8
- @hasShadow={{@hasShadow}}
9
- @hasBorder={{@hasBorder}}
10
- @paddingSize={{arg-or-default @paddingSize "l"}}
11
- @borderRadius={{@borderRadius}}
12
- @color={{@color}}
13
- @grow={{@grow}}
14
- ...attributes
15
- >
16
- {{yield}}
17
- </EuiPanel>
1
+ {{#let (arg-or-default @role "main") as |role|}}
2
+ <EuiPanel
3
+ role={{if (eq role null) undefined role}}
4
+ class={{class-names
5
+ (if (eq @borderRadius "none") "euiPageContent--borderRadiusNone")
6
+ componentName="EuiPageContent"
7
+ verticalPosition=@verticalPosition
8
+ horizontalPosition=@horizontalPosition
9
+ }}
10
+ @hasShadow={{@hasShadow}}
11
+ @hasBorder={{@hasBorder}}
12
+ @paddingSize={{arg-or-default @paddingSize "l"}}
13
+ @borderRadius={{@borderRadius}}
14
+ @color={{@color}}
15
+ @grow={{@grow}}
16
+ ...attributes
17
+ >
18
+ {{yield}}
19
+ </EuiPanel>
20
+ {{/let}}
@@ -1,15 +1,16 @@
1
- <div
2
- class={{class-names
3
- (if
4
- @restrictWidth
5
- "euiPage--restrictWidth-custom"
6
- "euiPage--restrictWidth-default"
7
- )
8
- componentName="EuiPageContentBody"
9
- paddingSize=@paddingSize
10
- }}
11
- {{style (inline-styles width=@restrictWidth)}}
12
- ...attributes
13
- >
14
- {{yield}}
15
- </div>
1
+ {{#let
2
+ (eui-page-restrict-width (arg-or-default @restrictWidth false) @style)
3
+ as |styling|
4
+ }}
5
+ <div
6
+ class={{class-names
7
+ (concat "euiPage--" styling.widthClassName)
8
+ componentName="EuiPageContentBody"
9
+ paddingSize=@paddingSize
10
+ }}
11
+ {{style styling.newStyle}}
12
+ ...attributes
13
+ >
14
+ {{yield}}
15
+ </div>
16
+ {{/let}}
@@ -2,20 +2,8 @@
2
2
  class={{class-names
3
3
  "euiPageContentHeader"
4
4
  (if @responsive "euiPageContentHeader--responsive")
5
- (if
6
- @restrictWidth
7
- "euiPanel--restrictWidth-custom"
8
- "euiPanel--restrictWidth-default"
9
- )
10
5
  }}
11
- {{style (inline-styles width=@restrictWidth)}}
12
6
  ...attributes
13
7
  >
14
- {{yield
15
- (hash
16
- Section=(component
17
- "eui-page-content-header-section"
18
- )
19
- )
20
- }}
8
+ {{yield}}
21
9
  </div>
@@ -1,36 +1,94 @@
1
- <header
2
- class={{class-names
3
- (if @bottomBorder "euiPageHeader--bottomBorder")
4
- (if @responsive "euiPageHeader--responsive")
5
- (if (and @pageTitle @tabs) "euiPageHeader--tabsAtBottom")
6
- (if
7
- (and @tabs (not @pageTitle) (not @rightSideItems) (not @description))
8
- "euiPageHeader--onlyTabs"
1
+ {{#let
2
+ (eui-page-restrict-width (arg-or-default @restrictWidth false) @style)
3
+ (arg-or-default @responsive true)
4
+ (and (arg-or-default @hasDefaultBlock true) (has-block "default"))
5
+ (or
6
+ (and (arg-or-default @hasDescriptionBlock true) (has-block "description"))
7
+ @description
8
+ )
9
+ (or
10
+ (and (arg-or-default @hasPageTitleBlock true) (has-block "pageTitle"))
11
+ @pageTitle
12
+ )
13
+ (or
14
+ (and
15
+ (arg-or-default @hasRightSideItemsBlock true) (has-block "rightSideItems")
9
16
  )
10
- (if (eq @responsive "reverse") "euiPageHeader--responsiveReverse")
11
- (if
12
- @alignItems (concat "euiPageHeader--" @alignItems) "euiPageHeader--center"
17
+ @rightSideItems
18
+ )
19
+ as |styling responsive hasDefaultBlock hasDescriptionBlock hasPageTitleBlock hasRightSideItemsBlock|
20
+ }}
21
+ {{#let
22
+ (class-names
23
+ (if
24
+ styling.widthClassName (concat "euiPageHeader--" styling.widthClassName)
25
+ )
26
+ (if @bottomBorder "euiPageHeader--bottomBorder")
27
+ (if responsive "euiPageHeader--responsive")
28
+ (if (eq responsive "reverse") "euiPageHeader--responsiveReverse")
29
+ (if (and hasPageTitleBlock @tabs) "euiPageHeader--tabsAtBottom")
30
+ (if
31
+ (and
32
+ @tabs
33
+ (not hasPageTitleBlock)
34
+ (not hasRightSideItemsBlock)
35
+ (not hasDescriptionBlock)
36
+ (not hasDefaultBlock)
37
+ )
38
+ "euiPageHeader--onlyTabs"
39
+ )
40
+ (if
41
+ @alignItems
42
+ (concat "euiPageHeader--" @alignItems)
43
+ "euiPageHeader--center"
44
+ )
45
+ componentName="EuiPageHeader"
46
+ paddingSize=@paddingSize
13
47
  )
14
- (if
15
- (eq @restrictWidth true)
16
- "euiPageHeader--restrictWidth-default"
17
- (if (not-eq @restrictWidth false) "euiPageHeader--restrictWidth-custom")
18
- )
19
- componentName="EuiPageHeader"
20
- paddingSize=@paddingSize
48
+ as |classes|
21
49
  }}
22
- ...attributes
23
- >
24
- <EuiPageHeaderContent
25
- @alignItems={{@alignItems}}
26
- @responsive={{@responsive}}
27
- @pageTitle={{@pageTitle}}
28
- @iconType={{@iconType}}
29
- @tabs={{@tabs}}
30
- @description={{@description}}
31
- @rightSideItems={{@rightSideItems}}
32
- @restrictWidth={{@restrictWidth}}
33
- >
34
- {{yield}}
35
- </EuiPageHeaderContent>
36
- </header>
50
+ {{#if
51
+ (and
52
+ (not @tabs)
53
+ (not hasPageTitleBlock)
54
+ (not hasDescriptionBlock)
55
+ (not hasRightSideItemsBlock)
56
+ )
57
+ }}
58
+ <header class={{classes}} {{style styling.newStyle}} ...attributes>
59
+ {{yield to="default"}}
60
+ </header>
61
+ {{else}}
62
+ {{!template-lint-disable}}
63
+ <header class={{classes}} {{style styling.newStyle}} ...attributes>
64
+ <EuiPageHeaderContent
65
+ @alignItems={{@alignItems}}
66
+ @responsive={{responsive}}
67
+ @pageTitle={{@pageTitle}}
68
+ @iconType={{@iconType}}
69
+ @breadcrumbs={{@breadcrumbs}}
70
+ @tabs={{@tabs}}
71
+ @description={{@description}}
72
+ @restrictWidth={{@restrictWidth}}
73
+ @hasDescriptionBlock={{not (not hasDescriptionBlock)}}
74
+ @hasPageTitleBlock={{not (not hasPageTitleBlock)}}
75
+ @hasRightSideItemsBlock={{not (not hasRightSideItemsBlock)}}
76
+ @hasDefaultBlock={{not (not hasDefaultBlock)}}
77
+ >
78
+ <:pageTitle>
79
+ {{yield to="pageTitle"}}
80
+ </:pageTitle>
81
+ <:rightSideItems as |item|>
82
+ {{yield item to="rightSideItems"}}
83
+ </:rightSideItems>
84
+ <:description>
85
+ {{yield to="description"}}
86
+ </:description>
87
+ <:default>
88
+ {{yield to="default"}}
89
+ </:default>
90
+ </EuiPageHeaderContent>
91
+ </header>
92
+ {{/if}}
93
+ {{/let}}
94
+ {{/let}}