@shoper/phoenix_design_system 1.2.12 → 1.2.13-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js +6 -0
  2. package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +34 -19
  4. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -1
  6. package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +32 -6
  7. package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
  8. package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +4 -0
  9. package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
  10. package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js +6 -1
  11. package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
  12. package/build/cjs/packages/phoenix/src/components/form/select/select.js +13 -8
  13. package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
  14. package/build/cjs/packages/phoenix/src/index.js +9 -7
  15. package/build/cjs/packages/phoenix/src/index.js.map +1 -1
  16. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.d.ts +1 -0
  17. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js +6 -0
  18. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
  19. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +5 -3
  20. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +35 -20
  21. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  22. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +1 -1
  23. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -1
  24. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.d.ts +4 -3
  25. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.d.ts +6 -0
  26. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +34 -8
  27. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
  28. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.d.ts +3 -0
  29. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +4 -1
  30. package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
  31. package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js +6 -1
  32. package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
  33. package/build/esm/packages/phoenix/src/components/form/select/select.d.ts +1 -0
  34. package/build/esm/packages/phoenix/src/components/form/select/select.js +13 -8
  35. package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
  36. package/build/esm/packages/phoenix/src/components/slider/slider_types.d.ts +5 -2
  37. package/build/esm/packages/phoenix/src/components/slider/slider_types.js.map +1 -1
  38. package/build/esm/packages/phoenix/src/index.d.ts +2 -0
  39. package/build/esm/packages/phoenix/src/index.js +2 -1
  40. package/build/esm/packages/phoenix/src/index.js.map +1 -1
  41. 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)
@@ -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;"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
6
6
  var decorators = require('lit/decorators');
7
+ var utilities = require('@dreamcommerce/utilities');
7
8
  var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
8
9
  var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
9
10
  var color_swatches_constants = require('./color_swatches_constants.js');
@@ -17,24 +18,45 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
17
18
  this.selectedColors = [];
18
19
  this._handleColorClicked = ({ target }) => {
19
20
  const $colorItem = target;
20
- this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
21
+ this._toggleColorItem($colorItem);
21
22
  };
22
- this._dispatchColorSelectEvent = () => {
23
- const detail = {
24
- colors: this._setColorsDispatchValue(this.selectedColors)
25
- };
26
- this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.selected, {
23
+ this._dispatchColorChangeEvent = () => {
24
+ const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
25
+ return {
26
+ colors: [...colorsSoFar, color.color],
27
+ values: [...colorsSoFar, color.value]
28
+ };
29
+ }, {
30
+ colors: [],
31
+ values: []
32
+ });
33
+ this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, {
27
34
  bubbles: true,
28
35
  detail
29
36
  }));
30
37
  };
31
38
  }
39
+ selectColors($colors) {
40
+ const colorsArr = utilities.ArrayUtils.makeAsArray($colors);
41
+ if (!colorsArr.length) {
42
+ this.clearAllColors();
43
+ return;
44
+ }
45
+ colorsArr.forEach(($color) => this._toggleColorItem($color));
46
+ }
47
+ clearAllColors() {
48
+ [...this.selectedColors].forEach(($color) => {
49
+ this._toggleColorItem($color);
50
+ });
51
+ }
32
52
  connectedCallback() {
33
53
  super.connectedCallback();
34
54
  this._setupEvents();
35
55
  this._addCssClasses();
36
56
  this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
37
57
  this._showAllItemsEvent();
58
+ this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
59
+ this._$colors = [...this.querySelectorAll('h-color-item')];
38
60
  }
39
61
  _addCssClasses() {
40
62
  this.querySelectorAll(color_swatches_constants.COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
@@ -59,12 +81,15 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
59
81
  _setupEvents() {
60
82
  this.addEventListener(color_item_constants.COLOR_ITEM_EVENT_NAMES.selected, this._handleColorClicked);
61
83
  }
84
+ _toggleColorItem($colorItem) {
85
+ this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
86
+ }
62
87
  _handleColorClickedForMultipleMode($colorItem) {
63
88
  !this._isColorAlreadyExistInArray($colorItem)
64
89
  ? (this.selectedColors = [...this.selectedColors, $colorItem])
65
90
  : this._removeExistingColorFromArray($colorItem);
66
91
  this._toggleSelectedAttribute($colorItem);
67
- this._dispatchColorSelectEvent();
92
+ this._dispatchColorChangeEvent();
68
93
  }
69
94
  _handleColorClickedForSingleMode($colorItem) {
70
95
  const $previouslySelected = this.selectedColors[0];
@@ -72,7 +97,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
72
97
  if ($previouslySelected && $previouslySelected !== $colorItem)
73
98
  $previouslySelected.removeAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE);
74
99
  this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
75
- this._dispatchColorSelectEvent();
100
+ this._dispatchColorChangeEvent();
76
101
  }
77
102
  _toggleSelectedAttribute($colorItem) {
78
103
  $colorItem.hasAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE)
@@ -86,16 +111,6 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
86
111
  const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
87
112
  this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
88
113
  }
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
114
  };
