@shoper/phoenix_design_system 1.17.8 → 1.17.10
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 +27 -13
- 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/textarea/textarea_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/show-more/show_more.js +117 -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 +17 -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 -0
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +2 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +28 -14
- 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/textarea/textarea_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/show-more/show_more.d.ts +21 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more.js +115 -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 +8 -0
- package/build/esm/packages/phoenix/src/components/show-more/show_more_constants.js +11 -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 -0
- package/build/esm/packages/phoenix/src/index.js +2 -0
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -12,11 +12,13 @@ var keystrokes_controller = require('../../controllers/keystrokes_controller/key
|
|
|
12
12
|
require('lit-html');
|
|
13
13
|
var color_swatches_constants = require('./color_swatches_constants.js');
|
|
14
14
|
var color_item_constants = require('./color_item/color_item_constants.js');
|
|
15
|
+
var color_item = require('./color_item/color_item.js');
|
|
15
16
|
|
|
16
17
|
exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
19
20
|
this.multiple = false;
|
|
21
|
+
this.devVisualSubcategories = false;
|
|
20
22
|
this.selectedColors = [];
|
|
21
23
|
this.showMoreBtnText = 'Pokaż wszystkie kolory';
|
|
22
24
|
this._setupEvents = () => {
|
|
@@ -140,8 +142,10 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
140
142
|
this._$colorSwatchesChildren = [...this.children];
|
|
141
143
|
this._setupEvents();
|
|
142
144
|
this._addCssClasses();
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
if (!this.devVisualSubcategories) {
|
|
146
|
+
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
147
|
+
this._showAllItemsEvent();
|
|
148
|
+
}
|
|
145
149
|
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
146
150
|
this._$colors = [...this.querySelectorAll('h-color-item')];
|
|
147
151
|
}
|
|
@@ -154,7 +158,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
154
158
|
return;
|
|
155
159
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild, index) => {
|
|
156
160
|
if (index > numberOfVisibleColors - 1) {
|
|
157
|
-
$colorSwatchesChild.setAttribute(
|
|
161
|
+
$colorSwatchesChild.setAttribute('hidden', '');
|
|
158
162
|
}
|
|
159
163
|
});
|
|
160
164
|
}
|
|
@@ -164,9 +168,9 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
164
168
|
if (!this._$colorSwatchesChildren)
|
|
165
169
|
return;
|
|
166
170
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild) => {
|
|
167
|
-
$colorSwatchesChild.removeAttribute(
|
|
171
|
+
$colorSwatchesChild.removeAttribute('hidden');
|
|
168
172
|
});
|
|
169
|
-
(_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute(
|
|
173
|
+
(_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
170
174
|
});
|
|
171
175
|
}
|
|
172
176
|
_handleChangeToNextColorItem({ target }) {
|
|
@@ -180,7 +184,9 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
180
184
|
$nextColorItem = $nextFocusableElement;
|
|
181
185
|
}
|
|
182
186
|
$nextColorItem.focus();
|
|
183
|
-
|
|
187
|
+
if ($nextColorItem instanceof color_item.HColorItem) {
|
|
188
|
+
this._handleColorChange($nextColorItem);
|
|
189
|
+
}
|
|
184
190
|
}
|
|
185
191
|
_handleChangeToPreviousColorItem({ target }) {
|
|
186
192
|
const $colorItem = target;
|
|
@@ -193,7 +199,9 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
193
199
|
$previousColorItem = $previousFocusableElement;
|
|
194
200
|
}
|
|
195
201
|
$previousColorItem.focus();
|
|
196
|
-
|
|
202
|
+
if ($previousColorItem instanceof color_item.HColorItem) {
|
|
203
|
+
this._handleColorChange($previousColorItem);
|
|
204
|
+
}
|
|
197
205
|
}
|
|
198
206
|
_toggleColorItem($colorItem) {
|
|
199
207
|
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorChangeForSingleMode($colorItem);
|
|
@@ -231,18 +239,24 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
231
239
|
document.body.removeEventListener('keydown', this._focusOnSelectedColor);
|
|
232
240
|
}
|
|
233
241
|
render() {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
242
|
+
if (!this.devVisualSubcategories) {
|
|
243
|
+
return lit.html `
|
|
244
|
+
${this.getSlot('default')}
|
|
245
|
+
${this._$colors.length > this.numberOfVisibleColors
|
|
246
|
+
? lit.html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
|
|
247
|
+
: lit.nothing}
|
|
248
|
+
`;
|
|
249
|
+
}
|
|
240
250
|
}
|
|
241
251
|
};
|
|
242
252
|
tslib_es6.__decorate([
|
|
243
253
|
decorators.property({ type: Boolean }),
|
|
244
254
|
tslib_es6.__metadata("design:type", Boolean)
|
|
245
255
|
], exports.HColorSwatches.prototype, "multiple", void 0);
|
|
256
|
+
tslib_es6.__decorate([
|
|
257
|
+
decorators.property({ type: Boolean, attribute: 'dev-visual-subcategories' }),
|
|
258
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
259
|
+
], exports.HColorSwatches.prototype, "devVisualSubcategories", void 0);
|
|
246
260
|
tslib_es6.__decorate([
|
|
247
261
|
decorators.property({ type: Number, attribute: 'number-of-visible-colors' }),
|
|
248
262
|
tslib_es6.__metadata("design:type", Number)
|
|
@@ -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;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;"}
|
|
@@ -35,8 +35,8 @@ exports.HTextareaControl = class HTextareaControl extends phoenix_light_lit_elem
|
|
|
35
35
|
id="${ifDefined_js.ifDefined(this.controlId)}"
|
|
36
36
|
name="${ifDefined_js.ifDefined(this.controlName)}"
|
|
37
37
|
placeholder="${ifDefined_js.ifDefined(this.placeholder)}"
|
|
38
|
+
aria-required="${this.required ? 'true' : 'false'}"
|
|
38
39
|
?disabled="${this.disabled}"
|
|
39
|
-
?required="${this.required}"
|
|
40
40
|
?readonly="${this.readonly}"
|
|
41
41
|
?hidden="${this.hidden}"
|
|
42
42
|
@input="${this._handleInputEvent}"
|
|
@@ -0,0 +1,117 @@
|
|
|
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(`[${show_more_constants.SHOW_MORE_ITEM_ATTRIBUTE}]`)];
|
|
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: Boolean, attribute: 'mobile-only' }),
|
|
108
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
109
|
+
], exports.HShowMore.prototype, "mobileOnly", void 0);
|
|
110
|
+
tslib_es6.__decorate([
|
|
111
|
+
decorators.property({ type: Boolean, attribute: 'show-all' }),
|
|
112
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
113
|
+
], exports.HShowMore.prototype, "showAll", void 0);
|
|
114
|
+
exports.HShowMore = tslib_es6.__decorate([
|
|
115
|
+
phoenix_custom_element.phoenixCustomElement('h-show-more')
|
|
116
|
+
], exports.HShowMore);
|
|
117
|
+
//# 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;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;"}
|
|
@@ -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,17 @@
|
|
|
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
|
+
const SHOW_MORE_ITEM_ATTRIBUTE = 'show-more-item';
|
|
13
|
+
|
|
14
|
+
exports.SHOW_MORE_CSS_CLASSES = SHOW_MORE_CSS_CLASSES;
|
|
15
|
+
exports.SHOW_MORE_EVENT_NAMES = SHOW_MORE_EVENT_NAMES;
|
|
16
|
+
exports.SHOW_MORE_ITEM_ATTRIBUTE = SHOW_MORE_ITEM_ATTRIBUTE;
|
|
17
|
+
//# 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;AACA;AACA;"}
|
|
@@ -83,6 +83,7 @@ var toggle_button = require('./components/groups/toggle_button_group/toggle_butt
|
|
|
83
83
|
var click_outside_controller_messages = require('./controllers/click_outside_controller/click_outside_controller_messages.js');
|
|
84
84
|
var backdrop = require('./components/backdrop/backdrop.js');
|
|
85
85
|
var color_swatches_control_constants = require('./components/form/color_swatches_control/color_swatches_control_constants.js');
|
|
86
|
+
var show_more_button = require('./components/show-more/show_more_button.js');
|
|
86
87
|
var color_swatches = require('./components/color_swatches/color_swatches.js');
|
|
87
88
|
var color_item = require('./components/color_swatches/color_item/color_item.js');
|
|
88
89
|
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
@@ -126,6 +127,7 @@ var toggle = require('./components/toggle/toggle.js');
|
|
|
126
127
|
var toggle_button$1 = require('./components/toggle/toggle_button.js');
|
|
127
128
|
var navigator_share = require('./components/navigator/navigator_share/navigator_share.js');
|
|
128
129
|
var navigator_controller = require('./components/navigator/navigator_controller/navigator_controller.js');
|
|
130
|
+
var show_more$1 = require('./components/show-more/show_more.js');
|
|
129
131
|
|
|
130
132
|
|
|
131
133
|
|
|
@@ -510,6 +512,12 @@ Object.defineProperty(exports, 'HBackdrop', {
|
|
|
510
512
|
}
|
|
511
513
|
});
|
|
512
514
|
exports.COLOR_SWATCHES_CONTROL_EVENT_NAMES = color_swatches_control_constants.COLOR_SWATCHES_CONTROL_EVENT_NAMES;
|
|
515
|
+
Object.defineProperty(exports, 'HShowMoreButton', {
|
|
516
|
+
enumerable: true,
|
|
517
|
+
get: function () {
|
|
518
|
+
return show_more_button.HShowMoreButton;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
513
521
|
Object.defineProperty(exports, 'HColorSwatches', {
|
|
514
522
|
enumerable: true,
|
|
515
523
|
get: function () {
|
|
@@ -755,4 +763,10 @@ Object.defineProperty(exports, 'NavigatorController', {
|
|
|
755
763
|
return navigator_controller.NavigatorController;
|
|
756
764
|
}
|
|
757
765
|
});
|
|
766
|
+
Object.defineProperty(exports, 'HShowMore', {
|
|
767
|
+
enumerable: true,
|
|
768
|
+
get: function () {
|
|
769
|
+
return show_more$1.HShowMore;
|
|
770
|
+
}
|
|
771
|
+
});
|
|
758
772
|
//# 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,6 +3,7 @@ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/pho
|
|
|
3
3
|
import { TemplateResult } from 'lit-html';
|
|
4
4
|
export declare class HColorSwatches extends PhoenixLightLitElement {
|
|
5
5
|
multiple: boolean;
|
|
6
|
+
devVisualSubcategories: boolean;
|
|
6
7
|
numberOfVisibleColors: number;
|
|
7
8
|
selectedColors: HColorItem[];
|
|
8
9
|
showMoreBtnText: string;
|
|
@@ -33,5 +34,5 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
|
|
|
33
34
|
private _removeExistingColorFromArray;
|
|
34
35
|
private _dispatchColorChangeEvent;
|
|
35
36
|
disconnectedCallback(): void;
|
|
36
|
-
protected render(): TemplateResult;
|
|
37
|
+
protected render(): TemplateResult | void;
|
|
37
38
|
}
|
|
@@ -6,13 +6,15 @@ 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
|
+
import { HColorItem } from './color_item/color_item.js';
|
|
11
12
|
|
|
12
13
|
let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
15
16
|
this.multiple = false;
|
|
17
|
+
this.devVisualSubcategories = false;
|
|
16
18
|
this.selectedColors = [];
|
|
17
19
|
this.showMoreBtnText = 'Pokaż wszystkie kolory';
|
|
18
20
|
this._setupEvents = () => {
|
|
@@ -136,8 +138,10 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
136
138
|
this._$colorSwatchesChildren = [...this.children];
|
|
137
139
|
this._setupEvents();
|
|
138
140
|
this._addCssClasses();
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
if (!this.devVisualSubcategories) {
|
|
142
|
+
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
143
|
+
this._showAllItemsEvent();
|
|
144
|
+
}
|
|
141
145
|
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
142
146
|
this._$colors = [...this.querySelectorAll('h-color-item')];
|
|
143
147
|
}
|
|
@@ -150,7 +154,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
150
154
|
return;
|
|
151
155
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild, index) => {
|
|
152
156
|
if (index > numberOfVisibleColors - 1) {
|
|
153
|
-
$colorSwatchesChild.setAttribute(
|
|
157
|
+
$colorSwatchesChild.setAttribute('hidden', '');
|
|
154
158
|
}
|
|
155
159
|
});
|
|
156
160
|
}
|
|
@@ -160,9 +164,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
160
164
|
if (!this._$colorSwatchesChildren)
|
|
161
165
|
return;
|
|
162
166
|
this._$colorSwatchesChildren.forEach(($colorSwatchesChild) => {
|
|
163
|
-
$colorSwatchesChild.removeAttribute(
|
|
167
|
+
$colorSwatchesChild.removeAttribute('hidden');
|
|
164
168
|
});
|
|
165
|
-
(_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute(
|
|
169
|
+
(_a = this.querySelector('h-color-swatches-show-more')) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
166
170
|
});
|
|
167
171
|
}
|
|
168
172
|
_handleChangeToNextColorItem({ target }) {
|
|
@@ -176,7 +180,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
176
180
|
$nextColorItem = $nextFocusableElement;
|
|
177
181
|
}
|
|
178
182
|
$nextColorItem.focus();
|
|
179
|
-
|
|
183
|
+
if ($nextColorItem instanceof HColorItem) {
|
|
184
|
+
this._handleColorChange($nextColorItem);
|
|
185
|
+
}
|
|
180
186
|
}
|
|
181
187
|
_handleChangeToPreviousColorItem({ target }) {
|
|
182
188
|
const $colorItem = target;
|
|
@@ -189,7 +195,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
189
195
|
$previousColorItem = $previousFocusableElement;
|
|
190
196
|
}
|
|
191
197
|
$previousColorItem.focus();
|
|
192
|
-
|
|
198
|
+
if ($previousColorItem instanceof HColorItem) {
|
|
199
|
+
this._handleColorChange($previousColorItem);
|
|
200
|
+
}
|
|
193
201
|
}
|
|
194
202
|
_toggleColorItem($colorItem) {
|
|
195
203
|
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorChangeForSingleMode($colorItem);
|
|
@@ -227,18 +235,24 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
227
235
|
document.body.removeEventListener('keydown', this._focusOnSelectedColor);
|
|
228
236
|
}
|
|
229
237
|
render() {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
if (!this.devVisualSubcategories) {
|
|
239
|
+
return html `
|
|
240
|
+
${this.getSlot('default')}
|
|
241
|
+
${this._$colors.length > this.numberOfVisibleColors
|
|
242
|
+
? html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
|
|
243
|
+
: nothing}
|
|
244
|
+
`;
|
|
245
|
+
}
|
|
236
246
|
}
|
|
237
247
|
};
|
|
238
248
|
__decorate([
|
|
239
249
|
property({ type: Boolean }),
|
|
240
250
|
__metadata("design:type", Boolean)
|
|
241
251
|
], HColorSwatches.prototype, "multiple", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
property({ type: Boolean, attribute: 'dev-visual-subcategories' }),
|
|
254
|
+
__metadata("design:type", Boolean)
|
|
255
|
+
], HColorSwatches.prototype, "devVisualSubcategories", void 0);
|
|
242
256
|
__decorate([
|
|
243
257
|
property({ type: Number, attribute: 'number-of-visible-colors' }),
|
|
244
258
|
__metadata("design:type", Number)
|
|
@@ -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;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;"}
|
|
@@ -31,8 +31,8 @@ let HTextareaControl = class HTextareaControl extends PhoenixLightLitElement {
|
|
|
31
31
|
id="${ifDefined(this.controlId)}"
|
|
32
32
|
name="${ifDefined(this.controlName)}"
|
|
33
33
|
placeholder="${ifDefined(this.placeholder)}"
|
|
34
|
+
aria-required="${this.required ? 'true' : 'false'}"
|
|
34
35
|
?disabled="${this.disabled}"
|
|
35
|
-
?required="${this.required}"
|
|
36
36
|
?readonly="${this.readonly}"
|
|
37
37
|
?hidden="${this.hidden}"
|
|
38
38
|
@input="${this._handleInputEvent}"
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
mobileOnly: boolean;
|
|
6
|
+
showAll: boolean;
|
|
7
|
+
private _$showMoreButton;
|
|
8
|
+
private _$items;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
private _updateComponentVisibility;
|
|
13
|
+
private _hideExcessItems;
|
|
14
|
+
private _showAllItems;
|
|
15
|
+
private _hideButton;
|
|
16
|
+
private _showButton;
|
|
17
|
+
private _setupListeners;
|
|
18
|
+
private _showMore;
|
|
19
|
+
private _focusNextItem;
|
|
20
|
+
private _onResize;
|
|
21
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
5
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
6
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
7
|
+
import { BREAKPOINTS } from '../../global_constants.js';
|
|
8
|
+
import { DEFAULT_THROTTLE_WAIT_TIME } from '../../controllers/relative_position_controller/relative_position_controller_constants.js';
|
|
9
|
+
import throttle_1 from '../../../../../external/lodash/throttle.js';
|
|
10
|
+
import { SHOW_MORE_ITEM_ATTRIBUTE, SHOW_MORE_CSS_CLASSES, SHOW_MORE_EVENT_NAMES } from './show_more_constants.js';
|
|
11
|
+
|
|
12
|
+
let HShowMore = class HShowMore extends PhoenixLightLitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this._$showMoreButton = null;
|
|
16
|
+
this._showMore = () => {
|
|
17
|
+
this._showAllItems();
|
|
18
|
+
this._hideButton();
|
|
19
|
+
this._focusNextItem();
|
|
20
|
+
};
|
|
21
|
+
this._onResize = throttle_1(() => {
|
|
22
|
+
if (window.innerWidth > BREAKPOINTS.xs) {
|
|
23
|
+
this._showAllItems();
|
|
24
|
+
this._hideButton();
|
|
25
|
+
window.removeEventListener('resize', this._onResize);
|
|
26
|
+
}
|
|
27
|
+
}, DEFAULT_THROTTLE_WAIT_TIME);
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
super.connectedCallback();
|
|
31
|
+
this._$showMoreButton = this.querySelector('h-show-more-button');
|
|
32
|
+
this._$items = [...this.querySelectorAll(`[${SHOW_MORE_ITEM_ATTRIBUTE}]`)];
|
|
33
|
+
this.classList.add(SHOW_MORE_CSS_CLASSES.showMore);
|
|
34
|
+
this._updateComponentVisibility();
|
|
35
|
+
this._setupListeners();
|
|
36
|
+
}
|
|
37
|
+
updated(_changedProperties) {
|
|
38
|
+
super.updated(_changedProperties);
|
|
39
|
+
if (_changedProperties.has('showAll')) {
|
|
40
|
+
this._showAllItems();
|
|
41
|
+
this._hideButton();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
super.disconnectedCallback();
|
|
46
|
+
window.removeEventListener('resize', this._onResize);
|
|
47
|
+
}
|
|
48
|
+
_updateComponentVisibility() {
|
|
49
|
+
const hasOverflowItems = this._$items.length > this.count;
|
|
50
|
+
const isMobileView = window.innerWidth <= BREAKPOINTS.xs;
|
|
51
|
+
const shouldBeActive = (!this.mobileOnly || isMobileView) && hasOverflowItems;
|
|
52
|
+
if (shouldBeActive) {
|
|
53
|
+
this._hideExcessItems();
|
|
54
|
+
this._showButton();
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this._hideButton();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_hideExcessItems() {
|
|
61
|
+
this._$items.forEach(($item, index) => {
|
|
62
|
+
$item.removeAttribute('hidden');
|
|
63
|
+
if (index >= this.count)
|
|
64
|
+
$item.setAttribute('hidden', '');
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
_showAllItems() {
|
|
68
|
+
this._$items.forEach(($item) => $item.removeAttribute('hidden'));
|
|
69
|
+
}
|
|
70
|
+
_hideButton() {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.setAttribute('hidden', '');
|
|
73
|
+
}
|
|
74
|
+
_showButton() {
|
|
75
|
+
var _a;
|
|
76
|
+
(_a = this._$showMoreButton) === null || _a === void 0 ? void 0 : _a.removeAttribute('hidden');
|
|
77
|
+
}
|
|
78
|
+
_setupListeners() {
|
|
79
|
+
this.addEventListener(SHOW_MORE_EVENT_NAMES.showMore, this._showMore);
|
|
80
|
+
if (this.mobileOnly && window.innerWidth <= BREAKPOINTS.xs) {
|
|
81
|
+
window.addEventListener('resize', this._onResize);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_focusNextItem() {
|
|
85
|
+
const $nextItem = this._$items[this.count];
|
|
86
|
+
if (!$nextItem)
|
|
87
|
+
return;
|
|
88
|
+
const $firstFocusableElement = UiDomUtils.getFocusableElement($nextItem);
|
|
89
|
+
if ($firstFocusableElement) {
|
|
90
|
+
$firstFocusableElement.focus();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (!$nextItem.getAttribute('tabindex'))
|
|
94
|
+
$nextItem.setAttribute('tabindex', '-1');
|
|
95
|
+
$nextItem.focus();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
__decorate([
|
|
99
|
+
property({ type: Number }),
|
|
100
|
+
__metadata("design:type", Number)
|
|
101
|
+
], HShowMore.prototype, "count", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: Boolean, attribute: 'mobile-only' }),
|
|
104
|
+
__metadata("design:type", Boolean)
|
|
105
|
+
], HShowMore.prototype, "mobileOnly", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: Boolean, attribute: 'show-all' }),
|
|
108
|
+
__metadata("design:type", Boolean)
|
|
109
|
+
], HShowMore.prototype, "showAll", void 0);
|
|
110
|
+
HShowMore = __decorate([
|
|
111
|
+
phoenixCustomElement('h-show-more')
|
|
112
|
+
], HShowMore);
|
|
113
|
+
|
|
114
|
+
export { HShowMore };
|
|
115
|
+
//# 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;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;"}
|
|
@@ -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,8 @@
|
|
|
1
|
+
export declare const SHOW_MORE_CSS_CLASSES: {
|
|
2
|
+
readonly showMore: "show-more";
|
|
3
|
+
readonly showMoreButton: "show-more__button";
|
|
4
|
+
};
|
|
5
|
+
export declare const SHOW_MORE_EVENT_NAMES: {
|
|
6
|
+
readonly showMore: "showMore";
|
|
7
|
+
};
|
|
8
|
+
export declare const SHOW_MORE_ITEM_ATTRIBUTE = "show-more-item";
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
const SHOW_MORE_ITEM_ATTRIBUTE = 'show-more-item';
|
|
9
|
+
|
|
10
|
+
export { SHOW_MORE_CSS_CLASSES, SHOW_MORE_EVENT_NAMES, SHOW_MORE_ITEM_ATTRIBUTE };
|
|
11
|
+
//# 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;"}
|
|
@@ -140,4 +140,6 @@ export * from './components/toggle/toggle_types';
|
|
|
140
140
|
export * from './components/toggle/toggle_constants';
|
|
141
141
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share';
|
|
142
142
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller';
|
|
143
|
+
export { HShowMore } from './components/show-more/show_more';
|
|
144
|
+
export { HShowMoreButton } from './components/show-more/show_more_button';
|
|
143
145
|
export { phoenixCustomElement } from './core/decorators/phoenix_custom_element';
|
|
@@ -79,6 +79,7 @@ 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';
|
|
82
83
|
export { HColorSwatches } from './components/color_swatches/color_swatches.js';
|
|
83
84
|
export { HColorItem } from './components/color_swatches/color_item/color_item.js';
|
|
84
85
|
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
@@ -122,4 +123,5 @@ export { HToggle } from './components/toggle/toggle.js';
|
|
|
122
123
|
export { HToggleBtn } from './components/toggle/toggle_button.js';
|
|
123
124
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share.js';
|
|
124
125
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller.js';
|
|
126
|
+
export { HShowMore } from './components/show-more/show_more.js';
|
|
125
127
|
//# 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;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.10",
|
|
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-6",
|
|
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
|
},
|