@ember-eui/core 5.8.2 → 5.8.5

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.
@@ -1,4 +1,3 @@
1
-
2
1
  {{#if (and (or @onClick @href) (not @iconType))}}
3
2
  {{#if @onClick}}
4
3
  <button
@@ -10,6 +9,7 @@
10
9
  color=(arg-or-default @color "default")
11
10
  }}
12
11
  aria-label={{if @onClick @onClickAriaLabel}}
12
+ disabled={{@isDisabled}}
13
13
  ...attributes
14
14
  {{simple-style
15
15
  (inline-styles
@@ -36,6 +36,7 @@
36
36
  target={{@target}}
37
37
  href={{@href}}
38
38
  aria-label={{if @onClick @onClickAriaLabel}}
39
+ disabled={{@isDisabled}}
39
40
  ...attributes
40
41
  {{simple-style
41
42
  (inline-styles
@@ -73,12 +74,17 @@
73
74
  <button
74
75
  class="euiBadge__childButton"
75
76
  type="button"
77
+ disabled={{@isDisabled}}
76
78
  {{on "click" (optional @onClick)}}
77
79
  >
78
80
  {{yield}}
79
81
  </button>
80
82
  {{else if @href}}
81
- <a class="euiBadge__childButton" href={{@href}}>
83
+ <a
84
+ class="euiBadge__childButton"
85
+ href={{@href}}
86
+ disabled={{@isDisabled}}
87
+ >
82
88
  {{yield}}
83
89
  </a>
84
90
  {{else}}
@@ -142,4 +148,4 @@
142
148
  </span>
143
149
  </span>
144
150
  </span>
145
- {{/if}}
151
+ {{/if}}
@@ -1,9 +1,11 @@
1
- {{#let
2
- (component (ensure-safe-component @groupComponent))
3
- as |Group|}}
1
+ {{#let (component (ensure-safe-component @groupComponent)) as |Group|}}
4
2
  {{#if @select.loading}}
5
3
  <EuiText @size="xs" class="euiComboBoxOptionsList__empty">
6
- <EuiFlexGroup @gutterSize="s" @justifyContent="center">
4
+ <EuiFlexGroup
5
+ @gutterSize="s"
6
+ @justifyContent="center"
7
+ @responsive={{false}}
8
+ >
7
9
  <EuiFlexItem @grow={{false}}>
8
10
  <EuiLoadingSpinner @size="m" />
9
11
  </EuiFlexItem>
@@ -24,7 +26,6 @@ as |Group|}}
24
26
  role="listbox"
25
27
  aria-controls="ember-power-select-trigger-{{@select.uniqueId}}"
26
28
  ...attributes
27
- {{did-update this.setFlattedOptions @options}}
28
29
  {{did-insert this.addHandlers}}
29
30
  {{will-destroy this.removeHandlers}}
30
31
  as |opt index|
@@ -35,16 +36,12 @@ as |Group|}}
35
36
  @group={{opt}}
36
37
  @select={{@select}}
37
38
  @extra={{@extra}}
38
- style={{html-safe
39
- (concat "height:" this.rowHeight "px;")
40
- }}
39
+ style={{html-safe (concat "height:" this.rowHeight "px;")}}
41
40
  data-option-index="{{index}}"
42
41
  />
43
42
  {{else}}
44
43
  <li
45
- style={{html-safe
46
- (concat "height:" this.rowHeight "px;")
47
- }}
44
+ style={{html-safe (concat "height:" this.rowHeight "px;")}}
48
45
  class="euiFilterSelectItem
49
46
  {{if
50
47
  (eq opt @select.highlighted)
@@ -1,16 +1,15 @@
1
1
  import EmberPowerSelectOptions from 'ember-power-select/components/power-select/options';
2
2
  import { emberPowerSelectIsGroup } from 'ember-power-select/helpers/ember-power-select-is-group';
3
- import { tracked } from '@glimmer/tracking';
4
3
  import config from 'ember-get-config';
5
4
 
6
5
  const rowHeight = config['@ember-eui/core']?.euiComboBoxOptionsHeight || 29;
7
6
  export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions {
8
- @tracked flattedOptions = [];
9
7
  _optionsCache = [];
10
8
 
11
- setFlattedOptions = () => {
9
+ get flattedOptions() {
12
10
  if (this._optionsCache !== this.args.options) {
13
- this.flattedOptions = this.args.options?.reduce((acc, curr) => {
11
+ this._optionsCache = this.args.options;
12
+ return this.args.options?.reduce((acc, curr) => {
14
13
  if (emberPowerSelectIsGroup([curr])) {
15
14
  acc.push(curr, ...curr.options);
16
15
  } else {
@@ -18,14 +17,8 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
18
17
  }
19
18
  return acc;
20
19
  }, []);
21
- this._optionsCache = this.args.options;
22
20
  }
23
- };
24
-
25
- constructor() {
26
- super(...arguments);
27
- this.setFlattedOptions();
28
- this._optionsCache = this.args.options;
21
+ return this._optionsCache;
29
22
  }
30
23
 
31
24
  _optionFromIndex(index) {
@@ -38,6 +31,6 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
38
31
  }
39
32
 
40
33
  get rowHeight() {
41
- return this.args.rowHeight ?? rowHeight
34
+ return this.args.rowHeight ?? rowHeight;
42
35
  }
43
36
  }
@@ -10,6 +10,7 @@
10
10
  {{#let
11
11
  (class-names
12
12
  (if @compressed "euiSwitch--compressed") "euiSwitch"
13
+ @containerClass
13
14
  ) as |classes|
14
15
  }}
15
16
  <div class={{classes}}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "5.8.2",
3
+ "version": "5.8.5",
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": "f9942c20d6e52e2f420ecca223285677f89a62b4"
185
+ "gitHead": "0dc0a27d489d4287043885f0607144ff89088a49"
186
186
  }