100
115
  tslib_es6.__decorate([
101
116
  decorators.property({ type: Boolean }),
@@ -106,7 +121,7 @@ tslib_es6.__decorate([
106
121
  tslib_es6.__metadata("design:type", Number)
107
122
  ], exports.HColorSwatches.prototype, "numberOfVisibleColors", void 0);
108
123
  tslib_es6.__decorate([
109
- decorators.state(),
124
+ decorators.property(),
110
125
  tslib_es6.__metadata("design:type", Array)
111
126
  ], exports.HColorSwatches.prototype, "selectedColors", void 0);
112
127
  exports.HColorSwatches = tslib_es6.__decorate([
@@ -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;"}
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;"}
@@ -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
- selected: 'colorSwatchesSelected',
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');
@@ -18,6 +17,18 @@ exports.HColorSwatchesControl = class HColorSwatchesControl extends phoenix_ligh
18
17
  super(...arguments);
19
18
  this.selectedColors = [];
20
19
  }
20
+ selectColors(values) {
21
+ if (!this._$colorSwatches)
22
+ return;
23
+ const $colors = values === null || values === void 0 ? void 0 : values.map((value) => this.querySelector(`h-color-item[value="${value}"]`)).filter(($color) => $color);
24
+ this._$colorSwatches.selectColors($colors);
25
+ this.requestUpdate();
26
+ }
27
+ clearAllColors() {
28
+ var _a;
29
+ (_a = this._$colorSwatches) === null || _a === void 0 ? void 0 : _a.clearAllColors();
30
+ this.requestUpdate();
31
+ }
21
32
  connectedCallback() {
22
33
  super.connectedCallback();
23
34
  this._setupEvents();
@@ -26,13 +37,28 @@ exports.HColorSwatchesControl = class HColorSwatchesControl extends phoenix_ligh
26
37
  [color_swatches_control_constants.COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlDisabled]: this.disabled,
27
38
  [color_swatches_control_constants.COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlError]: this.error
28
39
  });
40
+ this._$colorSwatches = this.querySelector('h-color-swatches');
29
41
  if (cssClasses)
30
42
  this.classList.add(cssClasses);
43
+ this._getSelectedColors();
44
+ }
45
+ _getSelectedColors() {
46
+ this.selectedColors = this._getSelectedColorItems().map((selectedColor) => { var _a; return (_a = selectedColor.value) !== null && _a !== void 0 ? _a : selectedColor.color; });
47
+ }
48
+ _getAllColorItems() {
49
+ return [...this.querySelectorAll('h-color-item[selected]')];
50
+ }
51
+ _getSelectedColorItems() {
52
+ return this._getAllColorItems().filter(($color) => $color.selected);
31
53
  }
32
54
  _setupEvents() {
33
- this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.selected, (event) => {
34
- const eventValue = event.detail.colors;
35
- this.selectedColors = eventValue ? utilities.ArrayUtils.makeAsArray(eventValue) : [];
55
+ this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, (event) => {
56
+ event.preventDefault();
57
+ this.selectedColors = event.detail.values;
58
+ this.dispatchEvent(new CustomEvent(color_swatches_control_constants.COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
59
+ bubbles: true,
60
+ detail: event.detail
61
+ }));
36
62
  });
37
63
  }
