@ember-eui/core 5.4.2 → 5.5.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.
- package/addon/components/eui-button-icon/index.hbs +2 -2
- package/addon/components/eui-card/index.hbs +23 -18
- package/addon/components/eui-confirm-modal/index.hbs +13 -7
- package/addon/components/eui-loading-content/index.hbs +6 -1
- package/addon/components/eui-modal/index.hbs +2 -2
- package/addon/components/eui-selectable-list-item/index.hbs +24 -0
- package/addon/helpers/arg-or-default.ts +2 -1
- package/addon/utils/css-mappings/eui-selectable-list-item.ts +14 -0
- package/addon/utils/css-mappings/index.ts +2 -0
- package/app/components/eui-selectable-list-item/index.js +1 -0
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
componentName="EuiButtonIcon"
|
|
6
6
|
display=(arg-or-default @display "empty")
|
|
7
7
|
color=(arg-or-default @color "primary")
|
|
8
|
-
size=(arg-or-default @size "xs" configKey="euiButtonIcon.size")
|
|
8
|
+
size=(arg-or-default @size "xs" configKey="@ember-eui/core.euiButtonIcon.size")
|
|
9
9
|
}}
|
|
10
10
|
href={{@href}}
|
|
11
11
|
target={{@target}}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
componentName="EuiButtonIcon"
|
|
31
31
|
display=(arg-or-default @display "empty")
|
|
32
32
|
color=(arg-or-default @color "primary")
|
|
33
|
-
size=(arg-or-default @size "xs" configKey="euiButtonIcon.size")
|
|
33
|
+
size=(arg-or-default @size "xs" configKey="@ember-eui/core.euiButtonIcon.size")
|
|
34
34
|
}}
|
|
35
35
|
disabled={{or @isDisabled @disabled}}
|
|
36
36
|
aria-pressed={{if @isSelected "true" "false"}}
|
|
@@ -28,26 +28,31 @@
|
|
|
28
28
|
@paddingSize={{@paddingSize}}
|
|
29
29
|
...attributes
|
|
30
30
|
>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
|
|
32
|
+
{{#if (or (has-block "icon") (or @image @icon))}}
|
|
33
|
+
<div class="euiCard__top">
|
|
34
|
+
{{#if (has-block "icon")}}
|
|
35
|
+
{{yield "euiCard__icon" to="icon"}}
|
|
36
|
+
{{else}}
|
|
37
|
+
{{#if (or @image @icon)}}
|
|
38
|
+
{{#if (and @image (not-eq layout "horizontal"))}}
|
|
39
|
+
<div class="euiCard__image">
|
|
40
|
+
<img src={{@image}} alt="card-top" />
|
|
41
|
+
</div>
|
|
42
|
+
{{/if}}
|
|
43
|
+
{{#if @icon}}
|
|
44
|
+
<EuiIcon
|
|
45
|
+
@iconClasses="euiCard__icon"
|
|
46
|
+
@type={{@icon}}
|
|
47
|
+
@size={{@iconSize}}
|
|
48
|
+
/>
|
|
49
|
+
{{/if}}
|
|
47
50
|
{{/if}}
|
|
48
51
|
{{/if}}
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
</div>
|
|
53
|
+
{{/if}}
|
|
54
|
+
|
|
55
|
+
|
|
51
56
|
<div class="euiCard__content">
|
|
52
57
|
<EuiTitle class="euiCard__title" @size={{arg-or-default @titleSize "s"}}>
|
|
53
58
|
{{#if (has-block "title")}}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
<EuiModal
|
|
2
|
-
|
|
1
|
+
<EuiModal
|
|
2
|
+
class="euiModal--confirmation"
|
|
3
|
+
@onClose={{@onCancel}}
|
|
4
|
+
...attributes
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
{{#if (or @title (has-block 'title'))}}
|
|
3
8
|
<EuiModalHeader>
|
|
4
9
|
<EuiModalHeaderTitle>
|
|
5
10
|
{{@title}}
|
|
11
|
+
{{yield to='title'}}
|
|
6
12
|
</EuiModalHeaderTitle>
|
|
7
13
|
</EuiModalHeader>
|
|
8
14
|
{{/if}}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{{yield}}
|
|
12
|
-
</EuiModalBody>
|
|
13
|
-
{{else if @message}}
|
|
15
|
+
|
|
16
|
+
{{#if (or @message (has-block))}}
|
|
14
17
|
<EuiModalBody>
|
|
15
18
|
<EuiText>
|
|
16
19
|
{{@message}}
|
|
20
|
+
{{yield}}
|
|
17
21
|
</EuiText>
|
|
18
22
|
</EuiModalBody>
|
|
19
23
|
{{/if}}
|
|
24
|
+
|
|
20
25
|
<EuiModalFooter>
|
|
21
26
|
<EuiButtonEmpty {{on "click" @onCancel}}>
|
|
22
27
|
{{@cancelButtonText}}
|
|
@@ -31,4 +36,5 @@
|
|
|
31
36
|
{{@confirmButtonText}}
|
|
32
37
|
</EuiButton>
|
|
33
38
|
</EuiModalFooter>
|
|
39
|
+
|
|
34
40
|
</EuiModal>
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
isPaused=(arg-or-default @isFocusTrapPaused false)
|
|
26
26
|
focusTrapOptions=(arg-or-default @focusTrapOptions (hash))
|
|
27
27
|
}}
|
|
28
|
-
{{on-key "Escape" (prevent-default (stop-propagation @onClose))}}
|
|
28
|
+
{{on-key "Escape" (prevent-default (stop-propagation (optional @onClose)))}}
|
|
29
29
|
>
|
|
30
30
|
<EuiButtonIcon
|
|
31
31
|
class="euiModal__closeIcon"
|
|
32
32
|
@iconType="cross"
|
|
33
33
|
@color="text"
|
|
34
|
-
{{on "click" @onClose}}
|
|
34
|
+
{{on "click" (optional @onClose)}}
|
|
35
35
|
/>
|
|
36
36
|
<div class="euiModal__flex">
|
|
37
37
|
{{yield}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{{!-- TODO: not fully implemented --}}
|
|
2
|
+
|
|
3
|
+
<li
|
|
4
|
+
role="option"
|
|
5
|
+
aria-selected={{and (not @disabled) (eq (type-of @checked) 'string')}}
|
|
6
|
+
class={{class-names
|
|
7
|
+
componentName='EuiSelectableListItem'
|
|
8
|
+
isFocused=@isFocused
|
|
9
|
+
}}
|
|
10
|
+
aria-disabled={{@disabled}}
|
|
11
|
+
...attributes
|
|
12
|
+
>
|
|
13
|
+
<span class="euiSelectableListItem__content">
|
|
14
|
+
{{!-- {{optionIcon}} --}}
|
|
15
|
+
{{!-- {{prependNode}} --}}
|
|
16
|
+
<span class="euiSelectableListItem__text">
|
|
17
|
+
{{yield}}
|
|
18
|
+
{{!-- {{state}} --}}
|
|
19
|
+
{{!-- {{children}} --}}
|
|
20
|
+
{{!-- {{instruction}} --}}
|
|
21
|
+
</span>
|
|
22
|
+
{{!-- {{appendNode}} --}}
|
|
23
|
+
</span>
|
|
24
|
+
</li>
|
|
@@ -2,6 +2,7 @@ import { helper } from '@ember/component/helper';
|
|
|
2
2
|
import { assert } from '@ember/debug';
|
|
3
3
|
//@ts-ignore
|
|
4
4
|
import config from 'ember-get-config';
|
|
5
|
+
import { get } from '@ember/object';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Helper that returns a default value if the passed argument is undefined
|
|
@@ -17,7 +18,7 @@ export function argOrDefault(
|
|
|
17
18
|
assert('`defaultValue` must be provided', defaultValue !== undefined);
|
|
18
19
|
let configValue;
|
|
19
20
|
if (configKey) {
|
|
20
|
-
configValue = config
|
|
21
|
+
configValue = get(config, configKey);
|
|
21
22
|
}
|
|
22
23
|
return value !== undefined ? value : configValue || defaultValue;
|
|
23
24
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const baseClass = 'euiSelectableListItem';
|
|
2
|
+
|
|
3
|
+
export const isFocusedMapping = {
|
|
4
|
+
true: `${baseClass}--isFocused`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const mapping: ComponentMapping = {
|
|
8
|
+
base: baseClass,
|
|
9
|
+
properties: {
|
|
10
|
+
isFocused: isFocusedMapping
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default mapping;
|
|
@@ -54,6 +54,7 @@ import EuiProgressData from './eui-progress-data';
|
|
|
54
54
|
import EuiRangeHighlight from './eui-range-highlight';
|
|
55
55
|
import EuiRangeInput from './eui-range-input';
|
|
56
56
|
import EuiRangeLevels from './eui-range-levels';
|
|
57
|
+
import EuiSelectableListItem from './eui-selectable-list-item';
|
|
57
58
|
import EuiSpacer from './eui-spacer';
|
|
58
59
|
import EuiStat from './eui-stat';
|
|
59
60
|
import EuiStepNumber from './eui-step-number';
|
|
@@ -123,6 +124,7 @@ const mapping: Mapping = {
|
|
|
123
124
|
EuiRangeHighlight,
|
|
124
125
|
EuiRangeInput,
|
|
125
126
|
EuiRangeLevels,
|
|
127
|
+
EuiSelectableListItem,
|
|
126
128
|
EuiSpacer,
|
|
127
129
|
EuiStat,
|
|
128
130
|
EuiStepNumber,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@ember-eui/core/components/eui-selectable-list-item';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -182,5 +182,5 @@
|
|
|
182
182
|
"volta": {
|
|
183
183
|
"extends": "../../package.json"
|
|
184
184
|
},
|
|
185
|
-
"gitHead": "
|
|
185
|
+
"gitHead": "2318b608b8f8f66a2af52e2e0a3e865da3428696"
|
|
186
186
|
}
|