@shoper/phoenix_design_system 1.17.2 → 1.17.3-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/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +8 -6
- 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 +1 -3
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_control.js +6 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/show-more/show_more.js +109 -0
- package/build/cjs/packages/phoenix/src/components/show-more/show_more.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js +29 -0
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_button.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js +15 -0
- package/build/cjs/packages/phoenix/src/components/show-more/show_more_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/index.js +14 -7
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +9 -7
- 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 +0 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +2 -3
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.js +6 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/show-more/show_more.d.ts +19 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more.js +107 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.d.ts +7 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js +27 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_button.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.d.ts +7 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js +10 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/index.d.ts +2 -1
- package/build/esm/packages/phoenix/src/index.js +2 -1
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +4 -4
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more.js +0 -37
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more.js.map +0 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js +0 -8
- package/build/cjs/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.d.ts +0 -9
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.js +0 -35
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js +0 -4
- package/build/esm/packages/phoenix/src/components/color_swatches/show-more/show_more_constants.js.map +0 -1
|
@@ -154,7 +154,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
154
154
|
return;
|
|
155
155
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild, index) => {
|
|
156
156
|
if (index > numberOfVisibleColors - 1) {
|
|
157
|
-
$colorSwatchesChild.setAttribute(
|
|
157
|
+
$colorSwatchesChild.setAttribute('hidden', '');
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -164,9 +164,9 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
164
164
|
if (!this._$colorSwatchesChildren)
|
|
165
165
|
return;
|
|
166
166
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild) => {
|
|
167
|
-
$colorSwatchesChild.removeAttribute(
|
|
167
|
+
$colorSwatchesChild.removeAttribute('hidden');
|
|
168
168
|
});
|
|
169
|
-
(_a = this.querySelector('h-
|
|
169
|
+
(_a = this.querySelector('h-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
_handleChangeToNextColorItem({ target }) {
|
|
@@ -232,10 +232,12 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
232
232
|
}
|
|
233
233
|
render() {
|
|
234
234
|
return lit.html `
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
<h-show-more count="15" selector="h-color-item">
|
|
236
|
+
${this.getSlot('default')}
|
|
237
|
+
${this._$colors.length > this.numberOfVisibleColors
|
|
238
|
+
? lit.html `<h-show-more-button>${this.showMoreBtnText}</h-show-more-button>`
|
|
238
239
|
: lit.nothing}
|
|
240
|
+
</h-show-more>
|
|
239
241
|
`;
|
|
240
242
|
}
|
|
241
243
|
};
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -12,11 +12,9 @@ const COLOR_SWATCHES_EVENT_NAMES = {
|
|
|
12
12
|
change: 'change',
|
|
13
13
|
markDisabledItems: 'markDisabledItems',
|
|
14
14
|
showMore: 'showMore'
|
|
15
|
-
};
|
|
16
|
-
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
15
|
+
};
|
|
17
16
|
|
|
18
17
|
exports.COLOR_ITEM_TAG_NAME = COLOR_ITEM_TAG_NAME;
|
|
19
18
|
exports.COLOR_SWATCHES_CSS_CLASSES = COLOR_SWATCHES_CSS_CLASSES;
|
|
20
19
|
exports.COLOR_SWATCHES_EVENT_NAMES = COLOR_SWATCHES_EVENT_NAMES;
|
|
21
|
-
exports.COLOR_SWATCHES_HIDDEN_ATTRIBUTE = COLOR_SWATCHES_HIDDEN_ATTRIBUTE;
|
|
22
20
|
//# sourceMappingURL=color_swatches_constants.js.map
|
package/build/cjs/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;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;"}
|
|
@@ -41,11 +41,12 @@ exports.HRadioControl = class HRadioControl extends phoenix_light_lit_element.Ph
|
|
|
41
41
|
?readonly="${this.readonly}"
|
|
42
42
|
?hidden="${this.hidden}"
|
|
43
43
|
.checked="${this.checked}"
|
|
44
|
+
aria-label="${ifDefined_js.ifDefined(this.ariaLabel)}"
|
|
44
45
|
aria-describedby="${ifDefined_js.ifDefined(this.ariaDescribedby)}"
|
|
45
46
|
@change="${this._handleChangeEvent}"
|
|
46
47
|
/>
|
|
47
48
|
|
|
48
|
-
<label class="${radio_constants.RADIO_CONTROL_CSS_CLASSES.radioLabel}" for="${ifDefined_js.ifDefined(this.controlId)}"></label>
|
|
49
|
+
<label class="${radio_constants.RADIO_CONTROL_CSS_CLASSES.radioLabel}" for="${ifDefined_js.ifDefined(this.controlId)}" aria-hidden="true"></label>
|
|
49
50
|
`;
|
|
50
51
|
}
|
|
51
52
|
};
|
|
@@ -81,6 +82,10 @@ tslib_es6.__decorate([
|
|
|
81
82
|
decorators.property({ type: String }),
|
|
82
83
|
tslib_es6.__metadata("design:type", String)
|
|
83
84
|
], exports.HRadioControl.prototype, "value", void 0);
|
|
85
|
+
tslib_es6.__decorate([
|
|
86
|
+
decorators.property({ type: String, attribute: 'aria-label' }),
|
|
87
|
+
tslib_es6.__metadata("design:type", String)
|
|
88
|
+
], exports.HRadioControl.prototype, "ariaLabel", void 0);
|
|
84
89
|
tslib_es6.__decorate([
|
|
85
90
|
decorators.property({ type: String, attribute: 'aria-describedby' }),
|
|
86
91
|
tslib_es6.__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var decorators = require('lit/decorators');
|
|
7
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
8
|
+
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
10
|
+
var global_constants = require('../../global_constants.js');
|
|
11
|
+
var relative_position_controller_constants = require('../../controllers/relative_position_controller/relative_position_controller_constants.js');
|
|
12
|
+
var throttle = require('../../../../../external/lodash/throttle.js');
|
|
13
|
+
var show_more_constants = require('./show_more_constants.js');
|
|
14
|
+
|
|
15
|
+
exports.HShowMore = class HShowMore extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._$showMoreButton = null;
|
|
19
|
+
this._showMore = () => {
|
|
20
|
+
this._showAllItems();
|
|
21
|
+
this._hideButton();
|
|
22
|
+
this._focusNextItem();
|
|
23
|
+
};
|
|
24
|
+
this._onResize = throttle['default'](() => {
|
|
25
|
+
if (window.innerWidth > global_constants.BREAKPOINTS.xs) {
|
|
26
|
+
this._showAllItems();
|
|
27
|
+
this._hideButton();
|
|
28
|
+
window.removeEventListener('resize', this._onResize);
|
|
29
|
+
}
|
|
30
|
+
}, relative_position_controller_constants.DEFAULT_THROTTLE_WAIT_TIME);
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this._$showMoreButton = this.querySelector('h-show-more-button');
|
|
35
|
+
this._$items = [...this.querySelectorAll(this.selector)];
|
|
36
|
+
this.classList.add(show_more_constants.SHOW_MORE_CSS_CLASSES.showMore);
|
|
37
|
+
this._updateComponentVisibility();
|
|
38
|
+
this._setupListeners();
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
super.disconnectedCallback();
|
|
42
|
+
window.removeEventListener('resize', this._onResize);
|
|
43
|
+
}
|
|
44
|
+
_updateComponentVisibility() {
|
|
45
|
+
const hasOverflowItems = this._$items.length > this.count;
|
|
46
|
+
const isMobileView = window.innerWidth <= global_constants.BREAKPOINTS.xs;
|
|
47
|
+
const shouldBeActive = (!this.mobileOnly || isMobileView) && hasOverflowItems;
|
|
48
|
+
if (shouldBeActive) {
|
|
49
|
+
this._hideExcessItems();
|
|
50
|
+
this._showButton();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this._hideButton();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_hideExcessItems() {
|
|
57
|
+
this._$items.forEach(($item, index) => {
|
|
58
|
+
$item.removeAttribute('hidden');
|
|
59
|
+
if (index >= this.count)
|
|
60
|
+
$item.setAttribute('hidden', '');
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
_showAllItems() {
|
|
64
|
+
this._$items.forEach(($item) => $item.removeAttribute('hidden'));
|
|
65
|
+
}
|
|
66
|
+
_hideButton() {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
69
|
+
}
|
|
70
|
+
_showButton() {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
73
|
+
}
|
|
74
|
+
_setupListeners() {
|
|
75
|
+
this.addEventListener(show_more_constants.SHOW_MORE_EVENT_NAMES.showMore, this._showMore);
|
|
76
|
+
if (this.mobileOnly && window.innerWidth <= global_constants.BREAKPOINTS.xs) {
|
|
77
|
+
window.addEventListener('resize', this._onResize);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_focusNextItem() {
|
|
81
|
+
const $nextItem = this._$items[this.count];
|
|
82
|
+
if (!$nextItem)
|
|
83
|
+
return;
|
|
84
|
+
const $firstFocusableElement = utilities.UiDomUtils.getFocusableElement($nextItem);
|
|
85
|
+
if ($firstFocusableElement) {
|
|
86
|
+
$firstFocusableElement.focus();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (!$nextItem.getAttribute('tabindex'))
|
|
90
|
+
$nextItem.setAttribute('tabindex', '-1');
|
|
91
|
+
$nextItem.focus();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
tslib_es6.__decorate([
|
|
95
|
+
decorators.property({ type: Number }),
|
|
96
|
+
tslib_es6.__metadata("design:type", Number)
|
|
97
|
+
], exports.HShowMore.prototype, "count", void 0);
|
|
98
|
+
tslib_es6.__decorate([
|
|
99
|
+
decorators.property({ type: String }),
|
|
100
|
+
tslib_es6.__metadata("design:type", String)
|
|
101
|
+
], exports.HShowMore.prototype, "selector", void 0);
|
|
102
|
+
tslib_es6.__decorate([
|
|
103
|
+
decorators.property({ type: Boolean, attribute: 'mobile-only' }),
|
|
104
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
105
|
+
], exports.HShowMore.prototype, "mobileOnly", void 0);
|
|
106
|
+
exports.HShowMore = tslib_es6.__decorate([
|
|
107
|
+
phoenix_custom_element.phoenixCustomElement('h-show-more')
|
|
108
|
+
], exports.HShowMore);
|
|
109
|
+
//# sourceMappingURL=show_more.js.map
|
|
@@ -0,0 +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,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;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +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;"}
|
|
@@ -86,7 +86,6 @@ var color_swatches_control_constants = require('./components/form/color_swatches
|
|
|
86
86
|
var color_swatches = require('./components/color_swatches/color_swatches.js');
|
|
87
87
|
var color_item = require('./components/color_swatches/color_item/color_item.js');
|
|
88
88
|
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
89
|
-
var show_more = require('./components/color_swatches/show-more/show_more.js');
|
|
90
89
|
var visibility_controller = require('./controllers/visibility_controller/visibility_controller.js');
|
|
91
90
|
var slider = require('./components/slider/slider.js');
|
|
92
91
|
var scroller = require('./components/scroller/scroller.js');
|
|
@@ -126,6 +125,8 @@ var toggle = require('./components/toggle/toggle.js');
|
|
|
126
125
|
var toggle_button$1 = require('./components/toggle/toggle_button.js');
|
|
127
126
|
var navigator_share = require('./components/navigator/navigator_share/navigator_share.js');
|
|
128
127
|
var navigator_controller = require('./components/navigator/navigator_controller/navigator_controller.js');
|
|
128
|
+
var show_more_button = require('./components/show-more/show_more_button.js');
|
|
129
|
+
var show_more = require('./components/show-more/show_more.js');
|
|
129
130
|
|
|
130
131
|
|
|
131
132
|
|
|
@@ -528,12 +529,6 @@ Object.defineProperty(exports, 'HColorSwatchesControl', {
|
|
|
528
529
|
return color_swatches_control.HColorSwatchesControl;
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
|
-
Object.defineProperty(exports, 'HColorSwatchesShowMore', {
|
|
532
|
-
enumerable: true,
|
|
533
|
-
get: function () {
|
|
534
|
-
return show_more.HColorSwatchesShowMore;
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
532
|
exports.VisibilityController = visibility_controller.VisibilityController;
|
|
538
533
|
Object.defineProperty(exports, 'HSlider', {
|
|
539
534
|
enumerable: true,
|
|
@@ -755,4 +750,16 @@ Object.defineProperty(exports, 'NavigatorController', {
|
|
|
755
750
|
return navigator_controller.NavigatorController;
|
|
756
751
|
}
|
|
757
752
|
});
|
|
753
|
+
Object.defineProperty(exports, 'HShowMoreButton', {
|
|
754
|
+
enumerable: true,
|
|
755
|
+
get: function () {
|
|
756
|
+
return show_more_button.HShowMoreButton;
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
Object.defineProperty(exports, 'HShowMore', {
|
|
760
|
+
enumerable: true,
|
|
761
|
+
get: function () {
|
|
762
|
+
return show_more.HShowMore;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
758
765
|
//# 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,7 +6,7 @@ import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/pho
|
|
|
6
6
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
7
7
|
import { KeystrokesController } from '../../controllers/keystrokes_controller/keystrokes_controller.js';
|
|
8
8
|
import 'lit-html';
|
|
9
|
-
import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES
|
|
9
|
+
import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES } from './color_swatches_constants.js';
|
|
10
10
|
import { COLOR_ITEM_SELECTED_ATTRIBUTE } from './color_item/color_item_constants.js';
|
|
11
11
|
|
|
12
12
|
let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
@@ -150,7 +150,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
150
150
|
return;
|
|
151
151
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild, index) => {
|
|
152
152
|
if (index > numberOfVisibleColors - 1) {
|
|
153
|
-
$colorSwatchesChild.setAttribute(
|
|
153
|
+
$colorSwatchesChild.setAttribute('hidden', '');
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
@@ -160,9 +160,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
160
160
|
if (!this._$colorSwatchesChildren)
|
|
161
161
|
return;
|
|
162
162
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild) => {
|
|
163
|
-
$colorSwatchesChild.removeAttribute(
|
|
163
|
+
$colorSwatchesChild.removeAttribute('hidden');
|
|
164
164
|
});
|
|
165
|
-
(_a = this.querySelector('h-
|
|
165
|
+
(_a = this.querySelector('h-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
_handleChangeToNextColorItem({ target }) {
|
|
@@ -228,10 +228,12 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
230
|
return html `
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
<h-show-more count="15" selector="h-color-item">
|
|
232
|
+
${this.getSlot('default')}
|
|
233
|
+
${this._$colors.length > this.numberOfVisibleColors
|
|
234
|
+
? html `<h-show-more-button>${this.showMoreBtnText}</h-show-more-button>`
|
|
234
235
|
: nothing}
|
|
236
|
+
</h-show-more>
|
|
235
237
|
`;
|
|
236
238
|
}
|
|
237
239
|
};
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/color_swatches_constants.js
CHANGED
|
@@ -8,8 +8,7 @@ const COLOR_SWATCHES_EVENT_NAMES = {
|
|
|
8
8
|
change: 'change',
|
|
9
9
|
markDisabledItems: 'markDisabledItems',
|
|
10
10
|
showMore: 'showMore'
|
|
11
|
-
};
|
|
12
|
-
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
11
|
+
};
|
|
13
12
|
|
|
14
|
-
export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES
|
|
13
|
+
export { COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_EVENT_NAMES };
|
|
15
14
|
//# 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;"}
|
|
@@ -37,11 +37,12 @@ let HRadioControl = class HRadioControl extends PhoenixLightLitElement {
|
|
|
37
37
|
?readonly="${this.readonly}"
|
|
38
38
|
?hidden="${this.hidden}"
|
|
39
39
|
.checked="${this.checked}"
|
|
40
|
+
aria-label="${ifDefined(this.ariaLabel)}"
|
|
40
41
|
aria-describedby="${ifDefined(this.ariaDescribedby)}"
|
|
41
42
|
@change="${this._handleChangeEvent}"
|
|
42
43
|
/>
|
|
43
44
|
|
|
44
|
-
<label class="${RADIO_CONTROL_CSS_CLASSES.radioLabel}" for="${ifDefined(this.controlId)}"></label>
|
|
45
|
+
<label class="${RADIO_CONTROL_CSS_CLASSES.radioLabel}" for="${ifDefined(this.controlId)}" aria-hidden="true"></label>
|
|
45
46
|
`;
|
|
46
47
|
}
|
|
47
48
|
};
|
|
@@ -77,6 +78,10 @@ __decorate([
|
|
|
77
78
|
property({ type: String }),
|
|
78
79
|
__metadata("design:type", String)
|
|
79
80
|
], HRadioControl.prototype, "value", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
property({ type: String, attribute: 'aria-label' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], HRadioControl.prototype, "ariaLabel", void 0);
|
|
80
85
|
__decorate([
|
|
81
86
|
property({ type: String, attribute: 'aria-describedby' }),
|
|
82
87
|
__metadata("design:type", String)
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,19 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HShowMore extends PhoenixLightLitElement {
|
|
3
|
+
count: number;
|
|
4
|
+
selector: string;
|
|
5
|
+
mobileOnly: boolean;
|
|
6
|
+
private _$showMoreButton;
|
|
7
|
+
private _$items;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
private _updateComponentVisibility;
|
|
11
|
+
private _hideExcessItems;
|
|
12
|
+
private _showAllItems;
|
|
13
|
+
private _hideButton;
|
|
14
|
+
private _showButton;
|
|
15
|
+
private _setupListeners;
|
|
16
|
+
private _showMore;
|
|
17
|
+
private _focusNextItem;
|
|
18
|
+
private _onResize;
|
|
19
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { property } from 'lit/decorators';
|
|
3
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import { BREAKPOINTS } from '../../global_constants.js';
|
|
7
|
+
import { DEFAULT_THROTTLE_WAIT_TIME } from '../../controllers/relative_position_controller/relative_position_controller_constants.js';
|
|
8
|
+
import throttle_1 from '../../../../../external/lodash/throttle.js';
|
|
9
|
+
import { SHOW_MORE_CSS_CLASSES, SHOW_MORE_EVENT_NAMES } from './show_more_constants.js';
|
|
10
|
+
|
|
11
|
+
let HShowMore = class HShowMore extends PhoenixLightLitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this._$showMoreButton = null;
|
|
15
|
+
this._showMore = () => {
|
|
16
|
+
this._showAllItems();
|
|
17
|
+
this._hideButton();
|
|
18
|
+
this._focusNextItem();
|
|
19
|
+
};
|
|
20
|
+
this._onResize = throttle_1(() => {
|
|
21
|
+
if (window.innerWidth > BREAKPOINTS.xs) {
|
|
22
|
+
this._showAllItems();
|
|
23
|
+
this._hideButton();
|
|
24
|
+
window.removeEventListener('resize', this._onResize);
|
|
25
|
+
}
|
|
26
|
+
}, DEFAULT_THROTTLE_WAIT_TIME);
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
this._$showMoreButton = this.querySelector('h-show-more-button');
|
|
31
|
+
this._$items = [...this.querySelectorAll(this.selector)];
|
|
32
|
+
this.classList.add(SHOW_MORE_CSS_CLASSES.showMore);
|
|
33
|
+
this._updateComponentVisibility();
|
|
34
|
+
this._setupListeners();
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
super.disconnectedCallback();
|
|
38
|
+
window.removeEventListener('resize', this._onResize);
|
|
39
|
+
}
|
|
40
|
+
_updateComponentVisibility() {
|
|
41
|
+
const hasOverflowItems = this._$items.length > this.count;
|
|
42
|
+
const isMobileView = window.innerWidth <= BREAKPOINTS.xs;
|
|
43
|
+
const shouldBeActive = (!this.mobileOnly || isMobileView) && hasOverflowItems;
|
|
44
|
+
if (shouldBeActive) {
|
|
45
|
+
this._hideExcessItems();
|
|
46
|
+
this._showButton();
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this._hideButton();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
_hideExcessItems() {
|
|
53
|
+
this._$items.forEach(($item, index) => {
|
|
54
|
+
$item.removeAttribute('hidden');
|
|
55
|
+
if (index >= this.count)
|
|
56
|
+
$item.setAttribute('hidden', '');
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
_showAllItems() {
|
|
60
|
+
this._$items.forEach(($item) => $item.removeAttribute('hidden'));
|
|
61
|
+
}
|
|
62
|
+
_hideButton() {
|
|
63
|
+
var _a;
|
|
64
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
65
|
+
}
|
|
66
|
+
_showButton() {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
69
|
+
}
|
|
70
|
+
_setupListeners() {
|
|
71
|
+
this.addEventListener(SHOW_MORE_EVENT_NAMES.showMore, this._showMore);
|
|
72
|
+
if (this.mobileOnly && window.innerWidth <= BREAKPOINTS.xs) {
|
|
73
|
+
window.addEventListener('resize', this._onResize);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
_focusNextItem() {
|
|
77
|
+
const $nextItem = this._$items[this.count];
|
|
78
|
+
if (!$nextItem)
|
|
79
|
+
return;
|
|
80
|
+
const $firstFocusableElement = UiDomUtils.getFocusableElement($nextItem);
|
|
81
|
+
if ($firstFocusableElement) {
|
|
82
|
+
$firstFocusableElement.focus();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (!$nextItem.getAttribute('tabindex'))
|
|
86
|
+
$nextItem.setAttribute('tabindex', '-1');
|
|
87
|
+
$nextItem.focus();
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
__decorate([
|
|
91
|
+
property({ type: Number }),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], HShowMore.prototype, "count", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: String }),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], HShowMore.prototype, "selector", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
property({ type: Boolean, attribute: 'mobile-only' }),
|
|
100
|
+
__metadata("design:type", Boolean)
|
|
101
|
+
], HShowMore.prototype, "mobileOnly", void 0);
|
|
102
|
+
HShowMore = __decorate([
|
|
103
|
+
phoenixCustomElement('h-show-more')
|
|
104
|
+
], HShowMore);
|
|
105
|
+
|
|
106
|
+
export { HShowMore };
|
|
107
|
+
//# sourceMappingURL=show_more.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;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;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HShowMoreButton extends PhoenixLightLitElement {
|
|
3
|
+
private _btnController;
|
|
4
|
+
constructor();
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
private _dispatchClickedEvent;
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { SHOW_MORE_EVENT_NAMES, SHOW_MORE_CSS_CLASSES } from './show_more_constants.js';
|
|
6
|
+
|
|
7
|
+
let HShowMoreButton = class HShowMoreButton extends PhoenixLightLitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this._dispatchClickedEvent = () => {
|
|
11
|
+
this.emitCustomEvent(SHOW_MORE_EVENT_NAMES.showMore);
|
|
12
|
+
};
|
|
13
|
+
this._btnController = new BtnController(this, this._dispatchClickedEvent);
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
super.connectedCallback();
|
|
17
|
+
this.addEventListener('click', this._dispatchClickedEvent);
|
|
18
|
+
this.classList.add(SHOW_MORE_CSS_CLASSES.showMoreButton);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
HShowMoreButton = __decorate([
|
|
22
|
+
phoenixCustomElement('h-show-more-button'),
|
|
23
|
+
__metadata("design:paramtypes", [])
|
|
24
|
+
], HShowMoreButton);
|
|
25
|
+
|
|
26
|
+
export { HShowMoreButton };
|
|
27
|
+
//# sourceMappingURL=show_more_button.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const SHOW_MORE_CSS_CLASSES = {
|
|
2
|
+
showMore: 'show-more',
|
|
3
|
+
showMoreButton: 'show-more__button'
|
|
4
|
+
};
|
|
5
|
+
const SHOW_MORE_EVENT_NAMES = {
|
|
6
|
+
showMore: 'showMore'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { SHOW_MORE_CSS_CLASSES, SHOW_MORE_EVENT_NAMES };
|
|
10
|
+
//# sourceMappingURL=show_more_constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -91,7 +91,6 @@ 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';
|
|
95
94
|
export { TColorSwatchesControlChangeEventDetail } from "./components/color_swatches/color_swatches_types";
|
|
96
95
|
export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from "./components/form/color_swatches_control/color_swatches_control_constants";
|
|
97
96
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller';
|
|
@@ -140,4 +139,6 @@ export * from './components/toggle/toggle_types';
|
|
|
140
139
|
export * from './components/toggle/toggle_constants';
|
|
141
140
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share';
|
|
142
141
|
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';
|
|
143
144
|
export { phoenixCustomElement } from './core/decorators/phoenix_custom_element';
|
|
@@ -82,7 +82,6 @@ export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from './components/form/color_swat
|
|
|
82
82
|
export { HColorSwatches } from './components/color_swatches/color_swatches.js';
|
|
83
83
|
export { HColorItem } from './components/color_swatches/color_item/color_item.js';
|
|
84
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
85
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller.js';
|
|
87
86
|
export { HSlider } from './components/slider/slider.js';
|
|
88
87
|
export { HScroller } from './components/scroller/scroller.js';
|
|
@@ -122,4 +121,6 @@ export { HToggle } from './components/toggle/toggle.js';
|
|
|
122
121
|
export { HToggleBtn } from './components/toggle/toggle_button.js';
|
|
123
122
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share.js';
|
|
124
123
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller.js';
|
|
124
|
+
export { HShowMoreButton } from './components/show-more/show_more_button.js';
|
|
125
|
+
export { HShowMore } from './components/show-more/show_more.js';
|
|
125
126
|
//# 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;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.
|
|
5
|
+
"version": "1.17.3-1",
|
|
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": "
|
|
31
|
-
"@splidejs/splide-extension-auto-scroll": "
|
|
30
|
+
"@splidejs/splide": "4.0.7",
|
|
31
|
+
"@splidejs/splide-extension-auto-scroll": "0.5.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@dreamcommerce/utilities": "^1.20.1-0",
|
|
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": "
|
|
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,37 +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 color_swatches_constants = require('../color_swatches_constants.js');
|
|
10
|
-
var show_more_constants = require('./show_more_constants.js');
|
|
11
|
-
|
|
12
|
-
exports.HColorSwatchesShowMore = class HColorSwatchesShowMore extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this._dispatchClickedEvent = () => {
|
|
16
|
-
this.emitCustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.showMore);
|
|
17
|
-
};
|
|
18
|
-
this._btnController = new btn_controller.BtnController(this, this._dispatchClickedEvent);
|
|
19
|
-
}
|
|
20
|
-
connectedCallback() {
|
|
21
|
-
super.connectedCallback();
|
|
22
|
-
this.setupEvents();
|
|
23
|
-
this._addCssClasses();
|
|
24
|
-
this.classList.add(show_more_constants.SHOW_MORE_CSS_CLASS);
|
|
25
|
-
}
|
|
26
|
-
_addCssClasses() {
|
|
27
|
-
this.classList.add(show_more_constants.SHOW_MORE_CSS_CLASS);
|
|
28
|
-
}
|
|
29
|
-
setupEvents() {
|
|
30
|
-
this.addEventListener('click', this._dispatchClickedEvent);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.HColorSwatchesShowMore = tslib_es6.__decorate([
|
|
34
|
-
phoenix_custom_element.phoenixCustomElement('h-color-swatches-show-more'),
|
|
35
|
-
tslib_es6.__metadata("design:paramtypes", [])
|
|
36
|
-
], exports.HColorSwatchesShowMore);
|
|
37
|
-
//# 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,+CAAmD;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SHOW_MORE_CSS_CLASS = "color-swatches-show-more";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;"}
|