@ember-eui/core 4.2.4 → 4.3.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/CHANGELOG.md +16 -0
- package/addon/components/eui-accordion/index.hbs +2 -2
- package/addon/components/eui-avatar/index.hbs +1 -1
- package/addon/components/eui-badge/index.hbs +2 -2
- package/addon/components/eui-beta-badge/index.hbs +1 -1
- package/addon/components/eui-button-content/index.hbs +1 -1
- package/addon/components/eui-button-icon/index.hbs +2 -2
- package/addon/components/eui-call-out/index.hbs +7 -2
- package/addon/components/eui-card/index.hbs +1 -1
- package/addon/components/eui-combo-box/create-option/index.hbs +18 -5
- package/addon/components/eui-combo-box/index.hbs +1 -1
- package/addon/components/eui-file-picker/index.hbs +2 -3
- package/addon/components/eui-form-control-layout-clear-button/index.hbs +1 -1
- package/addon/components/eui-form-control-layout-custom-icon/index.hbs +2 -2
- package/addon/components/eui-header-logo/index.hbs +1 -1
- package/addon/components/eui-header-section-item-button/index.hbs +1 -1
- package/addon/components/eui-icon/index.hbs +3 -0
- package/addon/components/eui-icon-tip/index.hbs +1 -2
- package/addon/components/eui-image/index.hbs +1 -1
- package/addon/components/eui-list-group-item/index.hbs +3 -3
- package/addon/components/eui-markdown-format/markdown-tooltip/index.hbs +1 -1
- package/addon/components/eui-side-nav/index.hbs +1 -1
- package/addon/components/eui-side-nav-item/button/index.hbs +1 -1
- package/addon/components/eui-step/eui-step-number/index.hbs +3 -3
- package/addon/components/eui-switch/index.hbs +2 -2
- package/addon/components/eui-toast/index.hbs +1 -1
- package/addon/helpers/use-state.ts +5 -1
- package/docs/forms/form-controls/combo-box-demo/demo3.md +19 -15
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
### Master
|
|
4
4
|
|
|
5
|
+
### 4.3.0
|
|
6
|
+
🚀 Enhancements
|
|
7
|
+
`@ember-eui/flatpickr`
|
|
8
|
+
- New addon plug in, @ember-eui/flatpickr!
|
|
9
|
+
|
|
10
|
+
### 4.2.6
|
|
11
|
+
🐛 Bug / Fixes
|
|
12
|
+
`@ember-eui/core`
|
|
13
|
+
- `<EuiComboBox />` fix css and html issues for amsterdam theme
|
|
14
|
+
- `{{use-state}}` schedule changes for afterRender
|
|
15
|
+
|
|
16
|
+
### 4.2.5
|
|
17
|
+
🐛 Bug / Fixes
|
|
18
|
+
`@ember-eui/core`
|
|
19
|
+
- `<EuiIcon />` for now use @iconClasses to pass down classes when using svg-jar
|
|
20
|
+
|
|
5
21
|
### 4.2.4
|
|
6
22
|
🐛 Bug / Fixes
|
|
7
23
|
`@ember-eui/core`
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}}
|
|
24
24
|
>
|
|
25
25
|
<EuiIcon
|
|
26
|
-
|
|
26
|
+
@iconClasses={{class-names
|
|
27
27
|
"euiAccordion__icon"
|
|
28
28
|
(if this.isOpen "euiAccordion__icon-isOpen")
|
|
29
29
|
}}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{{on "click" this.onToggle}}
|
|
60
60
|
>
|
|
61
61
|
<EuiIcon
|
|
62
|
-
|
|
62
|
+
@iconClasses={{class-names
|
|
63
63
|
"euiAccordion__icon"
|
|
64
64
|
(if this.isOpen "euiAccordion__icon-isOpen")
|
|
65
65
|
}}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
{{on "click" (optional @iconOnClick)}}
|
|
99
99
|
>
|
|
100
100
|
<EuiIcon
|
|
101
|
-
|
|
101
|
+
@iconClasses={{class-names "euiBadge__icon" @closeButtonProps.iconClasses}}
|
|
102
102
|
@type={{@iconType}}
|
|
103
103
|
data-selected-index={{@closeButtonProps.dataSelectedIconIndex}}
|
|
104
104
|
@size={{if (has-block) "s" "m"}}
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<EuiIcon
|
|
110
110
|
@type={{@iconType}}
|
|
111
111
|
@size={{if (has-block) "s" "m"}}
|
|
112
|
-
|
|
112
|
+
@iconClasses="euiBadge__icon"
|
|
113
113
|
/>
|
|
114
114
|
{{/if}}
|
|
115
115
|
</span>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<EuiLoadingSpinner class="euiButtonContent__spinner" @size="m" />
|
|
10
10
|
{{else if @iconType}}
|
|
11
11
|
<EuiIcon
|
|
12
|
-
|
|
12
|
+
@iconClasses="euiButtonContent__icon {{@iconClasses}}"
|
|
13
13
|
@type={{@iconType}}
|
|
14
14
|
@size="m"
|
|
15
15
|
@useSvg={{@useSvg}}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
{{#if @iconType}}
|
|
9
9
|
<EuiIcon
|
|
10
|
-
|
|
10
|
+
@iconClasses="euiButtonIcon__icon {{@iconClasses}}"
|
|
11
11
|
@type={{@iconType}}
|
|
12
12
|
@size={{arg-or-default @iconSize "m"}}
|
|
13
13
|
@useSvg={{@useSvg}}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
>
|
|
27
27
|
{{#if @iconType}}
|
|
28
28
|
<EuiIcon
|
|
29
|
-
|
|
29
|
+
@iconClasses="euiButtonIcon__icon {{@iconClasses}}"
|
|
30
30
|
@type={{@iconType}}
|
|
31
31
|
@size={{@iconSize}}
|
|
32
32
|
@useSvg={{@useSvg}}
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
{{#if (or @title (has-block "title"))}}
|
|
10
10
|
<div class="euiCallOutHeader">
|
|
11
11
|
{{#if @iconType}}
|
|
12
|
-
<EuiIcon
|
|
12
|
+
<EuiIcon
|
|
13
|
+
@iconClasses="euiCallOutHeader__icon"
|
|
14
|
+
@type={{@iconType}}
|
|
15
|
+
@size="m"
|
|
16
|
+
aria-hidden="true"
|
|
17
|
+
/>
|
|
13
18
|
{{/if}}
|
|
14
19
|
{{#if @heading}}
|
|
15
20
|
<TextBlock @tagName={{@heading}} class="euiCallOutHeader__title">
|
|
@@ -35,4 +40,4 @@
|
|
|
35
40
|
{{yield to="body"}}
|
|
36
41
|
</EuiText>
|
|
37
42
|
{{/if}}
|
|
38
|
-
</div>
|
|
43
|
+
</div>
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div
|
|
2
|
+
role="button"
|
|
3
|
+
class="euiComboBoxOptionsList__rowWrap"
|
|
4
|
+
{{on "click" @onCreateOption}}
|
|
5
|
+
>
|
|
6
|
+
<EuiText class="euiComboBoxOptionsList__empty" @size="xs">
|
|
7
|
+
<div class="euiComboBoxOption__contentWrapper">
|
|
8
|
+
<p class="euiComboBoxOption__emptyStateText">
|
|
9
|
+
{{this.formattedString}}
|
|
10
|
+
</p>
|
|
11
|
+
<EuiBadge
|
|
12
|
+
@iconType="returnKey"
|
|
13
|
+
class="euiComboBoxOption__enterBadge"
|
|
14
|
+
@color="hollow"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</EuiText>
|
|
18
|
+
</div>
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
)
|
|
81
81
|
(component "eui-combo-box/no-matches-message")
|
|
82
82
|
}}
|
|
83
|
-
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel
|
|
83
|
+
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel euiPopover__panel--bottom euiPopover__panel-isAttached euiPopover__panel-isOpen euiPopover__panel-noArrow {{@dropdownClass}}"
|
|
84
84
|
as |option i|
|
|
85
85
|
>
|
|
86
86
|
{{yield option i}}
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
class="euiFilePicker__input"
|
|
31
31
|
disabled={{@disabled}}
|
|
32
32
|
aria-describedby={{promptId}}
|
|
33
|
-
...attributes
|
|
34
33
|
{{on "dragover" this.showDrop}}
|
|
35
34
|
{{on "dragleave" this.hideDrop}}
|
|
36
35
|
{{on "drop" this.hideDrop}}
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
/>
|
|
41
40
|
<div class="euiFilePicker__prompt" id={{promptId}}>
|
|
42
41
|
<EuiIcon
|
|
43
|
-
|
|
42
|
+
@iconClasses="euiFilePicker__icon"
|
|
44
43
|
@type="importAction"
|
|
45
44
|
@size={{if true "m" "l"}}
|
|
46
45
|
aria-hidden="true"
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
class="euiFilePicker__clearButton"
|
|
59
58
|
{{on "click" this.removeFiles}}
|
|
60
59
|
>
|
|
61
|
-
<EuiIcon
|
|
60
|
+
<EuiIcon @iconClasses="euiFilePicker__clearIcon" @type="cross" />
|
|
62
61
|
</button>
|
|
63
62
|
{{else}}
|
|
64
63
|
<EuiButtonEmpty
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{{on "click" @onClick}}
|
|
7
7
|
>
|
|
8
8
|
<EuiIcon
|
|
9
|
-
|
|
9
|
+
@iconClasses="euiFormControlLayoutCustomIcon__icon"
|
|
10
10
|
@type={{@type}}
|
|
11
11
|
@size={{@size}}
|
|
12
12
|
aria-hidden="true"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{{else}}
|
|
16
16
|
<span class="euiFormControlLayoutCustomIcon" ...attributes>
|
|
17
17
|
<EuiIcon
|
|
18
|
-
|
|
18
|
+
@iconClasses="euiFormControlLayoutCustomIcon__icon"
|
|
19
19
|
@type={{@type}}
|
|
20
20
|
@size={{@size}}
|
|
21
21
|
aria-hidden="true"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{#if @notification}}
|
|
9
9
|
{{#if (eq @notification true)}}
|
|
10
10
|
<EuiIcon
|
|
11
|
-
|
|
11
|
+
@iconClasses="euiHeaderSectionItemButton__notification euiHeaderSectionItemButton__notification--dot"
|
|
12
12
|
@color={{arg-or-default @notificationColor "accent"}}
|
|
13
13
|
@type="dot"
|
|
14
14
|
@size="l"
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
{{!template-lint-disable}}
|
|
5
5
|
<IconComponent
|
|
6
6
|
class={{class-names
|
|
7
|
+
@iconClasses
|
|
7
8
|
this.optionalColorClass
|
|
8
9
|
(if this.isAppIcon "euiIcon--app")
|
|
9
10
|
componentName="EuiIcon"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
<img
|
|
24
25
|
src={{this.icon}}
|
|
25
26
|
class={{class-names
|
|
27
|
+
@iconClasses
|
|
26
28
|
this.optionalColorClass
|
|
27
29
|
(if this.isAppIcon "euiIcon--app")
|
|
28
30
|
componentName="EuiIcon"
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
{{svg-jar
|
|
37
39
|
this.icon
|
|
38
40
|
class=(class-names
|
|
41
|
+
@iconClasses
|
|
39
42
|
this.optionalColorClass
|
|
40
43
|
(if this.isAppIcon "euiIcon--app")
|
|
41
44
|
componentName="EuiIcon"
|
|
@@ -11,11 +11,10 @@
|
|
|
11
11
|
<:anchor>
|
|
12
12
|
<EuiIcon
|
|
13
13
|
tabindex="0"
|
|
14
|
-
|
|
14
|
+
@iconClasses={{@iconProps.className}}
|
|
15
15
|
@type={{arg-or-default @type "questionInCircle"}}
|
|
16
16
|
@color={{@color}}
|
|
17
17
|
@size={{@size}}
|
|
18
|
-
...attributes
|
|
19
18
|
aria-label={{arg-or-default @ariaLabel "Info"}}
|
|
20
19
|
/>
|
|
21
20
|
</:anchor>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
...attributes
|
|
19
19
|
>
|
|
20
20
|
{{#if @iconType}}
|
|
21
|
-
<EuiIcon
|
|
21
|
+
<EuiIcon @iconClasses="euiListGroupItem__icon" @type={{@iconType}} />
|
|
22
22
|
{{/if}}
|
|
23
23
|
<span class="euiListGroupItem__label">
|
|
24
24
|
{{#if (has-block)}}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
...attributes
|
|
38
38
|
>
|
|
39
39
|
{{#if @iconType}}
|
|
40
|
-
<EuiIcon
|
|
40
|
+
<EuiIcon @iconClasses="euiListGroupItem__icon" @type={{@iconType}} />
|
|
41
41
|
{{/if}}
|
|
42
42
|
<span class="euiListGroupItem__label">
|
|
43
43
|
{{#if (has-block)}}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
{{else}}
|
|
51
51
|
<span class="euiListGroupItem__text" ...attributes>
|
|
52
52
|
{{#if @iconType}}
|
|
53
|
-
<EuiIcon
|
|
53
|
+
<EuiIcon @iconClasses="euiListGroupItem__icon" @type={{@iconType}} />
|
|
54
54
|
{{/if}}
|
|
55
55
|
<span class="euiListGroupItem__label">
|
|
56
56
|
{{#if (has-block)}}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<EuiToolTip @content={{@node.tooltipText}}>
|
|
3
3
|
<span>
|
|
4
4
|
<strong>{{@node.content}}</strong>
|
|
5
|
-
<EuiIcon @type="questionInCircle"
|
|
5
|
+
<EuiIcon @type="questionInCircle" @iconClasses="euiMarkdownTooltip__icon" />
|
|
6
6
|
</span>
|
|
7
7
|
</EuiToolTip>
|
|
8
8
|
</span>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<span class="euiSideNav__mobileTitle">
|
|
9
9
|
{{@mobileTitle}}
|
|
10
10
|
</span>
|
|
11
|
-
<EuiIcon
|
|
11
|
+
<EuiIcon @iconClasses="euiSideNav__mobileIcon" @type="apps" @size="m" aria-hidden="true" />
|
|
12
12
|
</span>
|
|
13
13
|
</button>
|
|
14
14
|
<div class="euiSideNav__content">
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
...attributes
|
|
9
9
|
>
|
|
10
10
|
{{#if (eq @status "complete")}}
|
|
11
|
-
<EuiIcon
|
|
11
|
+
<EuiIcon @iconClasses="euiStepNumber__icon" @type="check" @size={{iconSize}} />
|
|
12
12
|
{{else if (eq @status "warning")}}
|
|
13
|
-
<EuiIcon
|
|
13
|
+
<EuiIcon @iconClasses="euiStepNumber__icon" @type="alert" @size={{iconSize}} />
|
|
14
14
|
{{else if (eq @status "danger")}}
|
|
15
|
-
<EuiIcon
|
|
15
|
+
<EuiIcon @iconClasses="euiStepNumber__icon" @type="cross" @size={{iconSize}} />
|
|
16
16
|
{{else if (eq @status "loading")}}
|
|
17
17
|
<EuiLoadingSpinner class="euiStepNumber__loader" @size={{if (eq iconSize "s") "l" "xl"}} />
|
|
18
18
|
{{else}}
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
<span class="euiSwitch__thumb"></span>
|
|
30
30
|
<span class="euiSwitch__track">
|
|
31
31
|
{{#unless @compressed}}
|
|
32
|
-
<EuiIcon @type="cross" @size="m"
|
|
32
|
+
<EuiIcon @type="cross" @size="m" @iconClasses="euiSwitch__icon" />
|
|
33
33
|
<EuiIcon
|
|
34
34
|
@type="check"
|
|
35
35
|
@size="m"
|
|
36
|
-
|
|
36
|
+
@iconClasses="euiSwitch__icon euiSwitch__icon--checked"
|
|
37
37
|
/>
|
|
38
38
|
{{/unless}}
|
|
39
39
|
</span>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { helper } from '@ember/component/helper';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { scheduleOnce } from '@ember/runloop';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @param value - initial value to use, undefined if not provided.
|
|
@@ -17,7 +18,10 @@ class SingleUseState<T> {
|
|
|
17
18
|
|
|
18
19
|
@action
|
|
19
20
|
setState(value: T): T {
|
|
20
|
-
|
|
21
|
+
const updater = () => {
|
|
22
|
+
this.value = value;
|
|
23
|
+
};
|
|
24
|
+
scheduleOnce('afterRender', this, updater);
|
|
21
25
|
return value;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -7,17 +7,18 @@ order: 2
|
|
|
7
7
|
Using on create options for bubbling new option and handling in onCreateOption function, you may want to provide a customOptionText, you can assume {searchText} will be interpolated, be sure sanitize your string!
|
|
8
8
|
|
|
9
9
|
```hbs template
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
<EuiComboBox
|
|
11
|
+
@onChange={{this.onChange}}
|
|
12
|
+
@options={{this.remainingOptions}}
|
|
13
|
+
@onCreateOption={{this.onCreateOption}}
|
|
14
|
+
@selectedOptions={{this.selected}}
|
|
15
|
+
@searchEnabled={{true}}
|
|
16
|
+
@customOptionText='Do you want to add <strong>{searchText}</strong> to your list?'
|
|
17
|
+
@searchField='label'
|
|
18
|
+
as |option item|
|
|
19
|
+
>
|
|
20
|
+
{{option.label}}
|
|
21
|
+
</EuiComboBox>
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
```javascript component
|
|
@@ -59,10 +60,13 @@ export default class Demo1 extends Component {
|
|
|
59
60
|
const newOptionStructure = {
|
|
60
61
|
value: `${newOption}`,
|
|
61
62
|
label: `${newOption}`
|
|
62
|
-
}
|
|
63
|
-
if(
|
|
64
|
-
this.options.
|
|
65
|
-
|
|
63
|
+
};
|
|
64
|
+
if (
|
|
65
|
+
this.options.filter((opt) => opt.value == newOptionStructure.value)
|
|
66
|
+
.length == 0
|
|
67
|
+
) {
|
|
68
|
+
this.options.addObject(newOptionStructure);
|
|
69
|
+
this.selected.addObject(newOptionStructure);
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@ember/optional-features": "^2.0.0",
|
|
97
97
|
"@ember/test-helpers": "^2.6.0",
|
|
98
|
-
"@embroider/test-setup": "^1.
|
|
99
|
-
"@embroider/util": "^1.
|
|
98
|
+
"@embroider/test-setup": "^1.5.0",
|
|
99
|
+
"@embroider/util": "^1.5.0",
|
|
100
100
|
"@glimmer/component": "^1.0.4",
|
|
101
101
|
"@glimmer/tracking": "^1.0.4",
|
|
102
102
|
"@types/ember": "^3.16.0",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"volta": {
|
|
177
177
|
"extends": "../../package.json"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "e9f6c51ed07476be91669d606ad4d45fa3575eb2"
|
|
180
180
|
}
|