@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.
- package/.gitattributes +5 -5
- package/.yarnrc.yml +1 -0
- package/LICENSE.md +9 -9
- package/README.md +9 -3
- package/addon/components/xep-avatar.js +9 -4
- package/addon/components/xep-bubble.js +6 -3
- package/addon/components/xep-button.hbs +2 -0
- package/addon/components/xep-button.js +9 -1
- package/addon/components/xep-checkbox.js +12 -8
- package/addon/components/xep-chip-icon.js +1 -3
- package/addon/components/xep-chip-set.js +14 -6
- package/addon/components/xep-chip-text.js +0 -0
- package/addon/components/xep-chip.js +11 -5
- package/addon/components/xep-dialog-actions.hbs +0 -0
- package/addon/components/xep-dialog-actions.js +7 -1
- package/addon/components/xep-dialog-content.hbs +0 -0
- package/addon/components/xep-dialog-content.js +7 -1
- package/addon/components/xep-dialog-title.hbs +0 -0
- package/addon/components/xep-dialog-title.js +7 -1
- package/addon/components/xep-dialog.js +4 -3
- package/addon/components/xep-drawer-content.js +0 -0
- package/addon/components/xep-drawer-header.js +0 -0
- package/addon/components/xep-drawer.js +14 -6
- package/addon/components/xep-input.js +14 -6
- package/addon/components/xep-list-divider.js +5 -1
- package/addon/components/xep-list-item-graphic.hbs +0 -0
- package/addon/components/xep-list-item-graphic.js +7 -1
- package/addon/components/xep-list-item-meta.js +4 -1
- package/addon/components/xep-list-item-text.js +5 -1
- package/addon/components/xep-list-item.js +13 -4
- package/addon/components/xep-list.js +8 -4
- package/addon/components/xep-menu-surface.js +4 -1
- package/addon/components/xep-menu.js +12 -5
- package/addon/components/xep-radio.js +11 -6
- package/addon/components/xep-slider.js +11 -6
- package/addon/components/xep-snackbar.js +12 -4
- package/addon/components/xep-switch.js +6 -4
- package/addon/components/xep-textarea.js +12 -5
- package/addon/components/xep-toolbar-divider.js +0 -0
- package/addon/components/xep-toolbar-item-icon.js +4 -1
- package/addon/components/xep-toolbar-item-text.js +4 -1
- package/addon/components/xep-toolbar-item.js +0 -0
- package/addon/components/xep-toolbar-section.js +5 -2
- package/addon/components/xep-toolbar.js +4 -3
- package/addon/mixins/xep-resize.js +1 -1
- package/addon/services/xep-manager.js +1 -1
- package/addon/templates/components/xep-avatar.hbs +0 -1
- package/addon/templates/components/xep-bubble.hbs +0 -0
- package/addon/templates/components/xep-checkbox.hbs +1 -1
- package/addon/templates/components/xep-chip-icon.hbs +0 -0
- package/addon/templates/components/xep-chip-set.hbs +0 -0
- package/addon/templates/components/xep-chip-text.hbs +0 -0
- package/addon/templates/components/xep-chip.hbs +0 -0
- package/addon/templates/components/xep-dialog.hbs +0 -0
- package/addon/templates/components/xep-drawer-content.hbs +0 -0
- package/addon/templates/components/xep-drawer-header.hbs +0 -0
- package/addon/templates/components/xep-drawer.hbs +0 -0
- package/addon/templates/components/xep-input.hbs +3 -6
- package/addon/templates/components/xep-list-divider.hbs +0 -0
- package/addon/templates/components/xep-list-item-meta.hbs +0 -0
- package/addon/templates/components/xep-list-item-text.hbs +0 -0
- package/addon/templates/components/xep-list-item.hbs +0 -0
- package/addon/templates/components/xep-list.hbs +0 -0
- package/addon/templates/components/xep-menu-surface.hbs +0 -0
- package/addon/templates/components/xep-menu.hbs +0 -0
- package/addon/templates/components/xep-power-select.hbs +0 -0
- package/addon/templates/components/xep-radio.hbs +5 -1
- package/addon/templates/components/xep-slider.hbs +0 -0
- package/addon/templates/components/xep-snackbar.hbs +0 -0
- package/addon/templates/components/xep-switch.hbs +10 -1
- package/addon/templates/components/xep-textarea.hbs +1 -2
- package/addon/templates/components/xep-toolbar-divider.hbs +0 -0
- package/addon/templates/components/xep-toolbar-item-icon.hbs +0 -0
- package/addon/templates/components/xep-toolbar-item-text.hbs +0 -0
- package/addon/templates/components/xep-toolbar-item.hbs +0 -0
- package/addon/templates/components/xep-toolbar-section.hbs +0 -0
- package/addon/templates/components/xep-toolbar.hbs +0 -0
- package/addon/utils/style-string.js +9 -3
- package/addon/utils/update-dirty-props.js +9 -4
- package/app/components/xep-avatar.js +0 -0
- package/app/components/xep-bubble.js +0 -0
- package/app/components/xep-button.js +0 -0
- package/app/components/xep-checkbox.js +1 -0
- package/app/components/xep-chip-icon.js +0 -0
- package/app/components/xep-chip-set.js +1 -0
- package/app/components/xep-chip-text.js +0 -0
- package/app/components/xep-chip.js +0 -0
- package/app/components/xep-dialog-actions.js +0 -0
- package/app/components/xep-dialog-content.js +0 -0
- package/app/components/xep-dialog-title.js +0 -0
- package/app/components/xep-dialog.js +1 -0
- package/app/components/xep-drawer-content.js +0 -0
- package/app/components/xep-drawer-header.js +0 -0
- package/app/components/xep-drawer.js +1 -0
- package/app/components/xep-input.js +1 -0
- package/app/components/xep-list-divider.js +0 -0
- package/app/components/xep-list-item-graphic.js +0 -0
- package/app/components/xep-list-item-meta.js +0 -0
- package/app/components/xep-list-item-text.js +0 -0
- package/app/components/xep-list-item.js +0 -0
- package/app/components/xep-list.js +1 -0
- package/app/components/xep-menu-surface.js +1 -0
- package/app/components/xep-menu.js +2 -0
- package/app/components/xep-radio.js +1 -0
- package/app/components/xep-slider.js +1 -0
- package/app/components/xep-snackbar.js +1 -0
- package/app/components/xep-switch.js +1 -0
- package/app/components/xep-textarea.js +0 -0
- package/app/components/xep-toolbar-divider.js +0 -0
- package/app/components/xep-toolbar-item-icon.js +0 -0
- package/app/components/xep-toolbar-item-text.js +0 -0
- package/app/components/xep-toolbar-item.js +0 -0
- package/app/components/xep-toolbar-section.js +0 -0
- package/app/components/xep-toolbar.js +0 -0
- package/app/mixins/xep-resize.js +0 -0
- package/app/services/xep-manager.js +0 -0
- package/app/styles/ember-partials/components/xep-avatar.scss +24 -24
- package/app/styles/ember-partials/components/xep-bubble.scss +20 -20
- package/app/styles/ember-partials/components/xep-button.scss +58 -58
- package/app/styles/ember-partials/components/xep-drawer.scss +21 -21
- package/app/styles/ember-partials/components/xep-snackbar.scss +3 -3
- package/app/styles/ember-partials/components/xep-toolbar.scss +107 -107
- package/app/styles/ember-partials/dark-theme.scss +42 -42
- package/app/styles/ember-partials/helpers/alignment.scss +59 -59
- package/app/styles/ember-partials/helpers/color.scss +27 -27
- package/app/styles/ember-partials/helpers/display.scss +27 -27
- package/app/styles/ember-partials/helpers/overrides.scss +7 -7
- package/app/styles/ember-partials/helpers/root.scss +13 -13
- package/app/styles/ember-partials/helpers/rotate.scss +11 -11
- package/app/styles/ember-partials/helpers/spacing.scss +25 -25
- package/app/styles/ember-partials/helpers/typography.scss +5 -5
- package/app/styles/ember-partials/helpers/visibility.scss +23 -23
- package/app/styles/ember-partials/light-theme.scss +42 -42
- package/app/styles/ember-partials/mixins/breakpoints.scss +24 -24
- package/app/styles/ember-partials/mixins/strip-unit.scss +12 -12
- package/app/styles/ember-partials/variables.scss +35 -35
- package/app/styles/ember-partials/xdam-theme.scss +49 -49
- package/app/styles/ember-partials.scss +50 -48
- package/app/utils/style-string.js +0 -0
- package/backstop.json +168 -168
- package/blueprints/xep-component/files/__root__/__path__/__name__.js +0 -0
- package/blueprints/xep-component/files/__root__/__templatepath__/__templatename__.hbs +0 -0
- package/blueprints/xep-component/index.js +1 -1
- package/blueprints/xep-component-test/index.js +1 -1
- package/blueprints/xep-component-test/qunit-files/__root__/__testType__/__path__/__test__.js +0 -0
- package/config/addon-docs.js +1 -1
- package/config/deploy.js +0 -0
- package/config/environment.js +1 -1
- package/config/release.js +0 -0
- package/index.js +70 -115
- 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)
|
|
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
|
|
20
|
-
* Ember CLI
|
|
21
|
-
* Node.js
|
|
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,
|
|
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
|
|
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,
|
|
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
|
-
|
|
18
|
+
|
|
16
19
|
@tagName('span')
|
|
17
20
|
@layout(template)
|
|
18
21
|
@classNames('xep-bubble')
|
|
@@ -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 (
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
93
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
92
|
+
set(
|
|
93
|
+
this,
|
|
94
|
+
'mdcComponent',
|
|
95
|
+
this.mdcComponent || new MDCChipSet(this.element),
|
|
96
|
+
);
|
|
90
97
|
|
|
91
|
-
addEventListener(this, this.element, 'MDCChip:selection',
|
|
92
|
-
|
|
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,
|
|
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
|
-
|
|
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(
|
|
65
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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(
|
|
283
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|
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,
|
|
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';
|