@shoper/phoenix_design_system 0.25.0-4 → 0.25.0-6
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/build/cjs/packages/phoenix/src/components/icon/icon.js +2 -14
- package/build/cjs/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/tag/tag.js +1 -0
- package/build/cjs/packages/phoenix/src/components/tag/tag.js.map +1 -1
- package/build/cjs/packages/phoenix/src/directives/namespaced_attribure_directive.js +22 -0
- package/build/cjs/packages/phoenix/src/directives/namespaced_attribure_directive.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/icon/icon.js +3 -15
- package/build/esm/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/tag/tag.js +1 -0
- package/build/esm/packages/phoenix/src/components/tag/tag.js.map +1 -1
- package/build/esm/packages/phoenix/src/directives/namespaced_attribure_directive.d.ts +8 -0
- package/build/esm/packages/phoenix/src/directives/namespaced_attribure_directive.js +18 -0
- package/build/esm/packages/phoenix/src/directives/namespaced_attribure_directive.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,21 +9,9 @@ var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/ph
|
|
|
9
9
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
10
10
|
var index = require('../../../../../external/classnames/index.js');
|
|
11
11
|
var icon_constants = require('./icon_constants.js');
|
|
12
|
-
require('
|
|
13
|
-
var directive = require('../../../../../external/lit/external/lit-html/directive.js');
|
|
12
|
+
var namespaced_attribure_directive = require('../../directives/namespaced_attribure_directive.js');
|
|
14
13
|
|
|
15
14
|
var HIcon_1;
|
|
16
|
-
class NamespaceDirective extends directive.Directive {
|
|
17
|
-
update(part, [namespace, value]) {
|
|
18
|
-
const attributePart = part;
|
|
19
|
-
attributePart.element.setAttributeNS(namespace, attributePart.name, value);
|
|
20
|
-
return this.render(namespace, value);
|
|
21
|
-
}
|
|
22
|
-
render(namespace, value) {
|
|
23
|
-
return lit.noChange;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const namespaced = directive.directive(NamespaceDirective);
|
|
27
15
|
exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
28
16
|
constructor() {
|
|
29
17
|
super(...arguments);
|
|
@@ -43,7 +31,7 @@ exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixL
|
|
|
43
31
|
super.render();
|
|
44
32
|
return lit.html `
|
|
45
33
|
<svg class="${this._cssClasses}">
|
|
46
|
-
<use xlink:href="${
|
|
34
|
+
<use xlink:href="${namespaced_attribure_directive.namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src}#${this.iconName}`)}"></use>
|
|
47
35
|
</svg>
|
|
48
36
|
`;
|
|
49
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,oBAAoB,6CAAiD;AACrE;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,oBAAoB,6CAAiD;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -24,6 +24,7 @@ exports.HTag = class HTag extends phoenix_light_lit_element.PhoenixLightLitEleme
|
|
|
24
24
|
return;
|
|
25
25
|
this._setupEvents();
|
|
26
26
|
this._btnController = new btn_controller.BtnController(this, this._removeTag);
|
|
27
|
+
this.classList.add(tag_constants.TAG_CSS_CLASSES.tagInteractive);
|
|
27
28
|
}
|
|
28
29
|
_setupEvents() {
|
|
29
30
|
this.addEventListener('click', this._removeTag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var lit = require('lit');
|
|
6
|
+
require('../../../../external/lit/external/lit-html/lit-html.js');
|
|
7
|
+
var directive = require('../../../../external/lit/external/lit-html/directive.js');
|
|
8
|
+
|
|
9
|
+
class NamespaceAttributeDirective extends directive.Directive {
|
|
10
|
+
update(part, [namespace, value]) {
|
|
11
|
+
const attributePart = part;
|
|
12
|
+
attributePart.element.setAttributeNS(namespace, attributePart.name, value);
|
|
13
|
+
return this.render(namespace, value);
|
|
14
|
+
}
|
|
15
|
+
render(namespace, value) {
|
|
16
|
+
return lit.noChange;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const namespacedAttribute = directive.directive(NamespaceAttributeDirective);
|
|
20
|
+
|
|
21
|
+
exports.namespacedAttribute = namespacedAttribute;
|
|
22
|
+
//# sourceMappingURL=namespaced_attribure_directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAgE;AACxE,wBAAwB,yDAAiE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { html
|
|
2
|
+
import { html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import classnames from '../../../../../external/classnames/index.js';
|
|
7
7
|
import { ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP } from './icon_constants.js';
|
|
8
|
-
import '
|
|
9
|
-
import { directive as e, Directive as i } from '../../../../../external/lit/external/lit-html/directive.js';
|
|
8
|
+
import { namespacedAttribute } from '../../directives/namespaced_attribure_directive.js';
|
|
10
9
|
|
|
11
10
|
var HIcon_1;
|
|
12
|
-
class NamespaceDirective extends i {
|
|
13
|
-
update(part, [namespace, value]) {
|
|
14
|
-
const attributePart = part;
|
|
15
|
-
attributePart.element.setAttributeNS(namespace, attributePart.name, value);
|
|
16
|
-
return this.render(namespace, value);
|
|
17
|
-
}
|
|
18
|
-
render(namespace, value) {
|
|
19
|
-
return noChange;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const namespaced = e(NamespaceDirective);
|
|
23
11
|
let HIcon = HIcon_1 = class HIcon extends PhoenixLightLitElement {
|
|
24
12
|
constructor() {
|
|
25
13
|
super(...arguments);
|
|
@@ -39,7 +27,7 @@ let HIcon = HIcon_1 = class HIcon extends PhoenixLightLitElement {
|
|
|
39
27
|
super.render();
|
|
40
28
|
return html `
|
|
41
29
|
<svg class="${this._cssClasses}">
|
|
42
|
-
<use xlink:href="${
|
|
30
|
+
<use xlink:href="${namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src}#${this.iconName}`)}"></use>
|
|
43
31
|
</svg>
|
|
44
32
|
`;
|
|
45
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,6CAAiD;AACxE;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,6CAAiD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -20,6 +20,7 @@ let HTag = class HTag extends PhoenixLightLitElement {
|
|
|
20
20
|
return;
|
|
21
21
|
this._setupEvents();
|
|
22
22
|
this._btnController = new BtnController(this, this._removeTag);
|
|
23
|
+
this.classList.add(TAG_CSS_CLASSES.tagInteractive);
|
|
23
24
|
}
|
|
24
25
|
_setupEvents() {
|
|
25
26
|
this.addEventListener('click', this._removeTag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,4CAAgD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,4CAAgD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Directive, DirectiveParameters, PartInfo } from 'lit/async-directive.js';
|
|
2
|
+
import { noChange } from 'lit';
|
|
3
|
+
declare class NamespaceAttributeDirective extends Directive {
|
|
4
|
+
update(part: PartInfo, [namespace, value]: DirectiveParameters<this>): typeof noChange;
|
|
5
|
+
render(namespace: string, value: string): typeof noChange;
|
|
6
|
+
}
|
|
7
|
+
export declare const namespacedAttribute: (namespace: string, value: string) => import("lit/async-directive.js").DirectiveResult<typeof NamespaceAttributeDirective>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { noChange } from 'lit';
|
|
2
|
+
import '../../../../external/lit/external/lit-html/lit-html.js';
|
|
3
|
+
import { directive as e, Directive as i } from '../../../../external/lit/external/lit-html/directive.js';
|
|
4
|
+
|
|
5
|
+
class NamespaceAttributeDirective extends i {
|
|
6
|
+
update(part, [namespace, value]) {
|
|
7
|
+
const attributePart = part;
|
|
8
|
+
attributePart.element.setAttributeNS(namespace, attributePart.name, value);
|
|
9
|
+
return this.render(namespace, value);
|
|
10
|
+
}
|
|
11
|
+
render(namespace, value) {
|
|
12
|
+
return noChange;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const namespacedAttribute = e(NamespaceAttributeDirective);
|
|
16
|
+
|
|
17
|
+
export { namespacedAttribute };
|
|
18
|
+
//# sourceMappingURL=namespaced_attribure_directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,OAAO,wDAAgE;AACvE,+CAA+C,yDAAiE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|