@shoper/phoenix_design_system 1.2.13-9 → 1.2.14

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 (72) hide show
  1. package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js +6 -7
  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_item/color_item_constants.js +12 -0
  4. package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +21 -4
  6. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +0 -3
  8. package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/form/radio/radio_constants.js +9 -1
  10. package/build/cjs/packages/phoenix/src/components/form/radio/radio_constants.js.map +1 -1
  11. package/build/cjs/packages/phoenix/src/components/form/select/components/option/select_option.js +18 -6
  12. package/build/cjs/packages/phoenix/src/components/form/select/components/option/select_option.js.map +1 -1
  13. package/build/cjs/packages/phoenix/src/components/form/select/components/select_components_constatns.js +4 -2
  14. package/build/cjs/packages/phoenix/src/components/form/select/components/select_components_constatns.js.map +1 -1
  15. package/build/cjs/packages/phoenix/src/components/form/select/components/select_options.js +9 -2
  16. package/build/cjs/packages/phoenix/src/components/form/select/components/select_options.js.map +1 -1
  17. package/build/cjs/packages/phoenix/src/components/form/select/controllers/base_select_controller.js +11 -1
  18. package/build/cjs/packages/phoenix/src/components/form/select/controllers/base_select_controller.js.map +1 -1
  19. package/build/cjs/packages/phoenix/src/components/form/select/model/select_option.js +2 -1
  20. package/build/cjs/packages/phoenix/src/components/form/select/model/select_option.js.map +1 -1
  21. package/build/cjs/packages/phoenix/src/components/form/select/model/select_option_mapper.js +1 -0
  22. package/build/cjs/packages/phoenix/src/components/form/select/model/select_option_mapper.js.map +1 -1
  23. package/build/cjs/packages/phoenix/src/components/form/select/select.js +11 -1
  24. package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
  25. package/build/cjs/packages/phoenix/src/index.js +1 -0
  26. package/build/cjs/packages/phoenix/src/index.js.map +1 -1
  27. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.d.ts +2 -1
  28. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js +7 -8
  29. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
  30. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.d.ts +9 -0
  31. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js +11 -1
  32. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js.map +1 -1
  33. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_types.d.ts +3 -5
  34. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_types.js +2 -1
  35. package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_types.js.map +1 -1
  36. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +3 -0
  37. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +21 -4
  38. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
  39. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +0 -2
  40. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +0 -3
  41. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
  42. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.d.ts +4 -0
  43. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.js +1 -1
  44. package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.js.map +1 -1
  45. package/build/esm/packages/phoenix/src/components/form/radio/radio_constants.d.ts +6 -0
  46. package/build/esm/packages/phoenix/src/components/form/radio/radio_constants.js +9 -2
  47. package/build/esm/packages/phoenix/src/components/form/radio/radio_constants.js.map +1 -1
  48. package/build/esm/packages/phoenix/src/components/form/select/components/option/select_option.d.ts +3 -0
  49. package/build/esm/packages/phoenix/src/components/form/select/components/option/select_option.js +18 -6
  50. package/build/esm/packages/phoenix/src/components/form/select/components/option/select_option.js.map +1 -1
  51. package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.d.ts +2 -0
  52. package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.js +4 -2
  53. package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.js.map +1 -1
  54. package/build/esm/packages/phoenix/src/components/form/select/components/select_options.d.ts +2 -0
  55. package/build/esm/packages/phoenix/src/components/form/select/components/select_options.js +9 -2
  56. package/build/esm/packages/phoenix/src/components/form/select/components/select_options.js.map +1 -1
  57. package/build/esm/packages/phoenix/src/components/form/select/controllers/base_select_controller.d.ts +1 -0
  58. package/build/esm/packages/phoenix/src/components/form/select/controllers/base_select_controller.js +11 -1
  59. package/build/esm/packages/phoenix/src/components/form/select/controllers/base_select_controller.js.map +1 -1
  60. package/build/esm/packages/phoenix/src/components/form/select/controllers/select_controllers_types.d.ts +1 -0
  61. package/build/esm/packages/phoenix/src/components/form/select/model/select_option.d.ts +1 -0
  62. package/build/esm/packages/phoenix/src/components/form/select/model/select_option.js +2 -1
  63. package/build/esm/packages/phoenix/src/components/form/select/model/select_option.js.map +1 -1
  64. package/build/esm/packages/phoenix/src/components/form/select/model/select_option_constants.d.ts +1 -0
  65. package/build/esm/packages/phoenix/src/components/form/select/model/select_option_mapper.js +1 -0
  66. package/build/esm/packages/phoenix/src/components/form/select/model/select_option_mapper.js.map +1 -1
  67. package/build/esm/packages/phoenix/src/components/form/select/select.d.ts +1 -0
  68. package/build/esm/packages/phoenix/src/components/form/select/select.js +11 -1
  69. package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
  70. package/build/esm/packages/phoenix/src/index.d.ts +2 -1
  71. package/build/esm/packages/phoenix/src/index.js +1 -1
  72. package/package.json +1 -1
@@ -8,7 +8,6 @@ var utilities = require('@dreamcommerce/utilities');
8
8
  var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
9
9
  var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
10
10
  var btn_controller = require('../../../controllers/btn_controller/btn_controller.js');
11
- var color_swatches_constants = require('../color_swatches_constants.js');
12
11
  var color_item_constants = require('./color_item_constants.js');
13
12
 
