@shoper/phoenix_design_system 1.2.10 → 1.2.11-2
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_item/color_item.js +6 -0
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +14 -17
- 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 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +11 -4
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +4 -0
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +3 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +5 -5
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js +6 -0
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +1 -3
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +14 -17
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.d.ts +4 -3
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +12 -5
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.d.ts +3 -0
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +4 -1
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.js +3 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -33,6 +33,8 @@ exports.HColorItem = class HColorItem extends phoenix_light_lit_element.PhoenixL
|
|
|
33
33
|
this.setAttribute('aria-label', this.label ? this.label : this.color);
|
|
34
34
|
this.unclickable && this.removeAttribute('tabindex');
|
|
35
35
|
this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItem);
|
|
36
|
+
if (!this.value)
|
|
37
|
+
this.value = this.color;
|
|
36
38
|
this.small && this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
|
|
37
39
|
}
|
|
38
40
|
attributeChangedCallback(name, value, newValue) {
|
|
@@ -58,6 +60,10 @@ tslib_es6.__decorate([
|
|
|
58
60
|
decorators.property({ type: String }),
|
|
59
61
|
tslib_es6.__metadata("design:type", String)
|
|
60
62
|
], exports.HColorItem.prototype, "color", void 0);
|
|
63
|
+
tslib_es6.__decorate([
|
|
64
|
+
decorators.property({ type: String }),
|
|
65
|
+
tslib_es6.__metadata("design:type", String)
|
|
66
|
+
], exports.HColorItem.prototype, "value", void 0);
|
|
61
67
|
tslib_es6.__decorate([
|
|
62
68
|
decorators.property({ type: String }),
|
|
63
69
|
tslib_es6.__metadata("design:type", String)
|
package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map
CHANGED
|
@@ -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;"}
|
|
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;"}
|
|
@@ -19,11 +19,17 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
19
19
|
const $colorItem = target;
|
|
20
20
|
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
21
21
|
};
|
|
22
|
-
this.
|
|
23
|
-
const detail = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
this._dispatchColorChangeEvent = () => {
|
|
23
|
+
const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
|
|
24
|
+
return {
|
|
25
|
+
colors: [...colorsSoFar, color.color],
|
|
26
|
+
values: [...colorsSoFar, color.value]
|
|
27
|
+
};
|
|
28
|
+
}, {
|
|
29
|
+
colors: [],
|
|
30
|
+
values: []
|
|
31
|
+
});
|
|
32
|
+
this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, {
|
|
27
33
|
bubbles: true,
|
|
28
34
|
detail
|
|
29
35
|
}));
|
|
@@ -35,6 +41,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
35
41
|
this._addCssClasses();
|
|
36
42
|
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
37
43
|
this._showAllItemsEvent();
|
|
44
|
+
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
38
45
|
}
|
|
39
46
|
_addCssClasses() {
|
|
40
47
|
this.querySelectorAll(color_swatches_constants.COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
|
|
@@ -64,7 +71,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
64
71
|
? (this.selectedColors = [...this.selectedColors, $colorItem])
|
|
65
72
|
: this._removeExistingColorFromArray($colorItem);
|
|
66
73
|
this._toggleSelectedAttribute($colorItem);
|
|
67
|
-
this.
|
|
74
|
+
this._dispatchColorChangeEvent();
|
|
68
75
|
}
|
|
69
76
|
_handleColorClickedForSingleMode($colorItem) {
|
|
70
77
|
const $previouslySelected = this.selectedColors[0];
|
|
@@ -72,7 +79,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
72
79
|
if ($previouslySelected && $previouslySelected !== $colorItem)
|
|
73
80
|
$previouslySelected.removeAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE);
|
|
74
81
|
this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
|
|
75
|
-
this.
|
|
82
|
+
this._dispatchColorChangeEvent();
|
|
76
83
|
}
|
|
77
84
|
_toggleSelectedAttribute($colorItem) {
|
|
78
85
|
$colorItem.hasAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE)
|
|
@@ -86,16 +93,6 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
86
93
|
const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
|
|
87
94
|
this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
|
|
88
95
|
}
|
|
89
|
-
_setColorsDispatchValue(selectedColors) {
|
|
90
|
-
if (this.selectedColors.length > 1)
|
|
91
|
-
return this._getOnlyColorValues(selectedColors);
|
|
92
|
-
if (this.selectedColors.length === 1)
|
|
93
|
-
return selectedColors[0].color;
|
|
94
|
-
return '';
|
|
95
|
-
}
|
|
96
|
-
_getOnlyColorValues(selectedColors) {
|
|
97
|
-
return selectedColors.map((selectedColor) => selectedColor.color);
|
|
98
|
-
}
|
|
99
96
|
};
|
|
100
97
|
tslib_es6.__decorate([
|
|
101
98
|
decorators.property({ type: Boolean }),
|
|
@@ -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;
|
|
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;"}
|
package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -12,7 +12,7 @@ const COLOR_SWATCHES_CSS_CLASSES = {
|
|
|
12
12
|
colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
|
|
13
13
|
};
|
|
14
14
|
const COLOR_SWATCHES_EVENT_NAMES = {
|
|
15
|
-
|
|
15
|
+
change: 'change',
|
|
16
16
|
markDisabledItems: 'markDisabledItems'
|
|
17
17
|
};
|
|
18
18
|
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
9
8
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
10
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
11
10
|
var index = require('../../../../external/classnames/index.js');
|
|
@@ -28,11 +27,19 @@ exports.HColorSwatchesControl = class HColorSwatchesControl extends phoenix_ligh
|
|
|
28
27
|
});
|
|
29
28
|
if (cssClasses)
|
|
30
29
|
this.classList.add(cssClasses);
|
|
30
|
+
this._getInitiallySelectedColors();
|
|
31
|
+
}
|
|
32
|
+
_getInitiallySelectedColors() {
|
|
33
|
+
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')].map((selectedColor) => selectedColor.value ? selectedColor.value : selectedColor.color);
|
|
31
34
|
}
|
|
32
35
|
_setupEvents() {
|
|
33
|
-
this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.
|
|
34
|
-
|
|
35
|
-
this.selectedColors =
|
|
36
|
+
this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, (event) => {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
this.selectedColors = event.detail.values;
|
|
39
|
+
this.dispatchEvent(new CustomEvent(color_swatches_control_constants.COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
|
|
40
|
+
bubbles: true,
|
|
41
|
+
detail: event.detail.values
|
|
42
|
+
}));
|
|
36
43
|
});
|
|
37
44
|
}
|
|
38
45
|
render() {
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,7 +7,11 @@ const COLOR_SWATCHES_CONTROL_CSS_CLASSES = {
|
|
|
7
7
|
colorSwatchesControl: baseColorSwatchesControlClass,
|
|
8
8
|
colorSwatchesControlDisabled: `${baseColorSwatchesControlClass}_disabled`,
|
|
9
9
|
colorSwatchesControlError: `${baseColorSwatchesControlClass}_error`
|
|
10
|
+
};
|
|
11
|
+
const COLOR_SWATCHES_CONTROL_EVENT_NAMES = {
|
|
12
|
+
change: 'change'
|
|
10
13
|
};
|
|
11
14
|
|
|
12
15
|
exports.COLOR_SWATCHES_CONTROL_CSS_CLASSES = COLOR_SWATCHES_CONTROL_CSS_CLASSES;
|
|
16
|
+
exports.COLOR_SWATCHES_CONTROL_EVENT_NAMES = COLOR_SWATCHES_CONTROL_EVENT_NAMES;
|
|
13
17
|
//# sourceMappingURL=color_swatches_control_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
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;"}
|
|
@@ -96,7 +96,9 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
96
96
|
this._dispatchChangeEvent();
|
|
97
97
|
};
|
|
98
98
|
this._dispatchChangeEvent = () => {
|
|
99
|
-
this.dispatchEvent(new Event('change'
|
|
99
|
+
this.dispatchEvent(new Event('change', {
|
|
100
|
+
bubbles: true
|
|
101
|
+
}));
|
|
100
102
|
};
|
|
101
103
|
this._handleResize = debounce['default'](() => {
|
|
102
104
|
this._closeSelect();
|
|
@@ -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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -69,8 +69,8 @@ var toggle_button_group = require('./components/groups/toggle_button_group/toggl
|
|
|
69
69
|
var toggle_button = require('./components/groups/toggle_button_group/toggle_button.js');
|
|
70
70
|
var click_outside_controller_messages = require('./controllers/click_outside_controller/click_outside_controller_messages.js');
|
|
71
71
|
var backdrop = require('./components/backdrop/backdrop.js');
|
|
72
|
-
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
73
72
|
var color_item = require('./components/color_swatches/color_item/color_item.js');
|
|
73
|
+
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
74
74
|
var color_swatches = require('./components/color_swatches/color_swatches.js');
|
|
75
75
|
var show_more = require('./components/color_swatches/show-more/show_more.js');
|
|
76
76
|
var visibility_controller = require('./controllers/visibility_controller/visibility_controller.js');
|
|
@@ -421,16 +421,16 @@ Object.defineProperty(exports, 'HBackdrop', {
|
|
|
421
421
|
return backdrop.HBackdrop;
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
|
-
Object.defineProperty(exports, '
|
|
424
|
+
Object.defineProperty(exports, 'HColorItem', {
|
|
425
425
|
enumerable: true,
|
|
426
426
|
get: function () {
|
|
427
|
-
return
|
|
427
|
+
return color_item.HColorItem;
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
|
-
Object.defineProperty(exports, '
|
|
430
|
+
Object.defineProperty(exports, 'HColorSwatchesControl', {
|
|
431
431
|
enumerable: true,
|
|
432
432
|
get: function () {
|
|
433
|
-
return
|
|
433
|
+
return color_swatches_control.HColorSwatchesControl;
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
436
|
Object.defineProperty(exports, 'HColorSwatches', {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HColorItem extends PhoenixLightLitElement {
|
|
3
3
|
color: string;
|
|
4
|
+
value: string;
|
|
4
5
|
label?: string;
|
|
5
6
|
disabled: boolean;
|
|
6
7
|
selected: boolean;
|
|
@@ -29,6 +29,8 @@ let HColorItem = class HColorItem extends PhoenixLightLitElement {
|
|
|
29
29
|
this.setAttribute('aria-label', this.label ? this.label : this.color);
|
|
30
30
|
this.unclickable && this.removeAttribute('tabindex');
|
|
31
31
|
this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItem);
|
|
32
|
+
if (!this.value)
|
|
33
|
+
this.value = this.color;
|
|
32
34
|
this.small && this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
|
|
33
35
|
}
|
|
34
36
|
attributeChangedCallback(name, value, newValue) {
|
|
@@ -54,6 +56,10 @@ __decorate([
|
|
|
54
56
|
property({ type: String }),
|
|
55
57
|
__metadata("design:type", String)
|
|
56
58
|
], HColorItem.prototype, "color", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
property({ type: String }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], HColorItem.prototype, "value", void 0);
|
|
57
63
|
__decorate([
|
|
58
64
|
property({ type: String }),
|
|
59
65
|
__metadata("design:type", String)
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map
CHANGED
|
@@ -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;"}
|
|
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;"}
|
|
@@ -15,7 +15,5 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
|
|
|
15
15
|
private _toggleSelectedAttribute;
|
|
16
16
|
private _isColorAlreadyExistInArray;
|
|
17
17
|
private _removeExistingColorFromArray;
|
|
18
|
-
private
|
|
19
|
-
private _setColorsDispatchValue;
|
|
20
|
-
private _getOnlyColorValues;
|
|
18
|
+
private _dispatchColorChangeEvent;
|
|
21
19
|
}
|
|
@@ -15,11 +15,17 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
15
15
|
const $colorItem = target;
|
|
16
16
|
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
17
17
|
};
|
|
18
|
-
this.
|
|
19
|
-
const detail = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
this._dispatchColorChangeEvent = () => {
|
|
19
|
+
const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
|
|
20
|
+
return {
|
|
21
|
+
colors: [...colorsSoFar, color.color],
|
|
22
|
+
values: [...colorsSoFar, color.value]
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
colors: [],
|
|
26
|
+
values: []
|
|
27
|
+
});
|
|
28
|
+
this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.change, {
|
|
23
29
|
bubbles: true,
|
|
24
30
|
detail
|
|
25
31
|
}));
|
|
@@ -31,6 +37,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
31
37
|
this._addCssClasses();
|
|
32
38
|
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
33
39
|
this._showAllItemsEvent();
|
|
40
|
+
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
34
41
|
}
|
|
35
42
|
_addCssClasses() {
|
|
36
43
|
this.querySelectorAll(COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
|
|
@@ -60,7 +67,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
60
67
|
? (this.selectedColors = [...this.selectedColors, $colorItem])
|
|
61
68
|
: this._removeExistingColorFromArray($colorItem);
|
|
62
69
|
this._toggleSelectedAttribute($colorItem);
|
|
63
|
-
this.
|
|
70
|
+
this._dispatchColorChangeEvent();
|
|
64
71
|
}
|
|
65
72
|
_handleColorClickedForSingleMode($colorItem) {
|
|
66
73
|
const $previouslySelected = this.selectedColors[0];
|
|
@@ -68,7 +75,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
68
75
|
if ($previouslySelected && $previouslySelected !== $colorItem)
|
|
69
76
|
$previouslySelected.removeAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE);
|
|
70
77
|
this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
|
|
71
|
-
this.
|
|
78
|
+
this._dispatchColorChangeEvent();
|
|
72
79
|
}
|
|
73
80
|
_toggleSelectedAttribute($colorItem) {
|
|
74
81
|
$colorItem.hasAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE)
|
|
@@ -82,16 +89,6 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
82
89
|
const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
|
|
83
90
|
this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
|
|
84
91
|
}
|
|
85
|
-
_setColorsDispatchValue(selectedColors) {
|
|
86
|
-
if (this.selectedColors.length > 1)
|
|
87
|
-
return this._getOnlyColorValues(selectedColors);
|
|
88
|
-
if (this.selectedColors.length === 1)
|
|
89
|
-
return selectedColors[0].color;
|
|
90
|
-
return '';
|
|
91
|
-
}
|
|
92
|
-
_getOnlyColorValues(selectedColors) {
|
|
93
|
-
return selectedColors.map((selectedColor) => selectedColor.color);
|
|
94
|
-
}
|
|
95
92
|
};
|
|
96
93
|
__decorate([
|
|
97
94
|
property({ type: Boolean }),
|
|
@@ -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;
|
|
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;"}
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const COLOR_SWATCHES_CSS_CLASSES: {
|
|
|
6
6
|
readonly colorSwatchesItem: "color-swatches__color-item";
|
|
7
7
|
};
|
|
8
8
|
export declare const COLOR_SWATCHES_EVENT_NAMES: {
|
|
9
|
-
readonly
|
|
9
|
+
readonly change: "change";
|
|
10
10
|
readonly markDisabledItems: "markDisabledItems";
|
|
11
11
|
};
|
|
12
12
|
export declare const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = "hidden";
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -8,7 +8,7 @@ const COLOR_SWATCHES_CSS_CLASSES = {
|
|
|
8
8
|
colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
|
|
9
9
|
};
|
|
10
10
|
const COLOR_SWATCHES_EVENT_NAMES = {
|
|
11
|
-
|
|
11
|
+
change: 'change',
|
|
12
12
|
markDisabledItems: 'markDisabledItems'
|
|
13
13
|
};
|
|
14
14
|
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
colors: string
|
|
3
|
-
|
|
1
|
+
export declare type TSelectedColorsObject = {
|
|
2
|
+
colors: string[];
|
|
3
|
+
values: string[];
|
|
4
|
+
};
|
|
@@ -8,6 +8,7 @@ export declare class HColorSwatchesControl extends PhoenixLightLitElement {
|
|
|
8
8
|
error: boolean;
|
|
9
9
|
selectedColors: string[];
|
|
10
10
|
connectedCallback(): void;
|
|
11
|
+
private _getInitiallySelectedColors;
|
|
11
12
|
private _setupEvents;
|
|
12
13
|
protected render(): TemplateResult | void;
|
|
13
14
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { property, state } from 'lit/decorators';
|
|
4
|
-
import { ArrayUtils } from '@dreamcommerce/utilities';
|
|
5
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
6
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
7
6
|
import classnames from '../../../../external/classnames/index.js';
|
|
8
7
|
import { INPUT_CONTROL_TYPES } from '../input/input_constants.js';
|
|
9
|
-
import { COLOR_SWATCHES_CONTROL_CSS_CLASSES } from './color_swatches_control_constants.js';
|
|
8
|
+
import { COLOR_SWATCHES_CONTROL_CSS_CLASSES, COLOR_SWATCHES_CONTROL_EVENT_NAMES } from './color_swatches_control_constants.js';
|
|
10
9
|
import { COLOR_SWATCHES_EVENT_NAMES } from '../../color_swatches/color_swatches_constants.js';
|
|
11
10
|
|
|
12
11
|
let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitElement {
|
|
@@ -24,11 +23,19 @@ let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitE
|
|
|
24
23
|
});
|
|
25
24
|
if (cssClasses)
|
|
26
25
|
this.classList.add(cssClasses);
|
|
26
|
+
this._getInitiallySelectedColors();
|
|
27
|
+
}
|
|
28
|
+
_getInitiallySelectedColors() {
|
|
29
|
+
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')].map((selectedColor) => selectedColor.value ? selectedColor.value : selectedColor.color);
|
|
27
30
|
}
|
|
28
31
|
_setupEvents() {
|
|
29
|
-
this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.
|
|
30
|
-
|
|
31
|
-
this.selectedColors =
|
|
32
|
+
this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.change, (event) => {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
this.selectedColors = event.detail.values;
|
|
35
|
+
this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
|
|
36
|
+
bubbles: true,
|
|
37
|
+
detail: event.detail.values
|
|
38
|
+
}));
|
|
32
39
|
});
|
|
33
40
|
}
|
|
34
41
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,3 +3,6 @@ export declare const COLOR_SWATCHES_CONTROL_CSS_CLASSES: {
|
|
|
3
3
|
readonly colorSwatchesControlDisabled: "color-swatches-control_disabled";
|
|
4
4
|
readonly colorSwatchesControlError: "color-swatches-control_error";
|
|
5
5
|
};
|
|
6
|
+
export declare const COLOR_SWATCHES_CONTROL_EVENT_NAMES: {
|
|
7
|
+
readonly change: "change";
|
|
8
|
+
};
|
|
@@ -3,7 +3,10 @@ const COLOR_SWATCHES_CONTROL_CSS_CLASSES = {
|
|
|
3
3
|
colorSwatchesControl: baseColorSwatchesControlClass,
|
|
4
4
|
colorSwatchesControlDisabled: `${baseColorSwatchesControlClass}_disabled`,
|
|
5
5
|
colorSwatchesControlError: `${baseColorSwatchesControlClass}_error`
|
|
6
|
+
};
|
|
7
|
+
const COLOR_SWATCHES_CONTROL_EVENT_NAMES = {
|
|
8
|
+
change: 'change'
|
|
6
9
|
};
|
|
7
10
|
|
|
8
|
-
export { COLOR_SWATCHES_CONTROL_CSS_CLASSES };
|
|
11
|
+
export { COLOR_SWATCHES_CONTROL_CSS_CLASSES, COLOR_SWATCHES_CONTROL_EVENT_NAMES };
|
|
9
12
|
//# sourceMappingURL=color_swatches_control_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;"}
|
|
@@ -92,7 +92,9 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
92
92
|
this._dispatchChangeEvent();
|
|
93
93
|
};
|
|
94
94
|
this._dispatchChangeEvent = () => {
|
|
95
|
-
this.dispatchEvent(new Event('change'
|
|
95
|
+
this.dispatchEvent(new Event('change', {
|
|
96
|
+
bubbles: true
|
|
97
|
+
}));
|
|
96
98
|
};
|
|
97
99
|
this._handleResize = debounce_1(() => {
|
|
98
100
|
this._closeSelect();
|
|
@@ -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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -65,8 +65,8 @@ export { HToggleButtonGroup } from './components/groups/toggle_button_group/togg
|
|
|
65
65
|
export { HToggleButton } from './components/groups/toggle_button_group/toggle_button.js';
|
|
66
66
|
export { CLICK_OUTSIDE_CONTROLLER_MESSAGES } from './controllers/click_outside_controller/click_outside_controller_messages.js';
|
|
67
67
|
export { HBackdrop } from './components/backdrop/backdrop.js';
|
|
68
|
-
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
69
68
|
export { HColorItem } from './components/color_swatches/color_item/color_item.js';
|
|
69
|
+
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
70
70
|
export { HColorSwatches } from './components/color_swatches/color_swatches.js';
|
|
71
71
|
export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more.js';
|
|
72
72
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller.js';
|