@xdam/ember-partials 3.0.1 → 4.0.1

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 (151) hide show
  1. package/.gitattributes +5 -5
  2. package/.yarnrc.yml +1 -0
  3. package/LICENSE.md +9 -9
  4. package/README.md +9 -3
  5. package/addon/components/xep-avatar.js +9 -4
  6. package/addon/components/xep-bubble.js +6 -3
  7. package/addon/components/xep-button.hbs +2 -0
  8. package/addon/components/xep-button.js +9 -1
  9. package/addon/components/xep-checkbox.js +12 -8
  10. package/addon/components/xep-chip-icon.js +1 -3
  11. package/addon/components/xep-chip-set.js +14 -6
  12. package/addon/components/xep-chip-text.js +0 -0
  13. package/addon/components/xep-chip.js +11 -5
  14. package/addon/components/xep-dialog-actions.hbs +0 -0
  15. package/addon/components/xep-dialog-actions.js +7 -1
  16. package/addon/components/xep-dialog-content.hbs +0 -0
  17. package/addon/components/xep-dialog-content.js +7 -1
  18. package/addon/components/xep-dialog-title.hbs +0 -0
  19. package/addon/components/xep-dialog-title.js +7 -1
  20. package/addon/components/xep-dialog.js +4 -3
  21. package/addon/components/xep-drawer-content.js +0 -0
  22. package/addon/components/xep-drawer-header.js +0 -0
  23. package/addon/components/xep-drawer.js +14 -6
  24. package/addon/components/xep-input.js +14 -6
  25. package/addon/components/xep-list-divider.js +5 -1
  26. package/addon/components/xep-list-item-graphic.hbs +0 -0
  27. package/addon/components/xep-list-item-graphic.js +7 -1
  28. package/addon/components/xep-list-item-meta.js +4 -1
  29. package/addon/components/xep-list-item-text.js +5 -1
  30. package/addon/components/xep-list-item.js +13 -4
  31. package/addon/components/xep-list.js +8 -4
  32. package/addon/components/xep-menu-surface.js +4 -1
  33. package/addon/components/xep-menu.js +12 -5
  34. package/addon/components/xep-radio.js +11 -6
  35. package/addon/components/xep-slider.js +11 -6
  36. package/addon/components/xep-snackbar.js +12 -4
  37. package/addon/components/xep-switch.js +6 -4
  38. package/addon/components/xep-textarea.js +12 -5
  39. package/addon/components/xep-toolbar-divider.js +0 -0
  40. package/addon/components/xep-toolbar-item-icon.js +4 -1
  41. package/addon/components/xep-toolbar-item-text.js +4 -1
  42. package/addon/components/xep-toolbar-item.js +0 -0
  43. package/addon/components/xep-toolbar-section.js +5 -2
  44. package/addon/components/xep-toolbar.js +4 -3
  45. package/addon/mixins/xep-resize.js +1 -1
  46. package/addon/services/xep-manager.js +1 -1
  47. package/addon/templates/components/xep-avatar.hbs +0 -1
  48. package/addon/templates/components/xep-bubble.hbs +0 -0
  49. package/addon/templates/components/xep-checkbox.hbs +1 -1
  50. package/addon/templates/components/xep-chip-icon.hbs +0 -0
  51. package/addon/templates/components/xep-chip-set.hbs +0 -0
  52. package/addon/templates/components/xep-chip-text.hbs +0 -0
  53. package/addon/templates/components/xep-chip.hbs +0 -0
  54. package/addon/templates/components/xep-dialog.hbs +0 -0
  55. package/addon/templates/components/xep-drawer-content.hbs +0 -0
  56. package/addon/templates/components/xep-drawer-header.hbs +0 -0
  57. package/addon/templates/components/xep-drawer.hbs +0 -0
  58. package/addon/templates/components/xep-input.hbs +3 -6
  59. package/addon/templates/components/xep-list-divider.hbs +0 -0
  60. package/addon/templates/components/xep-list-item-meta.hbs +0 -0
  61. package/addon/templates/components/xep-list-item-text.hbs +0 -0
  62. package/addon/templates/components/xep-list-item.hbs +0 -0
  63. package/addon/templates/components/xep-list.hbs +0 -0
  64. package/addon/templates/components/xep-menu-surface.hbs +0 -0
  65. package/addon/templates/components/xep-menu.hbs +0 -0
  66. package/addon/templates/components/xep-power-select.hbs +0 -0
  67. package/addon/templates/components/xep-radio.hbs +5 -1
  68. package/addon/templates/components/xep-slider.hbs +0 -0
  69. package/addon/templates/components/xep-snackbar.hbs +0 -0
  70. package/addon/templates/components/xep-switch.hbs +10 -1
  71. package/addon/templates/components/xep-textarea.hbs +1 -2
  72. package/addon/templates/components/xep-toolbar-divider.hbs +0 -0
  73. package/addon/templates/components/xep-toolbar-item-icon.hbs +0 -0
  74. package/addon/templates/components/xep-toolbar-item-text.hbs +0 -0
  75. package/addon/templates/components/xep-toolbar-item.hbs +0 -0
  76. package/addon/templates/components/xep-toolbar-section.hbs +0 -0
  77. package/addon/templates/components/xep-toolbar.hbs +0 -0
  78. package/addon/utils/style-string.js +9 -3
  79. package/addon/utils/update-dirty-props.js +9 -4
  80. package/app/components/xep-avatar.js +0 -0
  81. package/app/components/xep-bubble.js +0 -0
  82. package/app/components/xep-button.js +0 -0
  83. package/app/components/xep-checkbox.js +1 -0
  84. package/app/components/xep-chip-icon.js +0 -0
  85. package/app/components/xep-chip-set.js +1 -0
  86. package/app/components/xep-chip-text.js +0 -0
  87. package/app/components/xep-chip.js +0 -0
  88. package/app/components/xep-dialog-actions.js +0 -0
  89. package/app/components/xep-dialog-content.js +0 -0
  90. package/app/components/xep-dialog-title.js +0 -0
  91. package/app/components/xep-dialog.js +1 -0
  92. package/app/components/xep-drawer-content.js +0 -0
  93. package/app/components/xep-drawer-header.js +0 -0
  94. package/app/components/xep-drawer.js +1 -0
  95. package/app/components/xep-input.js +1 -0
  96. package/app/components/xep-list-divider.js +0 -0
  97. package/app/components/xep-list-item-graphic.js +0 -0
  98. package/app/components/xep-list-item-meta.js +0 -0
  99. package/app/components/xep-list-item-text.js +0 -0
  100. package/app/components/xep-list-item.js +0 -0
  101. package/app/components/xep-list.js +1 -0
  102. package/app/components/xep-menu-surface.js +1 -0
  103. package/app/components/xep-menu.js +2 -0
  104. package/app/components/xep-radio.js +1 -0
  105. package/app/components/xep-slider.js +1 -0
  106. package/app/components/xep-snackbar.js +1 -0
  107. package/app/components/xep-switch.js +1 -0
  108. package/app/components/xep-textarea.js +0 -0
  109. package/app/components/xep-toolbar-divider.js +0 -0
  110. package/app/components/xep-toolbar-item-icon.js +0 -0
  111. package/app/components/xep-toolbar-item-text.js +0 -0
  112. package/app/components/xep-toolbar-item.js +0 -0
  113. package/app/components/xep-toolbar-section.js +0 -0
  114. package/app/components/xep-toolbar.js +0 -0
  115. package/app/mixins/xep-resize.js +0 -0
  116. package/app/services/xep-manager.js +0 -0
  117. package/app/styles/ember-partials/components/xep-avatar.scss +24 -24
  118. package/app/styles/ember-partials/components/xep-bubble.scss +20 -20
  119. package/app/styles/ember-partials/components/xep-button.scss +58 -58
  120. package/app/styles/ember-partials/components/xep-drawer.scss +21 -21
  121. package/app/styles/ember-partials/components/xep-snackbar.scss +3 -3
  122. package/app/styles/ember-partials/components/xep-toolbar.scss +107 -107
  123. package/app/styles/ember-partials/dark-theme.scss +42 -42
  124. package/app/styles/ember-partials/helpers/alignment.scss +59 -59
  125. package/app/styles/ember-partials/helpers/color.scss +27 -27
  126. package/app/styles/ember-partials/helpers/display.scss +27 -27
  127. package/app/styles/ember-partials/helpers/overrides.scss +7 -7
  128. package/app/styles/ember-partials/helpers/root.scss +13 -13
  129. package/app/styles/ember-partials/helpers/rotate.scss +11 -11
  130. package/app/styles/ember-partials/helpers/spacing.scss +25 -25
  131. package/app/styles/ember-partials/helpers/typography.scss +5 -5
  132. package/app/styles/ember-partials/helpers/visibility.scss +23 -23
  133. package/app/styles/ember-partials/light-theme.scss +42 -42
  134. package/app/styles/ember-partials/mixins/breakpoints.scss +24 -24
  135. package/app/styles/ember-partials/mixins/strip-unit.scss +12 -12
  136. package/app/styles/ember-partials/variables.scss +35 -35
  137. package/app/styles/ember-partials/xdam-theme.scss +49 -49
  138. package/app/styles/ember-partials.scss +50 -48
  139. package/app/utils/style-string.js +0 -0
  140. package/backstop.json +168 -168
  141. package/blueprints/xep-component/files/__root__/__path__/__name__.js +0 -0
  142. package/blueprints/xep-component/files/__root__/__templatepath__/__templatename__.hbs +0 -0
  143. package/blueprints/xep-component/index.js +1 -1
  144. package/blueprints/xep-component-test/index.js +1 -1
  145. package/blueprints/xep-component-test/qunit-files/__root__/__testType__/__path__/__test__.js +0 -0
  146. package/config/addon-docs.js +1 -1
  147. package/config/deploy.js +0 -0
  148. package/config/environment.js +1 -1
  149. package/config/release.js +0 -0
  150. package/index.js +70 -115
  151. package/package.json +151 -129