14
13
  exports.HColorItem = class HColorItem extends phoenix_light_lit_element.PhoenixLightLitElement {
@@ -16,7 +15,6 @@ exports.HColorItem = class HColorItem extends phoenix_light_lit_element.PhoenixL
16
15
  super();
17
16
  this.disabled = false;
18
17
  this.selected = false;
19
- this.small = false;
20
18
  this.unclickable = false;
21
19
  this._dispatchClickedEvent = () => {
22
20
  this.dispatchEvent(new Event(color_item_constants.COLOR_ITEM_EVENT_NAMES.selected, {
@@ -32,10 +30,11 @@ exports.HColorItem = class HColorItem extends phoenix_light_lit_element.PhoenixL
32
30
  this._syncAriaPressed();
33
31
  this.setAttribute('aria-label', this.label ? this.label : this.color);
34
32
  this.unclickable && this.removeAttribute('tabindex');
35
- this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItem);
33
+ this.classList.add(color_item_constants.COLOR_ITEM_CSS_CLASSES.colorItem);
36
34
  if (!this.value)
37
35
  this.value = this.color;
38
- this.small && this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
36
+ if (this.size)
37
+ this.classList.add(color_item_constants.COLOR_ITEM_CSS_CLASSES[this.size]);
39
38
  }
40
39
  attributeChangedCallback(name, value, newValue) {
41
40
  super.attributeChangedCallback(name, value, newValue);
@@ -77,9 +76,9 @@ tslib_es6.__decorate([
77
76
  tslib_es6.__metadata("design:type", Boolean)
78
77
  ], exports.HColorItem.prototype, "selected", void 0);
79
78
  tslib_es6.__decorate([
80
- decorators.property({ type: Boolean }),
81
- tslib_es6.__metadata("design:type", Boolean)
82
- ], exports.HColorItem.prototype, "small", void 0);
79
+ decorators.property({ type: String }),
80
+ tslib_es6.__metadata("design:type", String)
81
+ ], exports.HColorItem.prototype, "size", void 0);
83
82
  tslib_es6.__decorate([
84
83
  decorators.property({ type: Boolean }),
85
84
  tslib_es6.__metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
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;"}
@@ -2,11 +2,23 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ const colorItemBaseCssClass = 'color-item';
5
6
  const COLOR_ITEM_EVENT_NAMES = {
6
7
  selected: 'colorItemSelected'
7
8
  };
9
+ const COLOR_ITEM_SIZES = {
10
+ s: 's',
11
+ xs: 'xs'
12
+ };
13
+ const COLOR_ITEM_CSS_CLASSES = {
14
+ colorItem: colorItemBaseCssClass,
15
+ [COLOR_ITEM_SIZES.s]: `${colorItemBaseCssClass}_s`,
16
+ [COLOR_ITEM_SIZES.xs]: `${colorItemBaseCssClass}_xs`
17
+ };
8
18
  const COLOR_ITEM_SELECTED_ATTRIBUTE = 'selected';
9
19
 
20
+ exports.COLOR_ITEM_CSS_CLASSES = COLOR_ITEM_CSS_CLASSES;
10
21
  exports.COLOR_ITEM_EVENT_NAMES = COLOR_ITEM_EVENT_NAMES;
11
22
  exports.COLOR_ITEM_SELECTED_ATTRIBUTE = COLOR_ITEM_SELECTED_ATTRIBUTE;
23
+ exports.COLOR_ITEM_SIZES = COLOR_ITEM_SIZES;
12
24
  //# sourceMappingURL=color_item_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;"}
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;"}
@@ -3,10 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
6
+ var lit = require('lit');
6
7
  var decorators = require('lit/decorators');
7
8
  var utilities = require('@dreamcommerce/utilities');
8
9
  var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
9
10
  var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
11
+ require('lit-html');
10
12
  var color_swatches_constants = require('./color_swatches_constants.js');
11
13
  var color_item_constants = require('./color_item/color_item_constants.js');
12
14
  var show_more_constants = require('./show-more/show_more_constants.js');
@@ -16,13 +18,14 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
16
18
  super(...arguments);
17
19
  this.multiple = false;
18
20
  this.selectedColors = [];
21
+ this.showMoreBtnText = 'Pokaż wszystkie kolory';
19
22
  this._handleColorClicked = ({ target }) => {
20
23
  const $colorItem = target;
21
24
  this._toggleColorItem($colorItem);
22
- this._dispatchColorChangeEvent();
25
+ this._dispatchColorChangeEvent($colorItem);
23
26
  };
24
- this._dispatchColorChangeEvent = () => {
25
- const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
27
+ this._dispatchColorChangeEvent = ($colorItem) => {
28
+ const colorsDetails = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
26
29
  return {
27
30
  colors: [...colorsSoFar, color.color],
28
31
  values: [...colorsSoFar, color.value]
@@ -33,7 +36,10 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
33
36
  });
34
37
  this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, {
35
38
  bubbles: true,
36
- detail
39
+ detail: {
40
+ ...colorsDetails,
41
+ $colorItem
42
+ }
37
43
  }));
38
44
  };
39
45
  }
@@ -110,6 +116,13 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
110
116
  const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
111
117
  this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
112
118
  }