38
64
  render() {
@@ -48,7 +74,7 @@ tslib_es6.__decorate([
48
74
  tslib_es6.__metadata("design:type", String)
49
75
  ], exports.HColorSwatchesControl.prototype, "controlId", void 0);
50
76
  tslib_es6.__decorate([
51
- decorators.property({ type: String }),
77
+ decorators.property({ type: String, attribute: 'control-name' }),
52
78
  tslib_es6.__metadata("design:type", String)
53
79
  ], exports.HColorSwatchesControl.prototype, "controlName", void 0);
54
80
  tslib_es6.__decorate([
@@ -64,7 +90,7 @@ tslib_es6.__decorate([
64
90
  tslib_es6.__metadata("design:type", Boolean)
65
91
  ], exports.HColorSwatchesControl.prototype, "error", void 0);
66
92
  tslib_es6.__decorate([
67
- decorators.state(),
93
+ decorators.property(),
68
94
  tslib_es6.__metadata("design:type", Array)
69
95
  ], exports.HColorSwatchesControl.prototype, "selectedColors", void 0);
70
96
  exports.HColorSwatchesControl = tslib_es6.__decorate([
@@ -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,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;"}
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;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: 'colorSwatchesControl.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;"}
@@ -19,6 +19,10 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.type = input_constants.INPUT_CONTROL_TYPES.file;
22
+ this.labelText = 'Wgraj plik';
23
+ this.labelIconName = 'icon-upload';
24
+ this.removeButtonText = 'Usuń plik';
25
+ this.removeButtonIconName = 'icon-x';
22
26
  this._$fileInputRef = ref_js.createRef();
23
27
  this._handleChangeEvent = (event) => {
24
28
  const filesList = this._getFiles(event);
@@ -63,6 +67,7 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
63
67
  super.connectedCallback();
64
68
  this._addEventListeners();
65
69
  const cssClasses = index['default']({
70
+ [file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePicker]: true,
66
71
  [file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerDisabled]: this.disabled,
67
72
  [file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerRequired]: this.required,
68
73
  [file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerError]: this.error
@@ -95,7 +100,7 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
95
100
  />`
96
101
  : lit.nothing}
97
102
  ${((_b = this._file) === null || _b === void 0 ? void 0 : _b.name)
98
- ? lit.html `<h-file
103
+ ? lit.html ` <h-file
99
104
  name="${this._file.name}"
100
105
  id="${this._file.id}"
101
106
  remove-button-text="${this.removeButtonText}"
@@ -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,oBAAoB,0CAA8C;AAClE;AACA,iBAAiB,wDAA4D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,0CAA8C;AAClE;AACA,iBAAiB,wDAA4D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -75,7 +75,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
75
75
  select_utils.SelectControlUtils.syncHTMLOptionWithModel(option, $option);
76
76
  if (!selected)
77
77
  return;
78
- $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
78
+ this.updateOptionAriaAttribute($option);
79
79
  });
80
80
  };
81
81
  this._handleOptionClicked = (event) => {
@@ -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();
@@ -119,11 +121,8 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
119
121
  }
120
122
  set selectedIndex(index) {
121
123
  const option = Object.values(this._$options)[index];
122
- if (!option) {
123
- this._selectController.deselectAll();
124
- return;
125
- }
126
- this._selectOption(option.value);
124
+ option ? this._selectOption(option.value) : this._selectController.deselectAll();
125
+ Object.values(this._$options).forEach(($option) => this.updateOptionAriaAttribute($option));
127
126
  }
128
127
  get selectedOptions() {
129
128
  var _a;
@@ -210,10 +209,15 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
210
209
  const { value, selected } = option;
211
210
  const $option = select_utils.SelectControlUtils.createHTMLOption(option);
212
211
  if (selected)
213
- $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
212
+ this.updateOptionAriaAttribute($option);
214
213
  this._$options[value] = $option;
215
214
  select_utils.SelectControlUtils.appendHTMLOption($option, $list, position);
216
215
  }
216
+ updateOptionAriaAttribute($option) {
217
+ !$option.selected
218
+ ? $option.removeAttribute(this.multiple ? 'aria-checked' : 'aria-selected')
219
+ : $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
220
+ }
217
221
  _removeHTMLOptions(optionsValues) {
218
222
  this._$options = select_utils.SelectControlUtils.removeHTMLOptions(Object.values(this._$options), optionsValues);
219
223
  }
@@ -246,6 +250,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
246
250
  disconnectedCallback() {
247
251
  super.disconnectedCallback();
248
252
  this._selectController.options$.unsubscribe(this._optionsObserver);
253
+ this._$options = {};
249
254
  window.removeEventListener('resize', this._handleResize);
250
255
  }
251
256
  _getDropdownContentWidth() {
@@ -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;AACA;AACA;AACA;"}
@@ -69,9 +69,10 @@ 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');
72
+ var color_swatches_control_constants = require('./components/form/color_swatches_control/color_swatches_control_constants.js');
73
73
  var color_item = require('./components/color_swatches/color_item/color_item.js');
74
74
  var color_swatches = require('./components/color_swatches/color_swatches.js');
75
+ var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
75
76
  var show_more = require('./components/color_swatches/show-more/show_more.js');
76
77
  var visibility_controller = require('./controllers/visibility_controller/visibility_controller.js');
77
78
  var slider = require('./components/slider/slider.js');
@@ -421,12 +422,7 @@ Object.defineProperty(exports, 'HBackdrop', {
421
422
  return backdrop.HBackdrop;
422
423
  }
423
424
  });
424
- Object.defineProperty(exports, 'HColorSwatchesControl', {
425
- enumerable: true,
426
- get: function () {
427
- return color_swatches_control.HColorSwatchesControl;
428
- }
429
- });
425
+ exports.COLOR_SWATCHES_CONTROL_EVENT_NAMES = color_swatches_control_constants.COLOR_SWATCHES_CONTROL_EVENT_NAMES;
430
426
  Object.defineProperty(exports, 'HColorItem', {
431
427
  enumerable: true,
432
428
  get: function () {
@@ -439,6 +435,12 @@ Object.defineProperty(exports, 'HColorSwatches', {
439
435
  return color_swatches.HColorSwatches;
440
436
  }
441
437
  });
438
+ Object.defineProperty(exports, 'HColorSwatchesControl', {
439
+ enumerable: true,
440
+ get: function () {
441
+ return color_swatches_control.HColorSwatchesControl;
442
+ }
443
+ });
442
444
  Object.defineProperty(exports, 'HColorSwatchesShowMore', {
443
445
  enumerable: true,
444
446
  get: function () {
@@ -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;"}
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;"}
@@ -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)
@@ -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;"}
@@ -4,18 +4,20 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
4
4
  multiple: boolean;
5
5
  numberOfVisibleColors: number;
6
6
  selectedColors: HColorItem[];
7
+ private _$colors;
8
+ selectColors($colors: HColorItem[] | HColorItem): void;
9
+ clearAllColors(): void;
7
10
  connectedCallback(): void;
8
11
  private _addCssClasses;
9
12
  private _hideItems;
10
13
  private _showAllItemsEvent;
11
14
  private _setupEvents;
12
15
  private _handleColorClicked;
16
+ private _toggleColorItem;
13
17
  private _handleColorClickedForMultipleMode;
14
18
  private _handleColorClickedForSingleMode;
15
19
  private _toggleSelectedAttribute;
16
20
  private _isColorAlreadyExistInArray;
17
21
  private _removeExistingColorFromArray;
18
- private _dispatchColorSelectEvent;
19
- private _setColorsDispatchValue;
20
- private _getOnlyColorValues;
22
+ private _dispatchColorChangeEvent;
21
23
  }
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
- import { property, state } from 'lit/decorators';
2
+ import { property } from 'lit/decorators';
3
+ import { ArrayUtils } from '@dreamcommerce/utilities';
3
4
  import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
4
5
  import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
5
6
  import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE } from './color_swatches_constants.js';
@@ -13,24 +14,45 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
13
14
  this.selectedColors = [];
14
15
  this._handleColorClicked = ({ target }) => {
15
16
  const $colorItem = target;
16
- this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
17
+ this._toggleColorItem($colorItem);
17
18
  };
18
- this._dispatchColorSelectEvent = () => {
19
- const detail = {
20
- colors: this._setColorsDispatchValue(this.selectedColors)
21
- };
22
- this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.selected, {
19
+ this._dispatchColorChangeEvent = () => {
20
+ const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
21
+ return {
22
+ colors: [...colorsSoFar, color.color],
23
+ values: [...colorsSoFar, color.value]
24
+ };
25
+ }, {
26
+ colors: [],
27
+ values: []
28
+ });
29
+ this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.change, {
23
30
  bubbles: true,
24
31
  detail
25
32
  }));
26
33
  };
27
34
  }
35
+ selectColors($colors) {
36
+ const colorsArr = ArrayUtils.makeAsArray($colors);
37
+ if (!colorsArr.length) {
38
+ this.clearAllColors();
39
+ return;
40
+ }
41
+ colorsArr.forEach(($color) => this._toggleColorItem($color));
42
+ }
43
+ clearAllColors() {
44
+ [...this.selectedColors].forEach(($color) => {
45
+ this._toggleColorItem($color);
46
+ });
47
+ }
28
48
  connectedCallback() {
29
49
  super.connectedCallback();
30
50
  this._setupEvents();
31
51
  this._addCssClasses();
32
52
  this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
33
53
  this._showAllItemsEvent();
54
+ this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
55
+ this._$colors = [...this.querySelectorAll('h-color-item')];
34
56
  }
35
57
  _addCssClasses() {
36
58
  this.querySelectorAll(COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
@@ -55,12 +77,15 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
55
77
  _setupEvents() {
56
78
  this.addEventListener(COLOR_ITEM_EVENT_NAMES.selected, this._handleColorClicked);
57
79
  }
80
+ _toggleColorItem($colorItem) {
81
+ this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
82
+ }
58
83
  _handleColorClickedForMultipleMode($colorItem) {
59
84
  !this._isColorAlreadyExistInArray($colorItem)
60
85
  ? (this.selectedColors = [...this.selectedColors, $colorItem])
61
86
  : this._removeExistingColorFromArray($colorItem);
62
87
  this._toggleSelectedAttribute($colorItem);
63
- this._dispatchColorSelectEvent();
88
+ this._dispatchColorChangeEvent();
64
89
  }
65
90
  _handleColorClickedForSingleMode($colorItem) {
66
91
  const $previouslySelected = this.selectedColors[0];
@@ -68,7 +93,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
68
93
  if ($previouslySelected && $previouslySelected !== $colorItem)
69
94
  $previouslySelected.removeAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE);
70
95
  this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
71
- this._dispatchColorSelectEvent();
96
+ this._dispatchColorChangeEvent();
72
97
  }
73
98
  _toggleSelectedAttribute($colorItem) {
74
99
  $colorItem.hasAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE)
@@ -82,16 +107,6 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
82
107
  const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
83
108
  this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
84
109
  }
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
110
  };
96
111
  __decorate([
97
112
  property({ type: Boolean }),
@@ -102,7 +117,7 @@ __decorate([
102
117
  __metadata("design:type", Number)
103
118
  ], HColorSwatches.prototype, "numberOfVisibleColors", void 0);
104
119
  __decorate([
105
- state(),
120
+ property(),
106
121
  __metadata("design:type", Array)
107
122
  ], HColorSwatches.prototype, "selectedColors", void 0);
108
123
  HColorSwatches = __decorate([
@@ -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;"}
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;"}
@@ -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 selected: "colorSwatchesSelected";
9
+ readonly change: "change";
10
10
  readonly markDisabledItems: "markDisabledItems";
11
11
  };
12
12
  export declare const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = "hidden";
@@ -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
- selected: 'colorSwatchesSelected',
11
+ change: 'change',
12
12
  markDisabledItems: 'markDisabledItems'
13
13
  };
14
14
  const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
@@ -1,3 +1,4 @@
1
- export interface IColorSelectValue {
2
- colors: string | string[] | undefined;
3
- }
1
+ export declare type TSelectedColorsObject = {
2
+ colors: string[];
3
+ values: string[];
4
+ };
@@ -7,7 +7,13 @@ export declare class HColorSwatchesControl extends PhoenixLightLitElement {
7
7
  required: boolean;
8
8
  error: boolean;
9
9
  selectedColors: string[];
10
+ selectColors(values: string[]): void;
11
+ clearAllColors(): void;
12
+ private _$colorSwatches;
10
13
  connectedCallback(): void;
14
+ private _getSelectedColors;
15
+ private _getAllColorItems;
16
+ private _getSelectedColorItems;
11
17
  private _setupEvents;
12
18
  protected render(): TemplateResult | void;
13
19
  }
@@ -1,12 +1,11 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
2
  import { html } from 'lit';
3
- import { property, state } from 'lit/decorators';
4
- import { ArrayUtils } from '@dreamcommerce/utilities';
3
+ import { property } from 'lit/decorators';
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 {
@@ -14,6 +13,18 @@ let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitE
14
13
  super(...arguments);
15
14
  this.selectedColors = [];
16
15
  }
16
+ selectColors(values) {
17
+ if (!this._$colorSwatches)
18
+ return;
19
+ const $colors = values === null || values === void 0 ? void 0 : values.map((value) => this.querySelector(`h-color-item[value="${value}"]`)).filter(($color) => $color);
20
+ this._$colorSwatches.selectColors($colors);
21
+ this.requestUpdate();
22
+ }
23
+ clearAllColors() {
24
+ var _a;
25
+ (_a = this._$colorSwatches) === null || _a === void 0 ? void 0 : _a.clearAllColors();
26
+ this.requestUpdate();
27
+ }
17
28
  connectedCallback() {
18
29
  super.connectedCallback();
19
30
  this._setupEvents();
@@ -22,13 +33,28 @@ let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitE
22
33
  [COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlDisabled]: this.disabled,
23
34
  [COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlError]: this.error
24
35
  });
36
+ this._$colorSwatches = this.querySelector('h-color-swatches');
25
37
  if (cssClasses)
26
38
  this.classList.add(cssClasses);
39
+ this._getSelectedColors();
40
+ }
41
+ _getSelectedColors() {
42
+ this.selectedColors = this._getSelectedColorItems().map((selectedColor) => { var _a; return (_a = selectedColor.value) !== null && _a !== void 0 ? _a : selectedColor.color; });
43
+ }
44
+ _getAllColorItems() {
45
+ return [...this.querySelectorAll('h-color-item[selected]')];
46
+ }
47
+ _getSelectedColorItems() {
48
+ return this._getAllColorItems().filter(($color) => $color.selected);
27
49
  }
28
50
  _setupEvents() {
29
- this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.selected, (event) => {
30
- const eventValue = event.detail.colors;
31
- this.selectedColors = eventValue ? ArrayUtils.makeAsArray(eventValue) : [];
51
+ this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.change, (event) => {
52
+ event.preventDefault();
53
+ this.selectedColors = event.detail.values;
54
+ this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
55
+ bubbles: true,
56
+ detail: event.detail
57
+ }));
32
58
  });
33
59
  }
34
60
  render() {
@@ -44,7 +70,7 @@ __decorate([
44
70
  __metadata("design:type", String)
45
71
  ], HColorSwatchesControl.prototype, "controlId", void 0);
46
72
  __decorate([
47
- property({ type: String }),
73
+ property({ type: String, attribute: 'control-name' }),
48
74
  __metadata("design:type", String)
49
75
  ], HColorSwatchesControl.prototype, "controlName", void 0);
50
76
  __decorate([
@@ -60,7 +86,7 @@ __decorate([
60
86
  __metadata("design:type", Boolean)
61
87
  ], HColorSwatchesControl.prototype, "error", void 0);
62
88
  __decorate([
63
- state(),
89
+ property(),
64
90
  __metadata("design:type", Array)
65
91
  ], HColorSwatchesControl.prototype, "selectedColors", void 0);
66
92
  HColorSwatchesControl = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;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;"}
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;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: "colorSwatchesControl.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: 'colorSwatchesControl.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;"}
@@ -15,6 +15,10 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.type = INPUT_CONTROL_TYPES.file;
18
+ this.labelText = 'Wgraj plik';
19
+ this.labelIconName = 'icon-upload';
20
+ this.removeButtonText = 'Usuń plik';
21
+ this.removeButtonIconName = 'icon-x';
18
22
  this._$fileInputRef = createRef();
19
23
  this._handleChangeEvent = (event) => {
20
24
  const filesList = this._getFiles(event);
@@ -59,6 +63,7 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
59
63
  super.connectedCallback();
60
64
  this._addEventListeners();
61
65
  const cssClasses = classnames({
66
+ [FILE_PICKER_CONTROL_CSS_CLASSES.filePicker]: true,
62
67
  [FILE_PICKER_CONTROL_CSS_CLASSES.filePickerDisabled]: this.disabled,
63
68
  [FILE_PICKER_CONTROL_CSS_CLASSES.filePickerRequired]: this.required,
64
69
  [FILE_PICKER_CONTROL_CSS_CLASSES.filePickerError]: this.error
@@ -91,7 +96,7 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
91
96
  />`
92
97
  : nothing}
93
98
  ${((_b = this._file) === null || _b === void 0 ? void 0 : _b.name)
94
- ? html `<h-file
99
+ ? html ` <h-file
95
100
  name="${this._file.name}"
96
101
  id="${this._file.id}"
97
102
  remove-button-text="${this.removeButtonText}"
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA,eAAe,wDAA4D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,0CAA8C;AACrE;AACA,eAAe,wDAA4D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -42,6 +42,7 @@ export declare class HSelect extends PhoenixLightLitElement {
42
42
  private _handleOptionDeselect;
43
43
  private _updateOptionsView;
44
44
  private _appendNewHTMLOption;
45
+ updateOptionAriaAttribute($option: HOption): void;
45
46
  private _removeHTMLOptions;
46
47
  private _handleOptionClicked;
47
48
  private _selectOption;
@@ -71,7 +71,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
71
71
  SelectControlUtils.syncHTMLOptionWithModel(option, $option);
72
72
  if (!selected)
73
73
  return;
74
- $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
74
+ this.updateOptionAriaAttribute($option);
75
75
  });
76
76
  };
77
77
  this._handleOptionClicked = (event) => {
@@ -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();
@@ -115,11 +117,8 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
115
117
  }
116
118
  set selectedIndex(index) {
117
119
  const option = Object.values(this._$options)[index];
118
- if (!option) {
119
- this._selectController.deselectAll();
120
- return;
121
- }
122
- this._selectOption(option.value);
120
+ option ? this._selectOption(option.value) : this._selectController.deselectAll();
121
+ Object.values(this._$options).forEach(($option) => this.updateOptionAriaAttribute($option));
123
122
  }
124
123
  get selectedOptions() {
125
124
  var _a;
@@ -206,10 +205,15 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
206
205
  const { value, selected } = option;
207
206
  const $option = SelectControlUtils.createHTMLOption(option);
208
207
  if (selected)
209
- $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
208
+ this.updateOptionAriaAttribute($option);
210
209
  this._$options[value] = $option;
211
210
  SelectControlUtils.appendHTMLOption($option, $list, position);
212
211
  }
212
+ updateOptionAriaAttribute($option) {
213
+ !$option.selected
214
+ ? $option.removeAttribute(this.multiple ? 'aria-checked' : 'aria-selected')
215
+ : $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
216
+ }
213
217
  _removeHTMLOptions(optionsValues) {
214
218
  this._$options = SelectControlUtils.removeHTMLOptions(Object.values(this._$options), optionsValues);
215
219
  }
@@ -242,6 +246,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
242
246
  disconnectedCallback() {
243
247
  super.disconnectedCallback();
244
248
  this._selectController.options$.unsubscribe(this._optionsObserver);
249
+ this._$options = {};
245
250
  window.removeEventListener('resize', this._handleResize);
246
251
  }
247
252
  _getDropdownContentWidth() {
@@ -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;AACA;AACA;AACA;"}
@@ -1,5 +1,8 @@
1
- import { Options, Splide } from '@splidejs/splide';
2
- export interface ISlider extends Splide {
1
+ import { Options } from '@splidejs/splide';
2
+ export interface ISlider {
3
+ mount(): void;
4
+ sync(slider: ISlider): this;
5
+ go(control: number | string): this;
3
6
  }
4
7
  export interface ISliderOptions extends Options {
5
8
  mountOnConnectedCallback: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,OAAgC,kBAAkB,CAAC"}
1
+ {"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,OAAwB,kBAAkB,CAAC"}
@@ -77,6 +77,8 @@ export { HColorSwatchesControl } from './components/form/color_swatches_control/
77
77
  export { HColorSwatches } from './components/color_swatches/color_swatches';
78
78
  export { HColorItem } from './components/color_swatches/color_item/color_item';
79
79
  export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more';
80
+ export { TSelectedColorsObject } from "./components/color_swatches/color_swatches_types";
81
+ export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from "./components/form/color_swatches_control/color_swatches_control_constants";
80
82
  export { VisibilityController } from './controllers/visibility_controller/visibility_controller';
81
83
  export * from './controllers/visibility_controller/visibility_controller_types';
82
84
  export { HSlider } from './components/slider/slider';
@@ -65,9 +65,10 @@ 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';
68
+ export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from './components/form/color_swatches_control/color_swatches_control_constants.js';
69
69
  export { HColorItem } from './components/color_swatches/color_item/color_item.js';
70
70
  export { HColorSwatches } from './components/color_swatches/color_swatches.js';
71
+ export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
71
72
  export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more.js';
72
73
  export { VisibilityController } from './controllers/visibility_controller/visibility_controller.js';
73
74
  export { HSlider } from './components/slider/slider.js';
@@ -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;"}
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;"}
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.2.12",
5
+ "version": "1.2.13-1",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",