package/.gitattributes CHANGED
@@ -1,6 +1,6 @@
1
- # default to let git choose the best setting for files not explicitly defined here
2
- * text=auto
3
-
4
- # All js files must have lf line ends to pass in the linter
5
- *.js text eol=lf
1
+ # default to let git choose the best setting for files not explicitly defined here
2
+ * text=auto
3
+
4
+ # All js files must have lf line ends to pass in the linter
5
+ *.js text eol=lf
6
6
  *.hbs text eol=lf
package/.yarnrc.yml ADDED
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
package/LICENSE.md CHANGED
@@ -1,9 +1,9 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -16,9 +16,10 @@ Ember components for XDAM applications.
16
16
  Compatibility
17
17
  ------------------------------------------------------------------------------
18
18
 
19
- * Ember.js v3.12 or above
20
- * Ember CLI v2.13 or above
21
- * Node.js v10 or above
19
+ * Ember.js v4.12 or above
20
+ * Ember CLI v4.12 or above
21
+ * Node.js v18 or above
22
+
22
23
 
23
24
 
24
25
  Installation
@@ -74,3 +75,8 @@ Or individually:
74
75
  * Visit the dummy application at [http://localhost:4200](http://localhost:4200).
75
76
 
76
77
  For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
78
+
79
+
80
+
81
+
82
+
@@ -1,11 +1,13 @@
1
1
  import {
2
- classNames, layout, tagName, attribute,
2
+ classNames,
3
+ layout,
4
+ tagName,
5
+ attribute,
3
6
  } from '@ember-decorators/component';
4
7
  import Component from '@ember/component';
5
8
  import template from '@xdam/ember-partials/templates/components/xep-avatar';
6
9
  import { computed } from '@ember/object';
7
10
  import { inject as service } from '@ember/service';
8
- import classic from 'ember-classic-decorator';
9
11
 
10
12
  import styleString from '@xdam/ember-partials/utils/style-string';
11
13
 
@@ -16,7 +18,6 @@ import styleString from '@xdam/ember-partials/utils/style-string';
16
18
  * @class XepAvatar
17
19
  * @public
18
20
  */
19
- @classic
20
21
  @tagName('a')
21
22
  @layout(template)
22
23
  @classNames('xep-avatar')
@@ -132,7 +133,11 @@ export default class XepAvatarComponent extends Component {
132
133
  */
133
134
  @computed('entityName', 'lastName', 'firstName', 'textContent')
134
135
  get name() {
135
- return this.entityName || this.textContent || `${this.firstName} ${this.lastName}`;
136
+ return (
137
+ this.entityName ||
138
+ this.textContent ||
139
+ `${this.firstName} ${this.lastName}`
140
+ );
136
141
  }
137
142
 
138
143
  /**
@@ -1,10 +1,13 @@
1
1
  import {
2
- classNames, layout, className, tagName, attribute,
2
+ classNames,
3
+ layout,
4
+ className,
5
+ tagName,
6
+ attribute,
3
7
  } from '@ember-decorators/component';
4
8
  import Component from '@ember/component';
5
9
  import template from '@xdam/ember-partials/templates/components/xep-bubble';
6
10
  import { inject as service } from '@ember/service';
7
- import classic from 'ember-classic-decorator';
8
11
 
9
12
  /**
10
13
  * Component description...
@@ -12,7 +15,7 @@ import classic from 'ember-classic-decorator';
12
15
  * @class XepBubble
13
16
  * @public
14
17
  */
15
- @classic
18
+
16
19
  @tagName('span')
17
20
  @layout(template)
18
21
  @classNames('xep-bubble')
@@ -1,3 +1,5 @@
1
+ {{!-- template-lint-disable no-positive-tabindex --}}
2
+ {{!-- tabindex is a caller-supplied argument; its value is not statically known. --}}
1
3
  <button
2
4
  class={{concat
3
5
  "xep-button mdc-button "
@@ -65,6 +65,11 @@ export default class XepButtonComponent extends Component {
65
65
  * @type {*}
66
66
  */
67
67
 
68
+ /**
69
+ * Define additional classes to attach to the button's container div.
70
+ * @argument [class]
71
+ * @type {String}
72
+ */
68
73
  get class() {
69
74
  return this.args.class ? this.args.class : '';
70
75
  }
@@ -186,7 +191,10 @@ export default class XepButtonComponent extends Component {
186
191
  * @readOnly
187
192
  */
188
193
  get includeRipple() {
189
- if (this.args.includeRipple !== null && (this.args.includeRipple === false || this.args.includeRipple === 'false')) {
194
+ if (
195
+ this.args.includeRipple !== null &&
196
+ (this.args.includeRipple === false || this.args.includeRipple === 'false')
197
+ ) {
190
198
  return false;
191
199
  }
192
200
  return true;
@@ -1,13 +1,10 @@
1
- import {
2
- classNames, layout, attribute,
3
- } from '@ember-decorators/component';
1
+ import { classNames, layout, attribute } from '@ember-decorators/component';
4
2
  import Component from '@ember/component';
5
3
  import template from '@xdam/ember-partials/templates/components/xep-checkbox';
6
4
  import { guidFor } from '@ember/object/internals';
7
5
  import { MDCCheckbox } from '@material/checkbox';
8
6
  import { inject as service } from '@ember/service';
9
7
  import { addEventListener, runDisposables } from 'ember-lifeline';
10
- import classic from 'ember-classic-decorator';
11
8
 
12
9
  import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
13
10
 
@@ -17,7 +14,7 @@ import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
17
14
  * @class XepCheckbox
18
15
  * @public
19
16
  */
20
- @classic
17
+
21
18
  @layout(template)
22
19
  @classNames('xep-checkbox', 'mdc-form-field')
23
20
  export default class XepCheckboxComponent extends Component {
@@ -86,11 +83,17 @@ export default class XepCheckboxComponent extends Component {
86
83
  didInsertElement() {
87
84
  super.didInsertElement(...arguments);
88
85
 
89
- this.mdcComponent = this.mdcComponent || new MDCCheckbox(this.element.querySelector('.mdc-checkbox'));
86
+ this.mdcComponent =
87
+ this.mdcComponent ||
88
+ new MDCCheckbox(this.element.querySelector('.mdc-checkbox'));
90
89
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
91
90
 
92
- const nativeInput = this.element.querySelector('.mdc-checkbox__native-control');
93
- addEventListener(this, nativeInput, 'change', evt => this.set('checked', evt.srcElement.checked));
91
+ const nativeInput = this.element.querySelector(
92
+ '.mdc-checkbox__native-control',
93
+ );
94
+ addEventListener(this, nativeInput, 'change', (evt) =>
95
+ this.set('checked', evt.srcElement.checked),
96
+ );
94
97
 
95
98
  if (this.register) {
96
99
  this.xepManager.registerComponent(this, this.register);
@@ -98,6 +101,7 @@ export default class XepCheckboxComponent extends Component {
98
101
  }
99
102
 
100
103
  didReceiveAttrs() {
104
+ super.didReceiveAttrs();
101
105
  if (this.mdcComponent) {
102
106
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
103
107
  }
@@ -1,7 +1,5 @@
1
1
  import Component from '@ember/component';
2
- import {
3
- classNames, layout, attribute,
4
- } from '@ember-decorators/component';
2
+ import { classNames, layout, attribute } from '@ember-decorators/component';
5
3
  import template from '@xdam/ember-partials/templates/components/xep-chip-icon';
6
4
 
7
5
  /**
@@ -1,6 +1,10 @@
1
+ import { set } from '@ember/object';
1
2
  import Component from '@ember/component';
2
3
  import {
3
- classNames, layout, className, attribute,
4
+ classNames,
5
+ layout,
6
+ className,
7
+ attribute,
4
8
  } from '@ember-decorators/component';
5
9
  import template from '@xdam/ember-partials/templates/components/xep-chip-set';
6
10
  import { alias } from '@ember/object/computed';
@@ -8,7 +12,6 @@ import { inject as service } from '@ember/service';
8
12
  import { MDCChipSet } from '@material/chips';
9
13
  import { addEventListener, runDisposables } from 'ember-lifeline';
10
14
  import EmberObject, { computed } from '@ember/object';
11
- import classic from 'ember-classic-decorator';
12
15
 
13
16
  const VARIANT_TYPES = {
14
17
  standard: '',
@@ -29,7 +32,7 @@ const VARIANT_TYPES = {
29
32
  * @yield {Hash} chips
30
33
  * @yield {XepChip} chips.chip
31
34
  */
32
- @classic
35
+
33
36
  @layout(template)
34
37
  @classNames('xep-chip-set', 'mdc-chip-set')
35
38
  export default class XepChipSetComponent extends Component {
@@ -86,10 +89,15 @@ export default class XepChipSetComponent extends Component {
86
89
 
87
90
  didInsertElement() {
88
91
  super.didInsertElement(...arguments);
89
- this.mdcComponent = this.mdcComponent || new MDCChipSet(this.element);
92
+ set(
93
+ this,
94
+ 'mdcComponent',
95
+ this.mdcComponent || new MDCChipSet(this.element),
96
+ );
90
97
 
91
- addEventListener(this, this.element, 'MDCChip:selection',
92
- () => this.notifyPropertyChange('selectedChipIds'));
98
+ addEventListener(this, this.element, 'MDCChip:selection', () =>
99
+ this.notifyPropertyChange('selectedChipIds'),
100
+ );
93
101
 
94
102
  if (this.register) {
95
103
  this.xepManager.registerComponent(this, this.register);
File without changes
@@ -1,10 +1,12 @@
1
1
  import {
2
- classNames, layout, attribute, className,
2
+ classNames,
3
+ layout,
4
+ attribute,
5
+ className,
3
6
  } from '@ember-decorators/component';
4
7
  import Component from '@ember/component';
5
8
  import template from '@xdam/ember-partials/templates/components/xep-chip';
6
9
  import { addEventListener, runDisposables } from 'ember-lifeline';
7
- import classic from 'ember-classic-decorator';
8
10
 
9
11
  /**
10
12
  * Chips are compact elements that allow users to enter information, select a choice, filter content,
@@ -15,7 +17,7 @@ import classic from 'ember-classic-decorator';
15
17
  * @yield {Hash} chip
16
18
  * @yield {XepChipText} chip.text
17
19
  */
18
- @classic
20
+
19
21
  @layout(template)
20
22
  @classNames('xep-chip', 'mdc-chip')
21
23
  export default class XepChipComponent extends Component {
@@ -61,8 +63,12 @@ export default class XepChipComponent extends Component {
61
63
  didInsertElement() {
62
64
  super.didInsertElement(...arguments);
63
65
 
64
- addEventListener(this, this.element, 'MDCChip:selection',
65
- ({ detail: { selected } }) => this.set('selected', selected));
66
+ addEventListener(
67
+ this,
68
+ this.element,
69
+ 'MDCChip:selection',
70
+ ({ detail: { selected } }) => this.set('selected', selected),
71
+ );
66
72
  }
67
73
 
68
74
  willDestroy() {
File without changes
@@ -1,3 +1,9 @@
1
1
  import Component from '@glimmer/component';
2
2
 
3
- export default class XepDialogActionsComponent extends Component {}
3
+ export default class XepDialogActionsComponent extends Component {
4
+ /**
5
+ * Add a test selector for data attribute: `[data-test-dialog-actions]`
6
+ * @argument [testSelector]
7
+ * @type {String}
8
+ */
9
+ }
File without changes
@@ -1,3 +1,9 @@
1
1
  import Component from '@glimmer/component';
2
2
 
3
- export default class XepDialogContentComponent extends Component {}
3
+ export default class XepDialogContentComponent extends Component {
4
+ /**
5
+ * Add a test selector for data attribute: `[data-test-dialog-content]`
6
+ * @argument [testSelector]
7
+ * @type {String}
8
+ */
9
+ }
File without changes
@@ -1,3 +1,9 @@
1
1
  import Component from '@glimmer/component';
2
2
 
3
- export default class XepDialogTitleComponent extends Component {}
3
+ export default class XepDialogTitleComponent extends Component {
4
+ /**
5
+ * Add a test selector for data attribute: `[data-test-dialog-title]`
6
+ * @argument [testSelector]
7
+ * @type {String}
8
+ */
9
+ }
@@ -1,10 +1,10 @@
1
+ import { set } from '@ember/object';
1
2
  import { classNames, layout, attribute } from '@ember-decorators/component';
2
3
  import template from '@xdam/ember-partials/templates/components/xep-dialog';
3
4
  import Component from '@ember/component';
4
5
  import { inject as service } from '@ember/service';
5
6
  import { MDCDialog } from '@material/dialog';
6
7
  import { alias, readOnly } from '@ember/object/computed';
7
- import classic from 'ember-classic-decorator';
8
8
 
9
9
  import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
10
10
 
@@ -21,7 +21,7 @@ import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
21
21
  * @yield {XepDialogTitle} dialog.title
22
22
  * @yield {XepDialogActions} dialog.actions
23
23
  */
24
- @classic
24
+
25
25
  @layout(template)
26
26
  @classNames('xep-dialog', 'mdc-dialog')
27
27
  export default class XepDialogComponent extends Component {
@@ -105,7 +105,7 @@ export default class XepDialogComponent extends Component {
105
105
 
106
106
  didInsertElement() {
107
107
  super.didInsertElement(...arguments);
108
- this.mdcComponent = new MDCDialog(this.element);
108
+ set(this, 'mdcComponent', new MDCDialog(this.element));
109
109
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
110
110
 
111
111
  if (this.register) {
@@ -114,6 +114,7 @@ export default class XepDialogComponent extends Component {
114
114
  }
115
115
 
116
116
  didReceiveAttrs() {
117
+ super.didReceiveAttrs();
117
118
  if (this.mdcComponent) {
118
119
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
119
120
  }
File without changes
File without changes
@@ -1,5 +1,9 @@
1
1
  import {
2
- classNames, layout, tagName, className, attribute,
2
+ classNames,
3
+ layout,
4
+ tagName,
5
+ className,
6
+ attribute,
3
7
  } from '@ember-decorators/component';
4
8
  import Component from '@ember/component';
5
9
  import template from '@xdam/ember-partials/templates/components/xep-drawer';
@@ -7,7 +11,6 @@ import { MDCDrawer } from '@material/drawer';
7
11
  import EmberObject, { computed } from '@ember/object';
8
12
  import { inject as service } from '@ember/service';
9
13
  import { addEventListener, runDisposables } from 'ember-lifeline';
10
- import classic from 'ember-classic-decorator';
11
14
 
12
15
  import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
13
16
 
@@ -27,7 +30,7 @@ const POSITION_TYPES = {
27
30
  * @class XepDrawer
28
31
  * @public
29
32
  */
30
- @classic
33
+
31
34
  @tagName('aside')
32
35
  @layout(template)
33
36
  @classNames('xep-drawer', 'mdc-drawer')
@@ -135,11 +138,15 @@ export default class XepDrawerComponent extends Component {
135
138
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
136
139
 
137
140
  if (this.variant === 'modal') {
138
- this.element.insertAdjacentElement('afterend', this.element.querySelector('.mdc-drawer-scrim'));
141
+ this.element.insertAdjacentElement(
142
+ 'afterend',
143
+ this.element.querySelector('.mdc-drawer-scrim'),
144
+ );
139
145
  }
140
146
 
141
- addEventListener(this, this.element, 'MDCDrawer:closed',
142
- () => updateDirtyProps(this.trackedProps, this.mdcComponent, this));
147
+ addEventListener(this, this.element, 'MDCDrawer:closed', () =>
148
+ updateDirtyProps(this.trackedProps, this.mdcComponent, this),
149
+ );
143
150
 
144
151
  if (this.register) {
145
152
  this.xepManager.registerComponent(this, this.register);
@@ -147,6 +154,7 @@ export default class XepDrawerComponent extends Component {
147
154
  }
148
155
 
149
156
  didReceiveAttrs() {
157
+ super.didReceiveAttrs();
150
158
  if (this.mdcComponent) {
151
159
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
152
160
  }
@@ -1,12 +1,14 @@
1
1
  import {
2
- classNames, className, layout, attribute,
2
+ classNames,
3
+ className,
4
+ layout,
5
+ attribute,
3
6
  } from '@ember-decorators/component';
4
7
  import Component from '@ember/component';
5
8
  import { MDCTextField, MDCTextFieldHelperText } from '@material/textfield';
6
9
  import template from '@xdam/ember-partials/templates/components/xep-input';
7
10
  import { guidFor } from '@ember/object/internals';
8
11
  import { inject as service } from '@ember/service';
9
- import classic from 'ember-classic-decorator';
10
12
 
11
13
  import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
12
14
 
@@ -17,7 +19,7 @@ import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
17
19
  * @class XepInput
18
20
  * @public
19
21
  */
20
- @classic
22
+
21
23
  @layout(template)
22
24
  @classNames('xep-input', 'mdc-text-field')
23
25
  export default class XepInputComponent extends Component {
@@ -270,7 +272,7 @@ export default class XepInputComponent extends Component {
270
272
  @className('mdc-text-field--outlined')
271
273
  outlined;
272
274
 
273
- trackedProps = ['value', 'disabled', 'valid']
275
+ trackedProps = ['value', 'disabled', 'valid'];
274
276
 
275
277
  didInsertElement() {
276
278
  super.didInsertElement(...arguments);
@@ -279,8 +281,13 @@ export default class XepInputComponent extends Component {
279
281
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
280
282
 
281
283
  if (this.helperText) {
282
- this._mdcHelperText = new MDCTextFieldHelperText(this.element.querySelector('.mdc-text-field-helper-text'));
283
- this.element.insertAdjacentElement('afterend', this.element.querySelector('.mdc-text-field-helper-text'));
284
+ this._mdcHelperText = new MDCTextFieldHelperText(
285
+ this.element.querySelector('.mdc-text-field-helper-text'),
286
+ );
287
+ this.element.insertAdjacentElement(
288
+ 'afterend',
289
+ this.element.querySelector('.mdc-text-field-helper-text'),
290
+ );
284
291
  }
285
292
 
286
293
  if (this.register) {
@@ -289,6 +296,7 @@ export default class XepInputComponent extends Component {
289
296
  }
290
297
 
291
298
  didReceiveAttrs() {
299
+ super.didReceiveAttrs();
292
300
  if (this.mdcComponent) {
293
301
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
294
302
  }
@@ -1,6 +1,10 @@
1
1
  import Component from '@ember/component';
2
2
  import {
3
- classNames, layout, className, attribute, tagName,
3
+ classNames,
4
+ layout,
5
+ className,
6
+ attribute,
7
+ tagName,
4
8
  } from '@ember-decorators/component';
5
9
  import template from '@xdam/ember-partials/templates/components/xep-list-divider';
6
10
 
File without changes
@@ -1,3 +1,9 @@
1
1
  import Component from '@glimmer/component';
2
2
 
3
- export default class XepListItemGraphicComponent extends Component {}
3
+ export default class XepListItemGraphicComponent extends Component {
4
+ /**
5
+ * Add a test selector for data attribute: `[data-test-list-item-graphic]`
6
+ * @argument [testSelector]
7
+ * @type {String}
8
+ */
9
+ }
@@ -1,6 +1,9 @@
1
1
  import Component from '@ember/component';
2
2
  import {
3
- classNames, layout, tagName, attribute,
3
+ classNames,
4
+ layout,
5
+ tagName,
6
+ attribute,
4
7
  } from '@ember-decorators/component';
5
8
  import template from '@xdam/ember-partials/templates/components/xep-list-item-meta';
6
9
 
@@ -1,6 +1,10 @@
1
1
  import Component from '@ember/component';
2
2
  import {
3
- classNames, layout, tagName, className, attribute,
3
+ classNames,
4
+ layout,
5
+ tagName,
6
+ className,
7
+ attribute,
4
8
  } from '@ember-decorators/component';
5
9
  import template from '@xdam/ember-partials/templates/components/xep-list-item-text';
6
10
  import EmberObject, { computed } from '@ember/object';
@@ -1,9 +1,11 @@
1
1
  import {
2
- classNames, layout, className, attribute,
2
+ classNames,
3
+ layout,
4
+ className,
5
+ attribute,
3
6
  } from '@ember-decorators/component';
4
7
  import Component from '@ember/component';
5
8
  import template from '@xdam/ember-partials/templates/components/xep-list-item';
6
- import classic from 'ember-classic-decorator';
7
9
 
8
10
  /**
9
11
  * An item contained within a xep-list component.
@@ -14,7 +16,6 @@ import classic from 'ember-classic-decorator';
14
16
  * @yield {XepListItemText} item.text
15
17
  * @yield {XepListItemMeta} item.meta
16
18
  */
17
- @classic
18
19
  @layout(template)
19
20
  @classNames('xep-list-item', 'mdc-list-item')
20
21
  export default class XepListItemComponent extends Component {
@@ -57,7 +58,15 @@ export default class XepListItemComponent extends Component {
57
58
  * @argument [click]
58
59
  * @type {Action}
59
60
  */
60
- click;
61
+
62
+ click(event) {
63
+ event.stopPropagation();
64
+ console.log('XepListItem clicked!', this.testSelector);
65
+
66
+ if (this.args?.click && typeof this.args.click === 'function') {
67
+ this.args.click(event);
68
+ }
69
+ }
61
70
 
62
71
  init() {
63
72
  super.init(...arguments);
@@ -1,12 +1,15 @@
1
+ import { set } from '@ember/object';
1
2
  import {
2
- classNames, layout, className, attribute,
3
+ classNames,
4
+ layout,
5
+ className,
6
+ attribute,
3
7
  } from '@ember-decorators/component';
4
8
  import Component from '@ember/component';
5
9
  import { MDCList } from '@material/list';
6
10
  import template from '@xdam/ember-partials/templates/components/xep-list';
7
11
  import { inject as service } from '@ember/service';
8
12
  import { alias } from '@ember/object/computed';
9
- import classic from 'ember-classic-decorator';
10
13
 
11
14
  import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
12
15
 
@@ -18,7 +21,7 @@ import updateDirtyProps from '@xdam/ember-partials/utils/update-dirty-props';
18
21
  * @yield {XepListItem} list.item
19
22
  * @yield {XepListDivider} list.divider
20
23
  */
21
- @classic
24
+
22
25
  @layout(template)
23
26
  @classNames('xep-list', 'mdc-list')
24
27
  export default class XepListComponent extends Component {
@@ -128,7 +131,7 @@ export default class XepListComponent extends Component {
128
131
  didInsertElement() {
129
132
  super.didInsertElement(...arguments);
130
133
 
131
- this.mdcComponent = new MDCList(this.element);
134
+ set(this, 'mdcComponent', new MDCList(this.element));
132
135
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
133
136
 
134
137
  if (this.initializeListType) {
@@ -141,6 +144,7 @@ export default class XepListComponent extends Component {
141
144
  }
142
145
 
143
146
  didReceiveAttrs() {
147
+ super.didReceiveAttrs();
144
148
  if (this.mdcComponent) {
145
149
  updateDirtyProps(this.trackedProps, this, this.mdcComponent);
146
150
  }
@@ -1,6 +1,9 @@
1
1
  import Component from '@ember/component';
2
2
  import {
3
- classNames, layout, className, attribute,
3
+ classNames,
4
+ layout,
5
+ className,
6
+ attribute,
4
7
  } from '@ember-decorators/component';
5
8
  import template from '@xdam/ember-partials/templates/components/xep-menu-surface';
6
9
  import EmberObject, { computed } from '@ember/object';