119
+ render() {
120
+ return lit.html `
121
+ ${this.getSlot('default')}
122
+ ${this._$colors.length > this.numberOfVisibleColors &&
123
+ lit.html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`}
124
+ `;
125
+ }
113
126
  };
114
127
  tslib_es6.__decorate([
115
128
  decorators.property({ type: Boolean }),
@@ -123,6 +136,10 @@ tslib_es6.__decorate([
123
136
  decorators.property(),
124
137
  tslib_es6.__metadata("design:type", Array)
125
138
  ], exports.HColorSwatches.prototype, "selectedColors", void 0);
139
+ tslib_es6.__decorate([
140
+ decorators.property({ type: String, attribute: 'show-more-btn-text' }),
141
+ tslib_es6.__metadata("design:type", Object)
142
+ ], exports.HColorSwatches.prototype, "showMoreBtnText", void 0);
126
143
  exports.HColorSwatches = tslib_es6.__decorate([
127
144
  phoenix_custom_element.phoenixCustomElement('h-color-swatches')
128
145
  ], exports.HColorSwatches);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -3,11 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const colorSwatchesBaseCssClass = 'color-swatches';
6
- const colorItemBaseCssClass = 'color-item';
7
6
  const COLOR_ITEM_TAG_NAME = 'h-color-item';
8
7
  const COLOR_SWATCHES_CSS_CLASSES = {
9
- colorItem: colorItemBaseCssClass,
10
- colorItemSmall: `${colorItemBaseCssClass}_small`,
11
8
  colorSwatches: colorSwatchesBaseCssClass,
12
9
  colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
13
10
  };
@@ -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;"}
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;"}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const baseRadioControlClass = 'radio';
6
+ const baseRadioBoxControlClass = 'radio-box';
6
7
  const RADIO_CONTROL_CSS_CLASSES = {
7
8
  radio: baseRadioControlClass,
8
9
  radioError: `${baseRadioControlClass}_error`,
@@ -12,7 +13,13 @@ const RADIO_CONTROL_CSS_CLASSES = {
12
13
  radioDescription: `${baseRadioControlClass}__description`,
13
14
  radioControl: `${baseRadioControlClass}__control`,
14
15
  radioInput: `${baseRadioControlClass}__input`,
15
- radioLabel: `${baseRadioControlClass}__label`
16
+ radioLabel: `${baseRadioControlClass}__label`,
17
+ radioBox: baseRadioBoxControlClass,
18
+ radioBoxDisabled: `${baseRadioBoxControlClass}_disabled`
19
+ };
20
+ const RADIO_CONTROL_VARIANTS = {
21
+ classic: 'classic',
22
+ box: 'box'
16
23
  };
17
24
  const RADIO_SLOTS = {
18
25
  label: 'label',
@@ -24,5 +31,6 @@ const RADIO_CONTROL_EVENTS = {
24
31
 
25
32
  exports.RADIO_CONTROL_CSS_CLASSES = RADIO_CONTROL_CSS_CLASSES;
26
33
  exports.RADIO_CONTROL_EVENTS = RADIO_CONTROL_EVENTS;
34
+ exports.RADIO_CONTROL_VARIANTS = RADIO_CONTROL_VARIANTS;
27
35
  exports.RADIO_SLOTS = RADIO_SLOTS;
28
36
  //# sourceMappingURL=radio_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
@@ -17,12 +17,7 @@ exports.HOption = class HOption extends phoenix_light_lit_element.PhoenixLightLi
17
17
  this._dispatchClickedEvent = () => {
18
18
  if (this.disabled && !this.clickable)
19
19
  return;
20
- this.dispatchEvent(new CustomEvent(select_components_constatns.SELECT_OPTION_EVENT_NAMES.clicked, {
21
- bubbles: true,
22
- detail: {
23
- $option: this
24
- }
25
- }));
20
+ this._dispatchEvent(select_components_constatns.SELECT_OPTION_EVENT_NAMES.clicked);
26
21
  };
27
22
  }
28
23
  connectedCallback() {
@@ -42,6 +37,19 @@ exports.HOption = class HOption extends phoenix_light_lit_element.PhoenixLightLi
42
37
  super.updated(changedProperties);
43
38
  if (changedProperties.has('selected'))
44
39
  this.selected ? this._addSelectedIcon() : this._removeSelectedIcon();
40
+ if (changedProperties.has('inactive') || changedProperties.has('hidden') || changedProperties.has('disabled'))
41
+ this._dispatchSelectUpdated();
42
+ }
43
+ _dispatchSelectUpdated() {
44
+ this._dispatchEvent(select_components_constatns.SELECT_OPTION_EVENT_NAMES.updated);
45
+ }
46
+ _dispatchEvent(eventName) {
47
+ this.dispatchEvent(new CustomEvent(eventName, {
48
+ bubbles: true,
49
+ detail: {
50
+ $option: this
51
+ }
52
+ }));
45
53
  }
46
54
  _addSelectedIcon() {
47
55
  this._$checkedIcon = document.createElement('h-icon');
@@ -70,6 +78,10 @@ tslib_es6.__decorate([
70
78
  decorators_js.property({ type: Boolean, reflect: true }),
71
79
  tslib_es6.__metadata("design:type", Boolean)
72
80
  ], exports.HOption.prototype, "hidden", void 0);
81
+ tslib_es6.__decorate([
82
+ decorators_js.property({ type: Boolean, reflect: true }),
83
+ tslib_es6.__metadata("design:type", Boolean)
84
+ ], exports.HOption.prototype, "inactive", void 0);
73
85
  tslib_es6.__decorate([
74
86
  decorators_js.property({ type: Boolean, reflect: true }),
75
87
  tslib_es6.__metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,10 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const SELECT_OPTION_EVENT_NAMES = {
6
- clicked: 'selectOption.clicked'
6
+ clicked: 'selectOption.clicked',
7
+ updated: 'selectOption.updated'
7
8
  };
8
9
  const SELECT_OPTIONS_EVENT_NAMES = {
9
- clicked: 'selectOptions.clicked'
10
+ clicked: 'selectOptions.clicked',
11
+ updated: 'selectOptions.updated'
10
12
  };
11
13
  const SELECT_SEARCH_EVENT_NAMES = {
12
14
  search: 'selectSearch.search'
@@ -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;"}
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;"}
@@ -12,16 +12,23 @@ exports.HOptions = class HOptions extends phoenix_light_lit_element.PhoenixLight
12
12
  constructor() {
13
13
  super();
14
14
  this._dispatchClickedEvent = ({ detail }) => {
15
- this.dispatchEvent(new CustomEvent(select_components_constatns.SELECT_OPTIONS_EVENT_NAMES.clicked, {
15
+ this._dispatchEvent(select_components_constatns.SELECT_OPTIONS_EVENT_NAMES.clicked, detail.$option);
16
+ };
17
+ this._dispatchUpdatedEvent = ({ detail }) => {
18
+ this._dispatchEvent(select_components_constatns.SELECT_OPTIONS_EVENT_NAMES.updated, detail.$option);
19
+ };
20
+ this._dispatchEvent = (eventName, $option) => {
21
+ this.dispatchEvent(new CustomEvent(eventName, {
16
22
  bubbles: true,
17
23
  detail: {
18
- $option: detail.$option
24
+ $option
19
25
  }
20
26
  }));
21
27
  };
22
28
  this.setAttribute('role', 'listbox');
23
29
  utilities.UiDomUtils.makeNavigable(this);
24
30
  this.addEventListener(select_components_constatns.SELECT_OPTION_EVENT_NAMES.clicked, this._dispatchClickedEvent);
31
+ this.addEventListener(select_components_constatns.SELECT_OPTION_EVENT_NAMES.updated, this._dispatchUpdatedEvent);
25
32
  }
26
33
  };
27
34
  exports.HOptions = tslib_es6.__decorate([
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;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,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -63,8 +63,18 @@ class BaseSelectController {
63
63
  this.selectedOptions$.notify([]);
64
64
  this.requestUpdate();
65
65
  }
66
+ updateOption(value, newOptions) {
67
+ const option = this.getOption(value);
68
+ if (!option)
69
+ return;
70
+ Object.entries(newOptions).forEach(([key, value]) => {
71
+ option[key] = value;
72
+ });
73
+ this.requestUpdate();
74
+ }
66
75
  filter(value) {
67
- const selectOptions = this.options$.getValue();
76
+ var _a;
77
+ const selectOptions = (_a = this.options$.getValue()) === null || _a === void 0 ? void 0 : _a.filter((option) => !option.inactive);
68
78
  if (!selectOptions)
69
79
  return;
70
80
  const filtered = utilities.SearchingUtils.fuzzySearch(value, selectOptions, 'content');
@@ -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;"}
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;"}
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  class SelectOption {
6
- constructor({ selected = false, hidden = false, disabled = false, value, content }) {
6
+ constructor({ selected = false, hidden = false, disabled = false, value, content, inactive = false }) {
7
7
  this.value = value;
8
8
  this.selected = selected;
9
9
  this.hidden = hidden;
10
10
  this.disabled = disabled;
11
11
  this.content = content;
12
+ this.inactive = inactive;
12
13
  }
13
14
  static create(options) {
14
15
  return new SelectOption(options);
@@ -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;"}
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;"}
@@ -15,6 +15,7 @@ class SelectOptionMapper {
15
15
  value: $option.value,
16
16
  disabled: $option.disabled,
17
17
  hidden: $option.hidden,
18
+ inactive: $option.inactive,
18
19
  content: optionContent,
19
20
  selected: $option.selected
20
21
  });
@@ -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;"}
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;"}
@@ -53,7 +53,9 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
53
53
  this._updateOptionsView = (options) => {
54
54
  if (options.length < Object.keys(this._$options).length)
55
55
  this._removeHTMLOptions(options.map((option) => option.value));
56
- options.forEach((option, index) => {
56
+ options
57
+ .filter((option) => !option.inactive)
58
+ .forEach((option, index) => {
57
59
  const { selected, value } = option;
58
60
  const $option = this._$options[value];
59
61
  if (!$option) {
@@ -69,6 +71,13 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
69
71
  this._handleOptionClicked = (event) => {
70
72
  this._selectOption(event.detail.$option.value);
71
73
  };
74
+ this._handleOptionUpdated = ({ detail }) => {
75
+ const $option = detail.$option;
76
+ this._selectController.updateOption($option.value, {
77
+ inactive: $option.inactive,
78
+ hidden: $option.hidden
79
+ });
80
+ };
72
81
  this._handleDropdownHidden = () => {
73
82
  this._searchValue = '';
74
83
  this.opened = false;
@@ -284,6 +293,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
284
293
  : ''}"
285
294
  ${ref_js.ref(this._$optionsList)}
286
295
  @selectOptions.clicked=${this._handleOptionClicked}
296
+ @selectOptions.updated=${this._handleOptionUpdated}
287
297
  >
288
298
  ${this.getSlot(select_constants.SELECT_SLOT_NAMES.content)}
289
299
  </h-options>
@@ -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,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;"}
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,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;"}
@@ -341,6 +341,7 @@ Object.defineProperty(exports, 'HSwitchControl', {
341
341
  });
342
342
  exports.RADIO_CONTROL_CSS_CLASSES = radio_constants.RADIO_CONTROL_CSS_CLASSES;
343
343
  exports.RADIO_CONTROL_EVENTS = radio_constants.RADIO_CONTROL_EVENTS;
344
+ exports.RADIO_CONTROL_VARIANTS = radio_constants.RADIO_CONTROL_VARIANTS;
344
345
  exports.RADIO_SLOTS = radio_constants.RADIO_SLOTS;
345
346
  Object.defineProperty(exports, 'HRadio', {
346
347
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,11 +1,12 @@
1
1
  import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
+ import type { TColorItemSize } from "./color_item_types";
2
3
  export declare class HColorItem extends PhoenixLightLitElement {
3
4
  color: string;
4
5
  value: string;
5
6
  label?: string;
6
7
  disabled: boolean;
7
8
  selected: boolean;
8
- small: boolean;
9
+ size?: TColorItemSize;
9
10
  unclickable: boolean;
10
11
  private _btnController;
11
12
  constructor();
@@ -4,15 +4,13 @@ import { ColorUtils } from '@dreamcommerce/utilities';
4
4
  import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
5
5
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
6
6
  import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
7
- import { COLOR_SWATCHES_CSS_CLASSES } from '../color_swatches_constants.js';
8
- import { COLOR_ITEM_EVENT_NAMES, COLOR_ITEM_SELECTED_ATTRIBUTE } from './color_item_constants.js';
7
+ import { COLOR_ITEM_EVENT_NAMES, COLOR_ITEM_CSS_CLASSES, COLOR_ITEM_SELECTED_ATTRIBUTE } from './color_item_constants.js';
9
8
 
10
9
  let HColorItem = class HColorItem extends PhoenixLightLitElement {
11
10
  constructor() {
12
11
  super();
13
12
  this.disabled = false;
14
13
  this.selected = false;
15
- this.small = false;
16
14
  this.unclickable = false;
17
15
  this._dispatchClickedEvent = () => {
18
16
  this.dispatchEvent(new Event(COLOR_ITEM_EVENT_NAMES.selected, {
@@ -28,10 +26,11 @@ let HColorItem = class HColorItem extends PhoenixLightLitElement {
28
26
  this._syncAriaPressed();
29
27
  this.setAttribute('aria-label', this.label ? this.label : this.color);
30
28
  this.unclickable && this.removeAttribute('tabindex');
31
- this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItem);
29
+ this.classList.add(COLOR_ITEM_CSS_CLASSES.colorItem);
32
30
  if (!this.value)
33
31
  this.value = this.color;
34
- this.small && this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
32
+ if (this.size)
33
+ this.classList.add(COLOR_ITEM_CSS_CLASSES[this.size]);
35
34
  }
36
35
  attributeChangedCallback(name, value, newValue) {
37
36
  super.attributeChangedCallback(name, value, newValue);
@@ -73,9 +72,9 @@ __decorate([
73
72
  __metadata("design:type", Boolean)
74
73
  ], HColorItem.prototype, "selected", void 0);
75
74
  __decorate([
76
- property({ type: Boolean }),
77
- __metadata("design:type", Boolean)
78
- ], HColorItem.prototype, "small", void 0);
75
+ property({ type: String }),
76
+ __metadata("design:type", String)
77
+ ], HColorItem.prototype, "size", void 0);
79
78
  __decorate([
80
79
  property({ type: Boolean }),
81
80
  __metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
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;"}
@@ -1,4 +1,13 @@
1
1
  export declare const COLOR_ITEM_EVENT_NAMES: {
2
2
  readonly selected: "colorItemSelected";
3
3
  };
4
+ export declare const COLOR_ITEM_SIZES: {
5
+ readonly s: "s";
6
+ readonly xs: "xs";
7
+ };
8
+ export declare const COLOR_ITEM_CSS_CLASSES: {
9
+ readonly colorItem: "color-item";
10
+ readonly s: "color-item_s";
11
+ readonly xs: "color-item_xs";
12
+ };
4
13
  export declare const COLOR_ITEM_SELECTED_ATTRIBUTE = "selected";
@@ -1,7 +1,17 @@
1
+ const colorItemBaseCssClass = 'color-item';
1
2
  const COLOR_ITEM_EVENT_NAMES = {
2
3
  selected: 'colorItemSelected'
3
4
  };
5
+ const COLOR_ITEM_SIZES = {
6
+ s: 's',
7
+ xs: 'xs'
8
+ };
9
+ const COLOR_ITEM_CSS_CLASSES = {
10
+ colorItem: colorItemBaseCssClass,
11
+ [COLOR_ITEM_SIZES.s]: `${colorItemBaseCssClass}_s`,
12
+ [COLOR_ITEM_SIZES.xs]: `${colorItemBaseCssClass}_xs`
13
+ };
4
14
  const COLOR_ITEM_SELECTED_ATTRIBUTE = 'selected';
5
15
 
6
- export { COLOR_ITEM_EVENT_NAMES, COLOR_ITEM_SELECTED_ATTRIBUTE };
16
+ export { COLOR_ITEM_CSS_CLASSES, COLOR_ITEM_EVENT_NAMES, COLOR_ITEM_SELECTED_ATTRIBUTE, COLOR_ITEM_SIZES };
7
17
  //# sourceMappingURL=color_item_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,5 +1,3 @@
1
- export declare type TColorItemConstructorOptions = {
2
- color: string;
3
- label: string;
4
- disabled: boolean;
5
- };
1
+ import { Any } from 'ts-toolbelt';
2
+ import { COLOR_ITEM_SIZES } from "./color_item_constants";
3
+ export declare type TColorItemSize = Any.Keys<typeof COLOR_ITEM_SIZES>;
@@ -1,2 +1,3 @@
1
- export {};
1
+ import 'ts-toolbelt';
2
+ import '@phoenixRoot/components/color_swatches/color_item/color_item_constants';
2
3
  //# sourceMappingURL=color_item_types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color_item_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/color_swatches/color_item/color_item_types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"color_item_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/color_swatches/color_item/color_item_types.ts"],"names":[],"mappings":"AAAA,OAAoB,aAAa,CAAC;AAClC,OAAiC,wEAAwE,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { HColorItem } from "./color_item/color_item";
2
2
  import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
3
+ import { TemplateResult } from 'lit-html';
3
4
  export declare class HColorSwatches extends PhoenixLightLitElement {
4
5
  multiple: boolean;
5
6
  numberOfVisibleColors: number;
6
7
  selectedColors: HColorItem[];
8
+ showMoreBtnText: string;
7
9
  private _$colors;
8
10
  selectColors($colors: HColorItem[] | HColorItem): void;
9
11
  clearAllColors(): void;
@@ -20,4 +22,5 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
20
22
  private _isColorAlreadyExistInArray;
21
23
  private _removeExistingColorFromArray;
22
24
  private _dispatchColorChangeEvent;
25
+ protected render(): TemplateResult;
23
26
  }
@@ -1,8 +1,10 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
+ import { html } from 'lit';
2
3
  import { property } from 'lit/decorators';
3
4
  import { ArrayUtils } from '@dreamcommerce/utilities';
4
5
  import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
5
6
  import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
7
+ import 'lit-html';
6
8
  import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE } from './color_swatches_constants.js';
7
9
  import { COLOR_ITEM_EVENT_NAMES, COLOR_ITEM_SELECTED_ATTRIBUTE } from './color_item/color_item_constants.js';
8
10
  import { SHOW_MORE_EVENT_NAMES } from './show-more/show_more_constants.js';
@@ -12,13 +14,14 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
12
14
  super(...arguments);
13
15
  this.multiple = false;
14
16
  this.selectedColors = [];
17
+ this.showMoreBtnText = 'Pokaż wszystkie kolory';
15
18
  this._handleColorClicked = ({ target }) => {
16
19
  const $colorItem = target;
17
20
  this._toggleColorItem($colorItem);
18
- this._dispatchColorChangeEvent();
21
+ this._dispatchColorChangeEvent($colorItem);
19
22
  };
20
- this._dispatchColorChangeEvent = () => {
21
- const detail = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
23
+ this._dispatchColorChangeEvent = ($colorItem) => {
24
+ const colorsDetails = this.selectedColors.reduce(({ colors: colorsSoFar, values: valuesSoFar }, color) => {
22
25
  return {
23
26
  colors: [...colorsSoFar, color.color],
24
27
  values: [...colorsSoFar, color.value]
@@ -29,7 +32,10 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
29
32
  });
30
33
  this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.change, {
31
34
  bubbles: true,
32
- detail
35
+ detail: {
36
+ ...colorsDetails,
37
+ $colorItem
38
+ }
33
39
  }));
34
40
  };
35
41
  }
@@ -106,6 +112,13 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
106
112
  const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
107
113
  this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
108
114
  }
115
+ render() {
116
+ return html `
117
+ ${this.getSlot('default')}
118
+ ${this._$colors.length > this.numberOfVisibleColors &&
119
+ html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`}
120
+ `;
121
+ }
109
122
  };
