@ember-eui/core 5.8.3 → 5.8.4

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>
@@ -35,16 +37,12 @@ as |Group|}}
35
37
  @group={{opt}}
36
38
  @select={{@select}}
37
39
  @extra={{@extra}}
38
- style={{html-safe
39
- (concat "height:" this.rowHeight "px;")
40
- }}
40
+ style={{html-safe (concat "height:" this.rowHeight "px;")}}
41
41
  data-option-index="{{index}}"
42
42
  />
43
43
  {{else}}
44
44
  <li
45
- style={{html-safe
46
- (concat "height:" this.rowHeight "px;")
47
- }}
45
+ style={{html-safe (concat "height:" this.rowHeight "px;")}}
48
46
  class="euiFilterSelectItem
49
47
  {{if
50
48
  (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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "5.8.3",
3
+ "version": "5.8.4",
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": "5a32aacf3226654a8d53290774d188e517afbecc"
185
+ "gitHead": "1ede8e1164b3d4443bdf549330581710dfc09b6f"
186
186
  }