@shoper/phoenix_design_system 1.17.3-5 → 1.17.3-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/color_swatches/color_swatches.js +43 -7
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +3 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more.js +37 -0
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js +8 -0
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/messages/base_message.js +47 -0
- package/build/cjs/packages/phoenix/src/components/messages/base_message.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js +6 -1
- package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/messages/hints/hint.js +0 -10
- package/build/cjs/packages/phoenix/src/components/messages/hints/hint.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/messages/tooltips/tooltip.js +0 -10
- package/build/cjs/packages/phoenix/src/components/messages/tooltips/tooltip.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal_constants.js +2 -0
- package/build/cjs/packages/phoenix/src/components/portal/portal_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +7 -14
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +6 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +44 -8
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +3 -2
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.js +35 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js +4 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/messages/base_message.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/messages/base_message.js +49 -2
- package/build/esm/packages/phoenix/src/components/messages/base_message.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/messages/base_message_constants.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js +5 -2
- package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/messages/hints/hint.d.ts +0 -2
- package/build/esm/packages/phoenix/src/components/messages/hints/hint.js +0 -10
- package/build/esm/packages/phoenix/src/components/messages/hints/hint.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.d.ts +0 -2
- package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.js +0 -10
- package/build/esm/packages/phoenix/src/components/messages/tooltips/tooltip.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal_constants.js +2 -1
- package/build/esm/packages/phoenix/src/components/portal/portal_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +1 -2
- package/build/esm/packages/phoenix/src/index.js +1 -2
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +5 -5
- package/build/cjs/packages/phoenix/src/components/show-more/show_more.js +0 -121
- package/build/cjs/packages/phoenix/src/components/show-more/show_more.js.map +0 -1
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js +0 -29
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js.map +0 -1
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js +0 -15
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/show-more/show_more.d.ts +0 -22
- package/build/esm/packages/phoenix/src/components/show-more/show_more.js +0 -119
- package/build/esm/packages/phoenix/src/components/show-more/show_more.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.d.ts +0 -7
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js +0 -27
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.d.ts +0 -7
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js +0 -10
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js.map +0 -1
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -8,7 +8,8 @@ const COLOR_SWATCHES_EVENT_NAMES = {
|
|
|
8
8
|
change: 'change',
|
|
9
9
|
markDisabledItems: 'markDisabledItems',
|
|
10
10
|
showMore: 'showMore'
|
|
11
|
-
};
|
|
11
|
+
};
|
|
12
|
+
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
12
13
|
|
|
13
|
-
export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES };
|
|
14
|
+
export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE };
|
|
14
15
|
//# sourceMappingURL=color_swatches_constants.js.map
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HColorSwatchesShowMore extends PhoenixLightLitElement {
|
|
3
|
+
private _btnController;
|
|
4
|
+
constructor();
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
private _addCssClasses;
|
|
7
|
+
private setupEvents;
|
|
8
|
+
private _dispatchClickedEvent;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
4
|
+
import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
|
|
5
|
+
import { COLOR_SWATCHES_EVENT_NAMES } from '../color_swatches_constants.js';
|
|
6
|
+
import { SHOW_MORE_CSS_CLASS } from './show_more_constants.js';
|
|
7
|
+
|
|
8
|
+
let HColorSwatchesShowMore = class HColorSwatchesShowMore extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this._dispatchClickedEvent = () => {
|
|
12
|
+
this.emitCustomEvent(COLOR_SWATCHES_EVENT_NAMES.showMore);
|
|
13
|
+
};
|
|
14
|
+
this._btnController = new BtnController(this, this._dispatchClickedEvent);
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
super.connectedCallback();
|
|
18
|
+
this.setupEvents();
|
|
19
|
+
this._addCssClasses();
|
|
20
|
+
this.classList.add(SHOW_MORE_CSS_CLASS);
|
|
21
|
+
}
|
|
22
|
+
_addCssClasses() {
|
|
23
|
+
this.classList.add(SHOW_MORE_CSS_CLASS);
|
|
24
|
+
}
|
|
25
|
+
setupEvents() {
|
|
26
|
+
this.addEventListener('click', this._dispatchClickedEvent);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
HColorSwatchesShowMore = __decorate([
|
|
30
|
+
phoenixCustomElement('h-color-swatches-show-more'),
|
|
31
|
+
__metadata("design:paramtypes", [])
|
|
32
|
+
], HColorSwatchesShowMore);
|
|
33
|
+
|
|
34
|
+
export { HColorSwatchesShowMore };
|
|
35
|
+
//# sourceMappingURL=show_more.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;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;"}
|
package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SHOW_MORE_CSS_CLASS = "color-swatches-show-more";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IBaseMessage } from './base_message_types';
|
|
2
2
|
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
import type { TDirection } from '@dreamcommerce/utilities';
|
|
4
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
4
5
|
export declare class BaseMessage extends PhoenixLightLitElement implements IBaseMessage {
|
|
5
6
|
opened: boolean;
|
|
6
7
|
portalTarget: string;
|
|
@@ -8,6 +9,7 @@ export declare class BaseMessage extends PhoenixLightLitElement implements IBase
|
|
|
8
9
|
offset: number;
|
|
9
10
|
mouseonly: boolean;
|
|
10
11
|
tabindex: string;
|
|
12
|
+
private _messageId;
|
|
11
13
|
private _positionController;
|
|
12
14
|
private _clickOutsideController;
|
|
13
15
|
private _$messageContent;
|
|
@@ -16,11 +18,18 @@ export declare class BaseMessage extends PhoenixLightLitElement implements IBase
|
|
|
16
18
|
private _shouldDelayClosing;
|
|
17
19
|
private _closeTimeout;
|
|
18
20
|
private _messageComponentName;
|
|
21
|
+
private _$baseMessageContent?;
|
|
22
|
+
private _tooltipRef;
|
|
19
23
|
constructor();
|
|
20
24
|
connectedCallback(messageComponentName?: string): void;
|
|
25
|
+
firstUpdated(props: PropertyValues): void;
|
|
26
|
+
private _handleChildrenAriaAttributes;
|
|
21
27
|
private static _appendMessagePortal;
|
|
22
28
|
private _setupEventListeners;
|
|
23
29
|
protected _positionMessage: () => void;
|
|
24
30
|
open: () => void;
|
|
31
|
+
private _closeFromKeyboard;
|
|
25
32
|
close: () => void;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
protected render(): TemplateResult;
|
|
26
35
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { html } from 'lit';
|
|
2
3
|
import { property } from 'lit/decorators';
|
|
3
|
-
import { DIRECTIONS } from '@dreamcommerce/utilities';
|
|
4
|
+
import { DIRECTIONS, DomUtils } from '@dreamcommerce/utilities';
|
|
4
5
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
6
|
+
import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
5
7
|
import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP, PORTAL_TARGET_ATTRIBUTE_NAME } from '../portal/portal_constants.js';
|
|
6
8
|
import { ClickOutsideController } from '../../controllers/click_outside_controller/click_outside_controller.js';
|
|
7
9
|
import { RelativePositionController } from '../../controllers/relative_position_controller/relative_position_controller.js';
|
|
8
|
-
import { DEFAULT_MESSAGE_PORTAL_NAME, DEFAULT_MESSAGE_OFFSET, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS } from './base_message_constants.js';
|
|
10
|
+
import { DEFAULT_MESSAGE_PORTAL_NAME, DEFAULT_MESSAGE_OFFSET, LIST_OF_MESSAGE_CHILDREN, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, SCREEN_READER_ONLY_CLASS_NAME, MESSAGE_CONTENT_SLOT_NAME } from './base_message_constants.js';
|
|
11
|
+
import { createRef, ref } from 'lit/directives/ref';
|
|
9
12
|
|
|
10
13
|
class BaseMessage extends PhoenixLightLitElement {
|
|
11
14
|
constructor() {
|
|
@@ -16,9 +19,22 @@ class BaseMessage extends PhoenixLightLitElement {
|
|
|
16
19
|
this.offset = DEFAULT_MESSAGE_OFFSET;
|
|
17
20
|
this.mouseonly = false;
|
|
18
21
|
this.tabindex = '-1';
|
|
22
|
+
this._messageId = v4();
|
|
23
|
+
this._tooltipRef = createRef();
|
|
24
|
+
this._handleChildrenAriaAttributes = () => {
|
|
25
|
+
[...this.children].forEach((child) => {
|
|
26
|
+
if (LIST_OF_MESSAGE_CHILDREN.includes(child.tagName.toLowerCase()) || this._tooltipRef.value === child)
|
|
27
|
+
return;
|
|
28
|
+
child.setAttribute('aria-describedby', `${child.getAttribute('aria-describedby') || ''} ${this._messageId}`);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
19
31
|
this._setupEventListeners = () => {
|
|
32
|
+
var _a, _b;
|
|
20
33
|
this.addEventListener('mouseenter', this.open);
|
|
21
34
|
this.addEventListener('mouseleave', this.close);
|
|
35
|
+
this.addEventListener('keydown', this._closeFromKeyboard);
|
|
36
|
+
(_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.open);
|
|
37
|
+
(_b = this._$baseMessageContent) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.close);
|
|
22
38
|
if (!this.mouseonly) {
|
|
23
39
|
this.addEventListener('focusin', this.open);
|
|
24
40
|
this.addEventListener('focusout', this.close);
|
|
@@ -39,6 +55,13 @@ class BaseMessage extends PhoenixLightLitElement {
|
|
|
39
55
|
this.opened = true;
|
|
40
56
|
}, MESSAGE_SHOW_DELAY_IN_MS);
|
|
41
57
|
};
|
|
58
|
+
this._closeFromKeyboard = (ev) => {
|
|
59
|
+
if (ev.key !== 'Escape' || !this.opened)
|
|
60
|
+
return;
|
|
61
|
+
ev.preventDefault();
|
|
62
|
+
ev.stopPropagation();
|
|
63
|
+
this.close();
|
|
64
|
+
};
|
|
42
65
|
this.close = () => {
|
|
43
66
|
this._shouldDelayClosing = Date.now() - this._tooltipOpenTime > MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS;
|
|
44
67
|
clearTimeout(this._openTimeout);
|
|
@@ -79,8 +102,14 @@ class BaseMessage extends PhoenixLightLitElement {
|
|
|
79
102
|
offset: this.offset
|
|
80
103
|
});
|
|
81
104
|
this.setAttribute('tabindex', this.tabindex);
|
|
105
|
+
if (!this._$baseMessageContent)
|
|
106
|
+
this._$baseMessageContent = [...this.children].find((child) => MESSAGE_CONTENT_ELEMENTS.includes(child.tagName.toLowerCase()));
|
|
82
107
|
this._setupEventListeners();
|
|
83
108
|
}
|
|
109
|
+
firstUpdated(props) {
|
|
110
|
+
super.firstUpdated(props);
|
|
111
|
+
this._handleChildrenAriaAttributes();
|
|
112
|
+
}
|
|
84
113
|
static _appendMessagePortal() {
|
|
85
114
|
const $messagePortalTarget = document.querySelector(`[name="${DEFAULT_MESSAGE_PORTAL_NAME}"]`);
|
|
86
115
|
if ($messagePortalTarget)
|
|
@@ -89,6 +118,24 @@ class BaseMessage extends PhoenixLightLitElement {
|
|
|
89
118
|
$portalTarget.setAttribute(PORTAL_TARGET_NAME_PROP, DEFAULT_MESSAGE_PORTAL_NAME);
|
|
90
119
|
document.body.appendChild($portalTarget);
|
|
91
120
|
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
super.disconnectedCallback();
|
|
124
|
+
(_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.open);
|
|
125
|
+
(_b = this._$baseMessageContent) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.close);
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
var _a;
|
|
129
|
+
super.render();
|
|
130
|
+
return html `
|
|
131
|
+
<span ${ref(this._tooltipRef)} id="${this._messageId}" class="${SCREEN_READER_ONLY_CLASS_NAME}" role="tooltip">
|
|
132
|
+
${DomUtils.stripHTMLTags(((_a = this._$baseMessageContent) === null || _a === void 0 ? void 0 : _a.innerHTML) || '')}
|
|
133
|
+
</span>
|
|
134
|
+
<h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
|
|
135
|
+
${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
|
|
136
|
+
</h-portal>
|
|
137
|
+
`;
|
|
138
|
+
}
|
|
92
139
|
}
|
|
93
140
|
__decorate([
|
|
94
141
|
property({ type: Boolean, reflect: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;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;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;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,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,eAAe,qDAAyD;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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,6 +4,8 @@ export declare const MESSAGE_REMOVED_CLASS_NAME = "removed";
|
|
|
4
4
|
export declare const DEFAULT_MESSAGE_OFFSET = 10;
|
|
5
5
|
export declare const MESSAGE_ELEMENTS: string[];
|
|
6
6
|
export declare const MESSAGE_CONTENT_ELEMENTS: string[];
|
|
7
|
+
export declare const LIST_OF_MESSAGE_CHILDREN: string[];
|
|
7
8
|
export declare const MESSAGE_SHOW_DELAY_IN_MS = 100;
|
|
8
9
|
export declare const MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS = 500;
|
|
9
10
|
export declare const MESSAGE_CLOSE_DELAY_IN_MS = 500;
|
|
11
|
+
export declare const SCREEN_READER_ONLY_CLASS_NAME = "sr-only";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PORTAL_COMPONENT_NAME } from '../portal/portal_constants.js';
|
|
1
2
|
import { HINT_CONTENT_ELEMENT_NAME } from './hints/hint_constants.js';
|
|
2
3
|
import { TOOLTIP_CONTENT_ELEMENT_NAME } from './tooltips/tooltip_constants.js';
|
|
3
4
|
|
|
@@ -6,9 +7,11 @@ const MESSAGE_CONTENT_SLOT_NAME = 'message-content';
|
|
|
6
7
|
const MESSAGE_REMOVED_CLASS_NAME = `removed`;
|
|
7
8
|
const DEFAULT_MESSAGE_OFFSET = 10;
|
|
8
9
|
const MESSAGE_CONTENT_ELEMENTS = [TOOLTIP_CONTENT_ELEMENT_NAME, HINT_CONTENT_ELEMENT_NAME];
|
|
10
|
+
const LIST_OF_MESSAGE_CHILDREN = [...MESSAGE_CONTENT_ELEMENTS, PORTAL_COMPONENT_NAME];
|
|
9
11
|
const MESSAGE_SHOW_DELAY_IN_MS = 100;
|
|
10
12
|
const MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS = 500;
|
|
11
|
-
const MESSAGE_CLOSE_DELAY_IN_MS = 500;
|
|
13
|
+
const MESSAGE_CLOSE_DELAY_IN_MS = 500;
|
|
14
|
+
const SCREEN_READER_ONLY_CLASS_NAME = 'sr-only';
|
|
12
15
|
|
|
13
|
-
export { DEFAULT_MESSAGE_OFFSET, DEFAULT_MESSAGE_PORTAL_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, MESSAGE_CONTENT_SLOT_NAME, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS };
|
|
16
|
+
export { DEFAULT_MESSAGE_OFFSET, DEFAULT_MESSAGE_PORTAL_NAME, LIST_OF_MESSAGE_CHILDREN, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, MESSAGE_CONTENT_SLOT_NAME, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, SCREEN_READER_ONLY_CLASS_NAME };
|
|
14
17
|
//# sourceMappingURL=base_message_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
3
|
-
import { html } from 'lit-html';
|
|
4
3
|
import { HINT_DEFAULT_OFFSET, HINT_CLASS_NAME, HINT_ELEMENT_NAME } from './hint_constants.js';
|
|
5
|
-
import { MESSAGE_CONTENT_SLOT_NAME } from '../base_message_constants.js';
|
|
6
4
|
import { BaseMessage } from '../base_message.js';
|
|
7
5
|
|
|
8
6
|
let HHint = class HHint extends BaseMessage {
|
|
@@ -14,14 +12,6 @@ let HHint = class HHint extends BaseMessage {
|
|
|
14
12
|
super.connectedCallback(HINT_CLASS_NAME);
|
|
15
13
|
this.classList.add(HINT_CLASS_NAME);
|
|
16
14
|
}
|
|
17
|
-
render() {
|
|
18
|
-
super.render();
|
|
19
|
-
return html `
|
|
20
|
-
<h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
|
|
21
|
-
${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
|
|
22
|
-
</h-portal>
|
|
23
|
-
`;
|
|
24
|
-
}
|
|
25
15
|
};
|
|
26
16
|
HHint = __decorate([
|
|
27
17
|
phoenixCustomElement(HINT_ELEMENT_NAME),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;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,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { __decorate } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
3
|
-
import { html } from 'lit-html';
|
|
4
3
|
import { TOOLTIP_CLASS_NAME, TOOLTIP_ELEMENT_NAME } from './tooltip_constants.js';
|
|
5
|
-
import { MESSAGE_CONTENT_SLOT_NAME } from '../base_message_constants.js';
|
|
6
4
|
import { BaseMessage } from '../base_message.js';
|
|
7
5
|
|
|
8
6
|
let HTooltip = class HTooltip extends BaseMessage {
|
|
@@ -10,14 +8,6 @@ let HTooltip = class HTooltip extends BaseMessage {
|
|
|
10
8
|
super.connectedCallback(TOOLTIP_CLASS_NAME);
|
|
11
9
|
this.classList.add(TOOLTIP_CLASS_NAME);
|
|
12
10
|
}
|
|
13
|
-
render() {
|
|
14
|
-
super.render();
|
|
15
|
-
return html `
|
|
16
|
-
<h-portal ?disabled="${!this.opened}" @open="${this._positionMessage}" to="${this.portalTarget}" hidden>
|
|
17
|
-
${this.getSlot(MESSAGE_CONTENT_SLOT_NAME)}
|
|
18
|
-
</h-portal>
|
|
19
|
-
`;
|
|
20
|
-
}
|
|
21
11
|
};
|
|
22
12
|
HTooltip = __decorate([
|
|
23
13
|
phoenixCustomElement(TOOLTIP_ELEMENT_NAME)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,+CAAmD;AAC9E;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,+CAAmD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,8 +3,9 @@ const PORTAL_EVENTS = {
|
|
|
3
3
|
close: 'close'
|
|
4
4
|
};
|
|
5
5
|
const PORTAL_TARGET_NAME_PROP = 'name';
|
|
6
|
+
const PORTAL_COMPONENT_NAME = 'h-portal';
|
|
6
7
|
const PORTAL_TARGET_COMPONENT_NAME = 'h-portal-target';
|
|
7
8
|
const PORTAL_TARGET_ATTRIBUTE_NAME = 'portal-target';
|
|
8
9
|
|
|
9
|
-
export { PORTAL_EVENTS, PORTAL_TARGET_ATTRIBUTE_NAME, PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP };
|
|
10
|
+
export { PORTAL_COMPONENT_NAME, PORTAL_EVENTS, PORTAL_TARGET_ATTRIBUTE_NAME, PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP };
|
|
10
11
|
//# sourceMappingURL=portal_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -91,6 +91,7 @@ export { BACKDROP_EVENTS } from "./components/backdrop/backdrop_constants";
|
|
|
91
91
|
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control';
|
|
92
92
|
export { HColorSwatches } from './components/color_swatches/color_swatches';
|
|
93
93
|
export { HColorItem } from './components/color_swatches/color_item/color_item';
|
|
94
|
+
export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more';
|
|
94
95
|
export { TColorSwatchesControlChangeEventDetail } from "./components/color_swatches/color_swatches_types";
|
|
95
96
|
export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from "./components/form/color_swatches_control/color_swatches_control_constants";
|
|
96
97
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller';
|
|
@@ -139,6 +140,4 @@ export * from './components/toggle/toggle_types';
|
|
|
139
140
|
export * from './components/toggle/toggle_constants';
|
|
140
141
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share';
|
|
141
142
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller';
|
|
142
|
-
export { HShowMore } from './components/show-more/show_more';
|
|
143
|
-
export { HShowMoreButton } from './components/show-more/show_more_button';
|
|
144
143
|
export { phoenixCustomElement } from './core/decorators/phoenix_custom_element';
|
|
@@ -79,10 +79,10 @@ export { HToggleButton } from './components/groups/toggle_button_group/toggle_bu
|
|
|
79
79
|
export { CLICK_OUTSIDE_CONTROLLER_MESSAGES } from './controllers/click_outside_controller/click_outside_controller_messages.js';
|
|
80
80
|
export { HBackdrop } from './components/backdrop/backdrop.js';
|
|
81
81
|
export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from './components/form/color_swatches_control/color_swatches_control_constants.js';
|
|
82
|
-
export { HShowMoreButton } from './components/show-more/show_more_button.js';
|
|
83
82
|
export { HColorSwatches } from './components/color_swatches/color_swatches.js';
|
|
84
83
|
export { HColorItem } from './components/color_swatches/color_item/color_item.js';
|
|
85
84
|
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
85
|
+
export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more.js';
|
|
86
86
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller.js';
|
|
87
87
|
export { HSlider } from './components/slider/slider.js';
|
|
88
88
|
export { HScroller } from './components/scroller/scroller.js';
|
|
@@ -122,5 +122,4 @@ export { HToggle } from './components/toggle/toggle.js';
|
|
|
122
122
|
export { HToggleBtn } from './components/toggle/toggle_button.js';
|
|
123
123
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share.js';
|
|
124
124
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller.js';
|
|
125
|
-
export { HShowMore } from './components/show-more/show_more.js';
|
|
126
125
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;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;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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@shoper/phoenix_design_system",
|
|
3
3
|
"packageManager": "yarn@3.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.17.3-
|
|
5
|
+
"version": "1.17.3-6",
|
|
6
6
|
"description": "phoenix design system",
|
|
7
7
|
"author": "zefirek",
|
|
8
8
|
"license": "MIT",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@dreamcommerce/utilities": "^1.0.0",
|
|
30
|
-
"@splidejs/splide": "4.0.7",
|
|
31
|
-
"@splidejs/splide-extension-auto-scroll": "0.5.3"
|
|
30
|
+
"@splidejs/splide": "^4.0.7",
|
|
31
|
+
"@splidejs/splide-extension-auto-scroll": "^0.5.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@dreamcommerce/utilities": "^1.20.1-
|
|
34
|
+
"@dreamcommerce/utilities": "^1.20.1-3",
|
|
35
35
|
"@shoper/jest_config": "^0.0.0",
|
|
36
36
|
"@shoper/tsconfig": "^0.0.0",
|
|
37
37
|
"@splidejs/splide": "4.0.7",
|
|
38
|
-
"@splidejs/splide-extension-auto-scroll": "0.5.3",
|
|
38
|
+
"@splidejs/splide-extension-auto-scroll": "^0.5.3",
|
|
39
39
|
"@storybook/web-components": "6.5.7",
|
|
40
40
|
"lit": "2.4.0"
|
|
41
41
|
},
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
require('lit');
|
|
7
|
-
var decorators = require('lit/decorators');
|
|
8
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
9
|
-
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
10
|
-
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
11
|
-
var global_constants = require('../../global_constants.js');
|
|
12
|
-
var relative_position_controller_constants = require('../../controllers/relative_position_controller/relative_position_controller_constants.js');
|
|
13
|
-
var throttle = require('../../../../../external/lodash/throttle.js');
|
|
14
|
-
var show_more_constants = require('./show_more_constants.js');
|
|
15
|
-
|
|
16
|
-
exports.HShowMore = class HShowMore extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this._$showMoreButton = null;
|
|
20
|
-
this._showMore = () => {
|
|
21
|
-
this._showAllItems();
|
|
22
|
-
this._hideButton();
|
|
23
|
-
this._focusNextItem();
|
|
24
|
-
};
|
|
25
|
-
this._onResize = throttle['default'](() => {
|
|
26
|
-
if (window.innerWidth > global_constants.BREAKPOINTS.xs) {
|
|
27
|
-
this._showAllItems();
|
|
28
|
-
this._hideButton();
|
|
29
|
-
window.removeEventListener('resize', this._onResize);
|
|
30
|
-
}
|
|
31
|
-
}, relative_position_controller_constants.DEFAULT_THROTTLE_WAIT_TIME);
|
|
32
|
-
}
|
|
33
|
-
connectedCallback() {
|
|
34
|
-
super.connectedCallback();
|
|
35
|
-
this._$showMoreButton = this.querySelector('h-show-more-button');
|
|
36
|
-
this._$items = [...this.querySelectorAll(this.selector)];
|
|
37
|
-
this.classList.add(show_more_constants.SHOW_MORE_CSS_CLASSES.showMore);
|
|
38
|
-
this._updateComponentVisibility();
|
|
39
|
-
this._setupListeners();
|
|
40
|
-
}
|
|
41
|
-
updated(_changedProperties) {
|
|
42
|
-
super.updated(_changedProperties);
|
|
43
|
-
if (_changedProperties.has('showAll')) {
|
|
44
|
-
this._showAllItems();
|
|
45
|
-
this._hideButton();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
disconnectedCallback() {
|
|
49
|
-
super.disconnectedCallback();
|
|
50
|
-
window.removeEventListener('resize', this._onResize);
|
|
51
|
-
}
|
|
52
|
-
_updateComponentVisibility() {
|
|
53
|
-
const hasOverflowItems = this._$items.length > this.count;
|
|
54
|
-
const isMobileView = window.innerWidth <= global_constants.BREAKPOINTS.xs;
|
|
55
|
-
const shouldBeActive = (!this.mobileOnly || isMobileView) && hasOverflowItems;
|
|
56
|
-
if (shouldBeActive) {
|
|
57
|
-
this._hideExcessItems();
|
|
58
|
-
this._showButton();
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this._hideButton();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
_hideExcessItems() {
|
|
65
|
-
this._$items.forEach(($item, index) => {
|
|
66
|
-
$item.removeAttribute('hidden');
|
|
67
|
-
if (index >= this.count)
|
|
68
|
-
$item.setAttribute('hidden', '');
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
_showAllItems() {
|
|
72
|
-
this._$items.forEach(($item) => $item.removeAttribute('hidden'));
|
|
73
|
-
}
|
|
74
|
-
_hideButton() {
|
|
75
|
-
var _a;
|
|
76
|
-
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
77
|
-
}
|
|
78
|
-
_showButton() {
|
|
79
|
-
var _a;
|
|
80
|
-
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.removeAttribute('hidden');
|
|
81
|
-
}
|
|
82
|
-
_setupListeners() {
|
|
83
|
-
this.addEventListener(show_more_constants.SHOW_MORE_EVENT_NAMES.showMore, this._showMore);
|
|
84
|
-
if (this.mobileOnly && window.innerWidth <= global_constants.BREAKPOINTS.xs) {
|
|
85
|
-
window.addEventListener('resize', this._onResize);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
_focusNextItem() {
|
|
89
|
-
const $nextItem = this._$items[this.count];
|
|
90
|
-
if (!$nextItem)
|
|
91
|
-
return;
|
|
92
|
-
const $firstFocusableElement = utilities.UiDomUtils.getFocusableElement($nextItem);
|
|
93
|
-
if ($firstFocusableElement) {
|
|
94
|
-
$firstFocusableElement.focus();
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (!$nextItem.getAttribute('tabindex'))
|
|
98
|
-
$nextItem.setAttribute('tabindex', '-1');
|
|
99
|
-
$nextItem.focus();
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
tslib_es6.__decorate([
|
|
103
|
-
decorators.property({ type: Number }),
|
|
104
|
-
tslib_es6.__metadata("design:type", Number)
|
|
105
|
-
], exports.HShowMore.prototype, "count", void 0);
|
|
106
|
-
tslib_es6.__decorate([
|
|
107
|
-
decorators.property({ type: String }),
|
|
108
|
-
tslib_es6.__metadata("design:type", String)
|
|
109
|
-
], exports.HShowMore.prototype, "selector", void 0);
|
|
110
|
-
tslib_es6.__decorate([
|
|
111
|
-
decorators.property({ type: Boolean, attribute: 'mobile-only' }),
|
|
112
|
-
tslib_es6.__metadata("design:type", Boolean)
|
|
113
|
-
], exports.HShowMore.prototype, "mobileOnly", void 0);
|
|
114
|
-
tslib_es6.__decorate([
|
|
115
|
-
decorators.property({ type: Boolean, attribute: 'show-all' }),
|
|
116
|
-
tslib_es6.__metadata("design:type", Boolean)
|
|
117
|
-
], exports.HShowMore.prototype, "showAll", void 0);
|
|
118
|
-
exports.HShowMore = tslib_es6.__decorate([
|
|
119
|
-
phoenix_custom_element.phoenixCustomElement('h-show-more')
|
|
120
|
-
], exports.HShowMore);
|
|
121
|
-
//# sourceMappingURL=show_more.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,uBAAuB,4CAAgD;AACvE;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
7
|
-
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
|
-
var btn_controller = require('../../controllers/btn_controller/btn_controller.js');
|
|
9
|
-
var show_more_constants = require('./show_more_constants.js');
|
|
10
|
-
|
|
11
|
-
exports.HShowMoreButton = class HShowMoreButton extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this._dispatchClickedEvent = () => {
|
|
15
|
-
this.emitCustomEvent(show_more_constants.SHOW_MORE_EVENT_NAMES.showMore);
|
|
16
|
-
};
|
|
17
|
-
this._btnController = new btn_controller.BtnController(this, this._dispatchClickedEvent);
|
|
18
|
-
}
|
|
19
|
-
connectedCallback() {
|
|
20
|
-
super.connectedCallback();
|
|
21
|
-
this.addEventListener('click', this._dispatchClickedEvent);
|
|
22
|
-
this.classList.add(show_more_constants.SHOW_MORE_CSS_CLASSES.showMoreButton);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
exports.HShowMoreButton = tslib_es6.__decorate([
|
|
26
|
-
phoenix_custom_element.phoenixCustomElement('h-show-more-button'),
|
|
27
|
-
tslib_es6.__metadata("design:paramtypes", [])
|
|
28
|
-
], exports.HShowMoreButton);
|
|
29
|
-
//# sourceMappingURL=show_more_button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const SHOW_MORE_CSS_CLASSES = {
|
|
6
|
-
showMore: 'show-more',
|
|
7
|
-
showMoreButton: 'show-more__button'
|
|
8
|
-
};
|
|
9
|
-
const SHOW_MORE_EVENT_NAMES = {
|
|
10
|
-
showMore: 'showMore'
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
exports.SHOW_MORE_CSS_CLASSES = SHOW_MORE_CSS_CLASSES;
|
|
14
|
-
exports.SHOW_MORE_EVENT_NAMES = SHOW_MORE_EVENT_NAMES;
|
|
15
|
-
//# sourceMappingURL=show_more_constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
-
import { PropertyValues } from 'lit';
|
|
3
|
-
export declare class HShowMore extends PhoenixLightLitElement {
|
|
4
|
-
count: number;
|
|
5
|
-
selector: string;
|
|
6
|
-
mobileOnly: boolean;
|
|
7
|
-
showAll: boolean;
|
|
8
|
-
private _$showMoreButton;
|
|
9
|
-
private _$items;
|
|
10
|
-
connectedCallback(): void;
|
|
11
|
-
protected updated(_changedProperties: PropertyValues): void;
|
|
12
|
-
disconnectedCallback(): void;
|
|
13
|
-
private _updateComponentVisibility;
|
|
14
|
-
private _hideExcessItems;
|
|
15
|
-
private _showAllItems;
|
|
16
|
-
private _hideButton;
|
|
17
|
-
private _showButton;
|
|
18
|
-
private _setupListeners;
|
|
19
|
-
private _showMore;
|
|
20
|
-
private _focusNextItem;
|
|
21
|
-
private _onResize;
|
|
22
|
-
}
|