110
123
  __decorate([
111
124
  property({ type: Boolean }),
@@ -119,6 +132,10 @@ __decorate([
119
132
  property(),
120
133
  __metadata("design:type", Array)
121
134
  ], HColorSwatches.prototype, "selectedColors", void 0);
135
+ __decorate([
136
+ property({ type: String, attribute: 'show-more-btn-text' }),
137
+ __metadata("design:type", Object)
138
+ ], HColorSwatches.prototype, "showMoreBtnText", void 0);
122
139
  HColorSwatches = __decorate([
123
140
  phoenixCustomElement('h-color-swatches')
124
141
  ], HColorSwatches);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,7 +1,5 @@
1
1
  export declare const COLOR_ITEM_TAG_NAME = "h-color-item";
2
2
  export declare const COLOR_SWATCHES_CSS_CLASSES: {
3
- readonly colorItem: "color-item";
4
- readonly colorItemSmall: "color-item_small";
5
3
  readonly colorSwatches: "color-swatches";
6
4
  readonly colorSwatchesItem: "color-swatches__color-item";
7
5
  };
@@ -1,9 +1,6 @@
1
1
  const colorSwatchesBaseCssClass = 'color-swatches';
2
- const colorItemBaseCssClass = 'color-item';
3
2
  const COLOR_ITEM_TAG_NAME = 'h-color-item';
4
3
  const COLOR_SWATCHES_CSS_CLASSES = {
5
- colorItem: colorItemBaseCssClass,
6
- colorItemSmall: `${colorItemBaseCssClass}_small`,
7
4
  colorSwatches: colorSwatchesBaseCssClass,
8
5
  colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
9
6
  };
@@ -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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,4 +1,8 @@
1
+ import { HColorItem } from "./color_item/color_item";
1
2
  export declare type TSelectedColorsObject = {
2
3
  colors: string[];
3
4
  values: string[];
4
5
  };
6
+ export declare type TColorSwatchesControlChangeEventDetail = TSelectedColorsObject & {
7
+ $colorItem: HColorItem;
8
+ };
@@ -1,2 +1,2 @@
1
- export {};
1
+ import '@phoenixRoot/components/color_swatches/color_item/color_item';
2
2
  //# sourceMappingURL=color_swatches_types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color_swatches_types.js","sourceRoot":"","sources":["../../../../../../../src/components/color_swatches/color_swatches_types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"color_swatches_types.js","sourceRoot":"","sources":["../../../../../../../src/components/color_swatches/color_swatches_types.ts"],"names":[],"mappings":"AAAA,OAA2B,8DAA8D,CAAC"}
@@ -8,6 +8,12 @@ export declare const RADIO_CONTROL_CSS_CLASSES: {
8
8
  readonly radioControl: "radio__control";
9
9
  readonly radioInput: "radio__input";
10
10
  readonly radioLabel: "radio__label";
11
+ readonly radioBox: "radio-box";
12
+ readonly radioBoxDisabled: "radio-box_disabled";
13
+ };
14
+ export declare const RADIO_CONTROL_VARIANTS: {
15
+ readonly classic: "classic";
16
+ readonly box: "box";
11
17
  };
12
18
  export declare const RADIO_SLOTS: {
13
19
  readonly label: "label";
@@ -1,4 +1,5 @@
1
1
  const baseRadioControlClass = 'radio';
2
+ const baseRadioBoxControlClass = 'radio-box';
2
3
  const RADIO_CONTROL_CSS_CLASSES = {
3
4
  radio: baseRadioControlClass,
4
5
  radioError: `${baseRadioControlClass}_error`,
@@ -8,7 +9,13 @@ const RADIO_CONTROL_CSS_CLASSES = {
8
9
  radioDescription: `${baseRadioControlClass}__description`,
9
10
  radioControl: `${baseRadioControlClass}__control`,
10
11
  radioInput: `${baseRadioControlClass}__input`,
11
- radioLabel: `${baseRadioControlClass}__label`
12
+ radioLabel: `${baseRadioControlClass}__label`,
13
+ radioBox: baseRadioBoxControlClass,
14
+ radioBoxDisabled: `${baseRadioBoxControlClass}_disabled`
15
+ };
16
+ const RADIO_CONTROL_VARIANTS = {
17
+ classic: 'classic',
18
+ box: 'box'
12
19
  };
13
20
  const RADIO_SLOTS = {
14
21
  label: 'label',
@@ -18,5 +25,5 @@ const RADIO_CONTROL_EVENTS = {
18
25
  change: 'change'
19
26
  };
20
27
 
21
- export { RADIO_CONTROL_CSS_CLASSES, RADIO_CONTROL_EVENTS, RADIO_SLOTS };
28
+ export { RADIO_CONTROL_CSS_CLASSES, RADIO_CONTROL_EVENTS, RADIO_CONTROL_VARIANTS, RADIO_SLOTS };
22
29
  //# sourceMappingURL=radio_constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
@@ -5,6 +5,7 @@ export declare class HOption extends PhoenixLightLitElement {
5
5
  selected: boolean;
6
6
  disabled: boolean;
7
7
  hidden: boolean;
8
+ inactive: boolean;
8
9
  clickable: boolean;
9
10
  private _btnController;
10
11
  private _$checkedIcon?;
@@ -12,6 +13,8 @@ export declare class HOption extends PhoenixLightLitElement {
12
13
  private _setupEvents;
13
14
  private _dispatchClickedEvent;
14
15
  updated(changedProperties: PropertyValues): void;
16
+ private _dispatchSelectUpdated;
17
+ private _dispatchEvent;
15
18
  private _addSelectedIcon;
16
19
  private _removeSelectedIcon;
17
20
  }
@@ -13,12 +13,7 @@ let HOption = class HOption extends PhoenixLightLitElement {
13
13
  this._dispatchClickedEvent = () => {
14
14
  if (this.disabled && !this.clickable)
15
15
  return;
16
- this.dispatchEvent(new CustomEvent(SELECT_OPTION_EVENT_NAMES.clicked, {
17
- bubbles: true,
18
- detail: {
19
- $option: this
20
- }
21
- }));
16
+ this._dispatchEvent(SELECT_OPTION_EVENT_NAMES.clicked);
22
17
  };
23
18
  }
24
19
  connectedCallback() {
@@ -38,6 +33,19 @@ let HOption = class HOption extends PhoenixLightLitElement {
38
33
  super.updated(changedProperties);
39
34
  if (changedProperties.has('selected'))
40
35
  this.selected ? this._addSelectedIcon() : this._removeSelectedIcon();
36
+ if (changedProperties.has('inactive') || changedProperties.has('hidden') || changedProperties.has('disabled'))
37
+ this._dispatchSelectUpdated();
38
+ }
39
+ _dispatchSelectUpdated() {
40
+ this._dispatchEvent(SELECT_OPTION_EVENT_NAMES.updated);
41
+ }
42
+ _dispatchEvent(eventName) {
43
+ this.dispatchEvent(new CustomEvent(eventName, {
44
+ bubbles: true,
45
+ detail: {
46
+ $option: this
47
+ }
48
+ }));
41
49
  }
42
50
  _addSelectedIcon() {
43
51
  this._$checkedIcon = document.createElement('h-icon');
@@ -66,6 +74,10 @@ __decorate([
66
74
  property({ type: Boolean, reflect: true }),
67
75
  __metadata("design:type", Boolean)
68
76
  ], HOption.prototype, "hidden", void 0);
77
+ __decorate([
78
+ property({ type: Boolean, reflect: true }),
79
+ __metadata("design:type", Boolean)
80
+ ], HOption.prototype, "inactive", void 0);
69
81
  __decorate([
70
82
  property({ type: Boolean, reflect: true }),
71
83
  __metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,8 +1,10 @@
1
1
  export declare const SELECT_OPTION_EVENT_NAMES: {
2
2
  readonly clicked: "selectOption.clicked";
3
+ readonly updated: "selectOption.updated";
3
4
  };
4
5
  export declare const SELECT_OPTIONS_EVENT_NAMES: {
5
6
  readonly clicked: "selectOptions.clicked";
7
+ readonly updated: "selectOptions.updated";
6
8
  };
7
9
  export declare const SELECT_SEARCH_EVENT_NAMES: {
8
10
  readonly search: "selectSearch.search";
@@ -1,8 +1,10 @@
1
1
  const SELECT_OPTION_EVENT_NAMES = {
2
- clicked: 'selectOption.clicked'
2
+ clicked: 'selectOption.clicked',
3
+ updated: 'selectOption.updated'
3
4
  };
4
5
  const SELECT_OPTIONS_EVENT_NAMES = {
5
- clicked: 'selectOptions.clicked'
6
+ clicked: 'selectOptions.clicked',
7
+ updated: 'selectOptions.updated'
6
8
  };
7
9
  const SELECT_SEARCH_EVENT_NAMES = {
8
10
  search: 'selectSearch.search'
@@ -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;"}
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;"}
@@ -2,4 +2,6 @@ import { PhoenixLightLitElement } from "../../../../core/phoenix_light_lit_eleme
2
2
  export declare class HOptions extends PhoenixLightLitElement {
3
3
  constructor();
4
4
  private _dispatchClickedEvent;
5
+ private _dispatchUpdatedEvent;
6
+ private _dispatchEvent;
5
7
  }
@@ -8,16 +8,23 @@ let HOptions = class HOptions extends PhoenixLightLitElement {
8
8
  constructor() {
9
9
  super();
10
10
  this._dispatchClickedEvent = ({ detail }) => {
11
- this.dispatchEvent(new CustomEvent(SELECT_OPTIONS_EVENT_NAMES.clicked, {
11
+ this._dispatchEvent(SELECT_OPTIONS_EVENT_NAMES.clicked, detail.$option);
12
+ };
13
+ this._dispatchUpdatedEvent = ({ detail }) => {
14
+ this._dispatchEvent(SELECT_OPTIONS_EVENT_NAMES.updated, detail.$option);
15
+ };
16
+ this._dispatchEvent = (eventName, $option) => {
17
+ this.dispatchEvent(new CustomEvent(eventName, {
12
18
  bubbles: true,
13
19
  detail: {
14
- $option: detail.$option
20
+ $option
15
21
  }
16
22
  }));
17
23
  };
18
24
  this.setAttribute('role', 'listbox');
19
25
  UiDomUtils.makeNavigable(this);
20
26
  this.addEventListener(SELECT_OPTION_EVENT_NAMES.clicked, this._dispatchClickedEvent);
27
+ this.addEventListener(SELECT_OPTION_EVENT_NAMES.updated, this._dispatchUpdatedEvent);
21
28
  }
22
29
  };
23
30
  HOptions = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,kDAAsD;AAC7F;AACA;AACA;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,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -20,6 +20,7 @@ export declare abstract class BaseSelectController implements ISelectController,
20
20
  replace(options: SelectOption[]): void;
21
21
  deselectAll(): void;
22
22
  deselect(option: SelectOption): void;
23
+ updateOption(value: string, newOptions: Partial<SelectOption>): void;
23
24
  filter(value: string): void;
24
25
  protected requestUpdate(): void;
25
26
  getOption(selectValue: string): SelectOption | undefined;
@@ -59,8 +59,18 @@ class BaseSelectController {
59
59
  this.selectedOptions$.notify([]);
60
60
  this.requestUpdate();
61
61
  }
62
+ updateOption(value, newOptions) {
63
+ const option = this.getOption(value);
64
+ if (!option)
65
+ return;
66
+ Object.entries(newOptions).forEach(([key, value]) => {
67
+ option[key] = value;
68
+ });
69
+ this.requestUpdate();
70
+ }
62
71
  filter(value) {
63
- const selectOptions = this.options$.getValue();
72
+ var _a;
73
+ const selectOptions = (_a = this.options$.getValue()) === null || _a === void 0 ? void 0 : _a.filter((option) => !option.inactive);
64
74
  if (!selectOptions)
65
75
  return;
66
76
  const filtered = SearchingUtils.fuzzySearch(value, selectOptions, 'content');
@@ -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;"}
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;"}
@@ -19,4 +19,5 @@ export interface ISelectController {
19
19
  remove(optionValue: string): void;
20
20
  add(option: SelectOption, position?: number): void;
21
21
  replace(options: SelectOption[]): void;
22
+ updateOption(value: string, newOptions: Partial<SelectOption>): void;
22
23
  }
@@ -3,6 +3,7 @@ export declare class SelectOption {
3
3
  selected: boolean;
4
4
  disabled: boolean;
5
5
  value: string;
6
+ inactive: boolean;
6
7
  hidden: boolean;
7
8
  content: string;
8
9
  private constructor();
@@ -1,10 +1,11 @@
1
1
  class SelectOption {
2
- constructor({ selected = false, hidden = false, disabled = false, value, content }) {
2
+ constructor({ selected = false, hidden = false, disabled = false, value, content, inactive = false }) {
3
3
  this.value = value;
4
4
  this.selected = selected;
5
5
  this.hidden = hidden;
6
6
  this.disabled = disabled;
7
7
  this.content = content;
8
+ this.inactive = inactive;
8
9
  }
9
10
  static create(options) {
10
11
  return new SelectOption(options);
@@ -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;"}
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;"}
@@ -4,4 +4,5 @@ export declare type TSelectOptionConstructorOptions = {
4
4
  selected?: boolean;
5
5
  disabled?: boolean;
6
6
  hidden?: boolean;
7
+ inactive?: boolean;
7
8
  };
@@ -11,6 +11,7 @@ class SelectOptionMapper {
11
11
  value: $option.value,
12
12
  disabled: $option.disabled,
13
13
  hidden: $option.hidden,
14
+ inactive: $option.inactive,
14
15
  content: optionContent,
15
16
  selected: $option.selected
16
17
  });
@@ -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;"}
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;"}
@@ -43,6 +43,7 @@ export declare class HSelect extends PhoenixLightLitElement {
43
43
  updateOptionAriaAttribute($option: HOption): void;
44
44
  private _removeHTMLOptions;
45
45
  private _handleOptionClicked;
46
+ private _handleOptionUpdated;
46
47
  private _selectOption;
47
48
  private _handleSearch;
48
49
  private _handleDropdownHidden;
@@ -49,7 +49,9 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
49
49
  this._updateOptionsView = (options) => {
50
50
  if (options.length < Object.keys(this._$options).length)
51
51
  this._removeHTMLOptions(options.map((option) => option.value));
52
- options.forEach((option, index) => {
52
+ options
53
+ .filter((option) => !option.inactive)
54
+ .forEach((option, index) => {
53
55
  const { selected, value } = option;
54
56
  const $option = this._$options[value];
55
57
  if (!$option) {
@@ -65,6 +67,13 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
65
67
  this._handleOptionClicked = (event) => {
66
68
  this._selectOption(event.detail.$option.value);
67
69
  };
70
+ this._handleOptionUpdated = ({ detail }) => {
71
+ const $option = detail.$option;
72
+ this._selectController.updateOption($option.value, {
73
+ inactive: $option.inactive,
74
+ hidden: $option.hidden
75
+ });
76
+ };
68
77
  this._handleDropdownHidden = () => {
69
78
  this._searchValue = '';
70
79
  this.opened = false;
@@ -280,6 +289,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
280
289
  : ''}"
281
290
  ${ref(this._$optionsList)}
282
291
  @selectOptions.clicked=${this._handleOptionClicked}
292
+ @selectOptions.updated=${this._handleOptionUpdated}
283
293
  >
284
294
  ${this.getSlot(SELECT_SLOT_NAMES.content)}
285
295
  </h-options>
@@ -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,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;"}
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,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;"}
@@ -48,6 +48,7 @@ export { HRadioContent } from './components/form/radio/radio_content';
48
48
  export { HRadioControl } from './components/form/radio/radio_control';
49
49
  export * from './components/form/radio/radio_types';
50
50
  export * from './components/form/radio/radio_constants';
51
+ export { RADIO_CONTROL_VARIANTS, RADIO_CONTROL_CSS_CLASSES } from "./components/form/radio/radio_constants";
51
52
  export { HTextarea } from './components/form/textarea/textarea';
52
53
  export { HTextareaControl } from './components/form/textarea/textarea_control';
53
54
  export * from './components/form/textarea/textarea_types';
@@ -77,7 +78,7 @@ export { HColorSwatchesControl } from './components/form/color_swatches_control/
77
78
  export { HColorSwatches } from './components/color_swatches/color_swatches';
78
79
  export { HColorItem } from './components/color_swatches/color_item/color_item';
79
80
  export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more';
80
- export { TSelectedColorsObject } from "./components/color_swatches/color_swatches_types";
81
+ export { TColorSwatchesControlChangeEventDetail } from "./components/color_swatches/color_swatches_types";
81
82
  export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from "./components/form/color_swatches_control/color_swatches_control_constants";
82
83
  export { VisibilityController } from './controllers/visibility_controller/visibility_controller';
83
84
  export * from './controllers/visibility_controller/visibility_controller_types';
@@ -49,7 +49,7 @@ export { SWITCH_CONTROL_CSS_CLASSES, SWITCH_CONTROL_EVENTS, SWITCH_SLOTS } from
49
49
  export { HSwitch } from './components/form/switch/switch.js';
50
50
  export { HSwitchContent } from './components/form/switch/switch_content.js';
51
51
  export { HSwitchControl } from './components/form/switch/switch_control.js';
52
- export { RADIO_CONTROL_CSS_CLASSES, RADIO_CONTROL_EVENTS, RADIO_SLOTS } from './components/form/radio/radio_constants.js';
52
+ export { RADIO_CONTROL_CSS_CLASSES, RADIO_CONTROL_EVENTS, RADIO_CONTROL_VARIANTS, RADIO_SLOTS } from './components/form/radio/radio_constants.js';
53
53
  export { HRadio } from './components/form/radio/radio.js';
54
54
  export { HRadioContent } from './components/form/radio/radio_content.js';
55
55
  export { HRadioControl } from './components/form/radio/radio_control.js';
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.13-9",
5
+ "version": "1.2.14",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",