@shoper/phoenix_design_system 1.18.38 → 1.18.39-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 (39) hide show
  1. package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
  2. package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js +11 -2
  4. package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js +24 -3
  6. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +6 -1
  8. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -5
  10. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  11. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +11 -5
  12. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
  13. package/build/cjs/packages/phoenix/src/components/icon/icon.js +3 -0
  14. package/build/cjs/packages/phoenix/src/components/icon/icon.js.map +1 -1
  15. package/build/cjs/packages/phoenix/src/components/icon/icon_constants.js +3 -1
  16. package/build/cjs/packages/phoenix/src/components/icon/icon_constants.js.map +1 -1
  17. package/build/esm/packages/phoenix/src/components/form/controllers/props_synchronizing/control_props_sync_controller_types.d.ts +2 -2
  18. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.d.ts +3 -0
  19. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
  20. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
  21. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.d.ts +2 -0
  22. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js +12 -3
  23. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
  24. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +4 -1
  25. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +25 -4
  26. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  27. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts +4 -0
  28. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +6 -2
  29. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  30. package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -5
  31. package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  32. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +11 -5
  33. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
  34. package/build/esm/packages/phoenix/src/components/icon/icon.js +4 -1
  35. package/build/esm/packages/phoenix/src/components/icon/icon.js.map +1 -1
  36. package/build/esm/packages/phoenix/src/components/icon/icon_constants.d.ts +1 -0
  37. package/build/esm/packages/phoenix/src/components/icon/icon_constants.js +3 -2
  38. package/build/esm/packages/phoenix/src/components/icon/icon_constants.js.map +1 -1
  39. package/package.json +1 -1
@@ -3,10 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
6
+ require('lit');
6
7
  var decorators = require('lit/decorators');
8
+ var utilities = require('@dreamcommerce/utilities');
7
9
  var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
8
10
  var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
9
11
  var btn_controller = require('../../../controllers/btn_controller/btn_controller.js');
12
+ var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
10
13
  var input_stepper_constants = require('./input_stepper_constants.js');
11
14
 
12
15
  exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
@@ -17,8 +20,11 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
17
20
  decrement: input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
18
21
  };
19
22
  this.type = '';
23
+ this.disabled = false;
20
24
  this._dispatchStepperEvent = (ev) => {
21
25
  ev.stopImmediatePropagation();
26
+ if (this.disabled)
27
+ return;
22
28
  if (!this.type)
23
29
  throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
24
30
  if (!this._allowedEvents[this.type])
@@ -26,16 +32,27 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
26
32
  this.emitCustomEvent(this._allowedEvents[this.type]);
27
33
  };
28
34
  this._btnController = new btn_controller.BtnController(this, this._dispatchStepperEvent);
35
+ new control_props_sync_consumer_controller.ControlPropsSyncConsumerController({ host: this });
29
36
  }
30
37
  connectedCallback() {
31
38
  super.connectedCallback();
32
39
  this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
33
40
  }
41
+ updated(changedProperties) {
42
+ if (!changedProperties.has('disabled'))
43
+ return;
44
+ this.setAttribute('aria-disabled', String(this.disabled));
45
+ this.disabled ? utilities.UiDomUtils.makeUnnavigable(this) : utilities.UiDomUtils.makeNavigable(this);
46
+ }
34
47
  };
35
48
  tslib_es6.__decorate([
36
49
  decorators.property({ type: String }),
37
50
  tslib_es6.__metadata("design:type", Object)
38
51
  ], exports.HButtonStepper.prototype, "type", void 0);
52
+ tslib_es6.__decorate([
53
+ decorators.property({ type: Boolean, reflect: true }),
54
+ tslib_es6.__metadata("design:type", Boolean)
55
+ ], exports.HButtonStepper.prototype, "disabled", void 0);
39
56
  exports.HButtonStepper = tslib_es6.__decorate([
40
57
  phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.button),
41
58
  tslib_es6.__metadata("design:paramtypes", [])
@@ -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;"}
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;"}
@@ -10,12 +10,14 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
10
10
  var observer = require('../../../core/classes/observer/observer.js');
11
11
  var context_consumer_controller = require('../../../core/context/context_consumer_controller.js');
12
12
  var ref_js = require('lit-html/directives/ref.js');
13
+ var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
13
14
  var input_stepper_constants = require('./input_stepper_constants.js');
14
15
 
15
16
  exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
16
17
  constructor() {
17
- super(...arguments);
18
+ super();
18
19
  this._controlId = '';
20
+ this.disabled = false;
19
21
  this._inputRef = ref_js.createRef();
20
22
  this._dispatchToggleEvent = (ev) => {
21
23
  const $input = ev.target;
@@ -28,6 +30,7 @@ exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_elemen
28
30
  }
29
31
  });
30
32
  };
33
+ new control_props_sync_consumer_controller.ControlPropsSyncConsumerController({ host: this });
31
34
  }
32
35
  async connectedCallback() {
33
36
  super.connectedCallback();
@@ -75,6 +78,7 @@ exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_elemen
75
78
  @change="${this._dispatchToggleEvent}"
76
79
  inputmode="decimal"
77
80
  aria-label="${this.ariaLabel}"
81
+ ?disabled="${this.disabled}"
78
82
  />`;
79
83
  }
80
84
  };
@@ -82,7 +86,12 @@ tslib_es6.__decorate([
82
86
  decorators.state(),
83
87
  tslib_es6.__metadata("design:type", Object)
84
88
  ], exports.HDisplayStepper.prototype, "_controlId", void 0);
89
+ tslib_es6.__decorate([
90
+ decorators.property({ type: Boolean, reflect: true }),
91
+ tslib_es6.__metadata("design:type", Boolean)
92
+ ], exports.HDisplayStepper.prototype, "disabled", void 0);
85
93
  exports.HDisplayStepper = tslib_es6.__decorate([
86
- phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.input)
94
+ phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.input),
95
+ tslib_es6.__metadata("design:paramtypes", [])
87
96
  ], exports.HDisplayStepper);
88
97
  //# sourceMappingURL=display_stepper.js.map
@@ -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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -3,16 +3,18 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
6
+ require('lit');
6
7
  var decorators = require('lit/decorators');
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 behavior_subject = require('../../../core/classes/behavior_subject/behavior_subject.js');
10
11
  var context_provider_controller = require('../../../core/context/context_provider_controller.js');
12
+ var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
11
13
  var input_stepper_constants = require('./input_stepper_constants.js');
12
14
 
13
15
  exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
14
16
  constructor() {
15
- super(...arguments);
17
+ super();
16
18
  this.controlId = '';
17
19
  this.allowedFractionDigits = null;
18
20
  this.roundTo = 0;
@@ -20,7 +22,10 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
20
22
  this.min = -Infinity;
21
23
  this.max = Infinity;
22
24
  this.step = 1;
25
+ this.disabled = false;
23
26
  this.increment = () => {
27
+ if (this.disabled)
28
+ return;
24
29
  if (this.value === this.max) {
25
30
  this.value = this.max;
26
31
  return;
@@ -29,6 +34,8 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
29
34
  this._dispatchChangedValue(this.value);
30
35
  };
31
36
  this.decrement = () => {
37
+ if (this.disabled)
38
+ return;
32
39
  if (this.value === this.min) {
33
40
  this.value = this.min;
34
41
  return;
@@ -37,6 +44,8 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
37
44
  this._dispatchChangedValue(this.value);
38
45
  };
39
46
  this.changeValue = (ev) => {
47
+ if (this.disabled)
48
+ return;
40
49
  const value = ev.detail.value;
41
50
  this.setValue(value);
42
51
  this._dispatchChangedValue(this.value);
@@ -69,6 +78,10 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
69
78
  detail: { value }
70
79
  });
71
80
  };
81
+ new control_props_sync_provider_controller.ControlPropsSyncProviderController({
82
+ host: this,
83
+ propsToSync: [input_stepper_constants.INPUT_STEPPER_PROPS_TO_SYNC.disabled]
84
+ });
72
85
  }
73
86
  connectedCallback() {
74
87
  super.connectedCallback();
@@ -107,8 +120,11 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
107
120
  _outsideRangeEdges(number) {
108
121
  return number > this.max || number < this.min;
109
122
  }
110
- updated() {
123
+ updated(changedProperties) {
111
124
  var _a;
125
+ if (changedProperties.has('disabled')) {
126
+ this.classList.toggle(input_stepper_constants.INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
127
+ }
112
128
  if (this._outsideRangeEdges(this.value))
113
129
  return;
114
130
  const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
@@ -144,7 +160,12 @@ tslib_es6.__decorate([
144
160
  decorators.property({ type: Number, reflect: true }),
145
161
  tslib_es6.__metadata("design:type", Number)
146
162
  ], exports.HInputStepper.prototype, "step", void 0);
163
+ tslib_es6.__decorate([
164
+ decorators.property({ type: Boolean, reflect: true }),
165
+ tslib_es6.__metadata("design:type", Boolean)
166
+ ], exports.HInputStepper.prototype, "disabled", void 0);
147
167
  exports.HInputStepper = tslib_es6.__decorate([
148
- phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control)
168
+ phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control),
169
+ tslib_es6.__metadata("design:paramtypes", [])
149
170
  ], exports.HInputStepper);
150
171
  //# sourceMappingURL=input_stepper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -13,7 +13,8 @@ const INPUT_STEPPER_CUSTOM_EVENT_NAMES = {
13
13
  decrement: 'decrement'
14
14
  };
15
15
  const INPUT_STEPPER_CLASS_NAMES = {
16
- displayInput: 'input-stepper__value_input'
16
+ displayInput: 'input-stepper__value_input',
17
+ inputStepperDisabled: 'input-stepper_disabled'
17
18
  };
18
19
  const INPUT_STEPPER_COMPONENT_NAMES = {
19
20
  control: 'h-input-stepper',
@@ -22,6 +23,9 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
22
23
  };
23
24
  const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
24
25
  stepperContext: 'stepperContext'
26
+ };
27
+ const INPUT_STEPPER_PROPS_TO_SYNC = {
28
+ disabled: 'disabled'
25
29
  };
26
30
 
27
31
  exports.INPUT_STEPPER_CLASS_NAMES = INPUT_STEPPER_CLASS_NAMES;
@@ -29,4 +33,5 @@ exports.INPUT_STEPPER_COMPONENT_NAMES = INPUT_STEPPER_COMPONENT_NAMES;
29
33
  exports.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES;
30
34
  exports.INPUT_STEPPER_CUSTOM_EVENT_NAMES = INPUT_STEPPER_CUSTOM_EVENT_NAMES;
31
35
  exports.INPUT_STEPPER_EVENT_NAMES = INPUT_STEPPER_EVENT_NAMES;
36
+ exports.INPUT_STEPPER_PROPS_TO_SYNC = INPUT_STEPPER_PROPS_TO_SYNC;
32
37
  //# sourceMappingURL=input_stepper_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;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;"}
@@ -30,11 +30,7 @@ exports.HRadio = class HRadio extends phoenix_light_lit_element.PhoenixLightLitE
30
30
  this._updateCssClassesBasedOnProps();
31
31
  }
32
32
  _updateCssClassesBasedOnProps() {
33
- const classes = [
34
- radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled,
35
- radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly,
36
- radio_constants.RADIO_CONTROL_CSS_CLASSES.radioError
37
- ];
33
+ const classes = [radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled, radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly, radio_constants.RADIO_CONTROL_CSS_CLASSES.radioError];
38
34
  this.classList.remove(...classes);
39
35
  const cssClasses = index['default']({
40
36
  [radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
@@ -19,11 +19,17 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
19
19
  this.getProductRateHtml = (productRate) => {
20
20
  return lit.html `
21
21
  <div class="${search_constants.SEARCH_CLASS_NAMES.starScore}">
22
- ${[1, 2, 3, 4, 5].map((score) => lit.html ` <h-icon
23
- icon-name="icon-star"
24
- css-classes=${productRate >= score ? search_constants.SEARCH_CLASS_NAMES.productIconFilled : search_constants.SEARCH_CLASS_NAMES.productIconEmpty}
25
- noStroke=${true}
26
- ></h-icon>`)}
22
+ ${[1, 2, 3, 4, 5].map((score) => {
23
+ const maxBoundary = score - 0.4;
24
+ const minBoundary = score - 0.81;
25
+ if (productRate >= score || productRate >= maxBoundary) {
26
+ return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconFilled} aria-hidden="true" noStroke=${true}></h-icon>`;
27
+ }
28
+ if (productRate > minBoundary) {
29
+ return lit.html `<h-icon icon-name="icon-half-filled" css-classes="${search_constants.SEARCH_CLASS_NAMES.productIconFilled}" aria-hidden="true" noStroke=${true}></h-icon>`;
30
+ }
31
+ return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconEmpty} aria-hidden="true" noStroke=${true}></h-icon>`;
32
+ })}
27
33
  </div>
28
34
  `;
29
35
  };
@@ -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,mBAAmB,8DAAkE;AACrF;AACA,qBAAqB,gEAAoE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAmB,8DAAkE;AACrF;AACA,qBAAqB,gEAAoE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -43,6 +43,9 @@ exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixL
43
43
  HIcon_1.src.unsubscribe(this._srcObserver);
44
44
  }
45
45
  render() {
46
+ if (this.hasSlot(icon_constants.ICON_CONTENT_SLOT_NAME)) {
47
+ return lit.html `${this.getSlot(icon_constants.ICON_CONTENT_SLOT_NAME)}`;
48
+ }
46
49
  if (!HIcon_1.src.getValue())
47
50
  return null;
48
51
  return lit.html `
@@ -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,oBAAoB,6CAAiD;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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,oBAAoB,6CAAiD;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;"}
@@ -21,9 +21,11 @@ const ICONS_SIZES = {
21
21
  l: 'l',
22
22
  xl: 'xl',
23
23
  xxl: 'xxl'
24
- };
24
+ };
25
+ const ICON_CONTENT_SLOT_NAME = 'content';
25
26
 
26
27
  exports.ICONS_SIZES = ICONS_SIZES;
28
+ exports.ICON_CONTENT_SLOT_NAME = ICON_CONTENT_SLOT_NAME;
27
29
  exports.ICON_CSS_CLASSES = ICON_CSS_CLASSES;
28
30
  exports.ICON_SIZES_CSS_CLASS_MAP = ICON_SIZES_CSS_CLASS_MAP;
29
31
  //# sourceMappingURL=icon_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;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;"}
@@ -2,11 +2,11 @@ import { ReactiveControllerHost } from 'lit';
2
2
  export declare type TBaseFormControlProps = Partial<{
3
3
  disabled: boolean;
4
4
  required: boolean;
5
- hidden: boolean;
5
+ hidden: boolean | HTMLElement['hidden'];
6
6
  readonly: boolean;
7
7
  id: string;
8
8
  name: string;
9
- value: string;
9
+ value: string | number;
10
10
  }>;
11
11
  export declare type TBaseFormControlPropsController = ReactiveControllerHost & TBaseFormControlProps & HTMLElement;
12
12
  export declare type TOnPropsUpdatedListener = (props: TBaseFormControlProps) => void;
@@ -1,9 +1,12 @@
1
1
  import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
+ import { PropertyValues } from 'lit';
2
3
  export declare class HButtonStepper extends PhoenixLightLitElement {
3
4
  private _btnController;
4
5
  private _allowedEvents;
5
6
  type: string;
7
+ disabled: boolean;
6
8
  constructor();
7
9
  connectedCallback(): void;
10
+ updated(changedProperties: PropertyValues): void;
8
11
  private _dispatchStepperEvent;
9
12
  }
@@ -1,8 +1,11 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
+ import 'lit';
2
3
  import { property } from 'lit/decorators';
4
+ import { UiDomUtils } from '@dreamcommerce/utilities';
3
5
  import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
4
6
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
5
7
  import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
8
+ import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
6
9
  import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
7
10
 
8
11
  let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
@@ -13,8 +16,11 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
13
16
  decrement: INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
14
17
  };
15
18
  this.type = '';
19
+ this.disabled = false;
16
20
  this._dispatchStepperEvent = (ev) => {
17
21
  ev.stopImmediatePropagation();
22
+ if (this.disabled)
23
+ return;
18
24
  if (!this.type)
19
25
  throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
20
26
  if (!this._allowedEvents[this.type])
@@ -22,16 +28,27 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
22
28
  this.emitCustomEvent(this._allowedEvents[this.type]);
23
29
  };
24
30
  this._btnController = new BtnController(this, this._dispatchStepperEvent);
31
+ new ControlPropsSyncConsumerController({ host: this });
25
32
  }
26
33
  connectedCallback() {
27
34
  super.connectedCallback();
28
35
  this.addEventListener(INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
29
36
  }
37
+ updated(changedProperties) {
38
+ if (!changedProperties.has('disabled'))
39
+ return;
40
+ this.setAttribute('aria-disabled', String(this.disabled));
41
+ this.disabled ? UiDomUtils.makeUnnavigable(this) : UiDomUtils.makeNavigable(this);
42
+ }
30
43
  };
31
44
  __decorate([
32
45
  property({ type: String }),
33
46
  __metadata("design:type", Object)
34
47
  ], HButtonStepper.prototype, "type", void 0);
48
+ __decorate([
49
+ property({ type: Boolean, reflect: true }),
50
+ __metadata("design:type", Boolean)
51
+ ], HButtonStepper.prototype, "disabled", void 0);
35
52
  HButtonStepper = __decorate([
36
53
  phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.button),
37
54
  __metadata("design:paramtypes", [])
@@ -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;"}
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;"}
@@ -1,10 +1,12 @@
1
1
  import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
2
  export declare class HDisplayStepper extends PhoenixLightLitElement {
3
3
  private _controlId;
4
+ disabled: boolean;
4
5
  private _stepperContextConsumer;
5
6
  private _value$;
6
7
  private _valueObserver;
7
8
  private _inputRef;
9
+ constructor();
8
10
  connectedCallback(): Promise<void>;
9
11
  disconnectedCallback(): void;
10
12
  private _dispatchToggleEvent;
@@ -1,17 +1,19 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
2
  import { html } from 'lit';
3
- import { state } from 'lit/decorators';
3
+ import { state, property } from 'lit/decorators';
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 { Observer } from '../../../core/classes/observer/observer.js';
7
7
  import { ContextConsumerController } from '../../../core/context/context_consumer_controller.js';
8
8
  import { createRef, ref } from 'lit-html/directives/ref.js';
9
+ import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
9
10
  import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CLASS_NAMES } from './input_stepper_constants.js';
10
11
 
11
12
  let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
12
13
  constructor() {
13
- super(...arguments);
14
+ super();
14
15
  this._controlId = '';
16
+ this.disabled = false;
15
17
  this._inputRef = createRef();
16
18
  this._dispatchToggleEvent = (ev) => {
17
19
  const $input = ev.target;
@@ -24,6 +26,7 @@ let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
24
26
  }
25
27
  });
26
28
  };
29
+ new ControlPropsSyncConsumerController({ host: this });
27
30
  }
28
31
  async connectedCallback() {
29
32
  super.connectedCallback();
@@ -71,6 +74,7 @@ let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
71
74
  @change="${this._dispatchToggleEvent}"
72
75
  inputmode="decimal"
73
76
  aria-label="${this.ariaLabel}"
77
+ ?disabled="${this.disabled}"
74
78
  />`;
75
79
  }
76
80
  };
@@ -78,8 +82,13 @@ __decorate([
78
82
  state(),
79
83
  __metadata("design:type", Object)
80
84
  ], HDisplayStepper.prototype, "_controlId", void 0);
85
+ __decorate([
86
+ property({ type: Boolean, reflect: true }),
87
+ __metadata("design:type", Boolean)
88
+ ], HDisplayStepper.prototype, "disabled", void 0);
81
89
  HDisplayStepper = __decorate([
82
- phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.input)
90
+ phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.input),
91
+ __metadata("design:paramtypes", [])
83
92
  ], HDisplayStepper);
84
93
 
85
94
  export { HDisplayStepper };
@@ -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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,4 +1,5 @@
1
1
  import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
+ import { PropertyValues } from 'lit';
2
3
  import { TInputStepperChangeEvent } from './input_stepper_types';
3
4
  export declare class HInputStepper extends PhoenixLightLitElement {
4
5
  private _stepperState;
@@ -10,6 +11,8 @@ export declare class HInputStepper extends PhoenixLightLitElement {
10
11
  min: number;
11
12
  max: number;
12
13
  step: number;
14
+ disabled: boolean;
15
+ constructor();
13
16
  connectedCallback(): void;
14
17
  disconnectedCallback(): void;
15
18
  increment: () => void;
@@ -21,5 +24,5 @@ export declare class HInputStepper extends PhoenixLightLitElement {
21
24
  private _roundToFractionDigits;
22
25
  private _outsideRangeEdges;
23
26
  private _dispatchChangedValue;
24
- updated(): void;
27
+ updated(changedProperties: PropertyValues): void;
25
28
  }
@@ -1,14 +1,16 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
+ import 'lit';
2
3
  import { property } from 'lit/decorators';
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 { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior_subject.js';
6
7
  import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
7
- import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
8
+ import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
9
+ import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_PROPS_TO_SYNC, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
8
10
 
9
11
  let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
10
12
  constructor() {
11
- super(...arguments);
13
+ super();
12
14
  this.controlId = '';
13
15
  this.allowedFractionDigits = null;
14
16
  this.roundTo = 0;
@@ -16,7 +18,10 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
16
18
  this.min = -Infinity;
17
19
  this.max = Infinity;
18
20
  this.step = 1;
21
+ this.disabled = false;
19
22
  this.increment = () => {
23
+ if (this.disabled)
24
+ return;
20
25
  if (this.value === this.max) {
21
26
  this.value = this.max;
22
27
  return;
@@ -25,6 +30,8 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
25
30
  this._dispatchChangedValue(this.value);
26
31
  };
27
32
  this.decrement = () => {
33
+ if (this.disabled)
34
+ return;
28
35
  if (this.value === this.min) {
29
36
  this.value = this.min;
30
37
  return;
@@ -33,6 +40,8 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
33
40
  this._dispatchChangedValue(this.value);
34
41
  };
35
42
  this.changeValue = (ev) => {
43
+ if (this.disabled)
44
+ return;
36
45
  const value = ev.detail.value;
37
46
  this.setValue(value);
38
47
  this._dispatchChangedValue(this.value);
@@ -65,6 +74,10 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
65
74
  detail: { value }
66
75
  });
67
76
  };
77
+ new ControlPropsSyncProviderController({
78
+ host: this,
79
+ propsToSync: [INPUT_STEPPER_PROPS_TO_SYNC.disabled]
80
+ });
68
81
  }
69
82
  connectedCallback() {
70
83
  super.connectedCallback();
@@ -103,8 +116,11 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
103
116
  _outsideRangeEdges(number) {
104
117
  return number > this.max || number < this.min;
105
118
  }
106
- updated() {
119
+ updated(changedProperties) {
107
120
  var _a;
121
+ if (changedProperties.has('disabled')) {
122
+ this.classList.toggle(INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
123
+ }
108
124
  if (this._outsideRangeEdges(this.value))
109
125
  return;
110
126
  const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
@@ -140,8 +156,13 @@ __decorate([
140
156
  property({ type: Number, reflect: true }),
141
157
  __metadata("design:type", Number)
142
158
  ], HInputStepper.prototype, "step", void 0);
159
+ __decorate([
160
+ property({ type: Boolean, reflect: true }),
161
+ __metadata("design:type", Boolean)
162
+ ], HInputStepper.prototype, "disabled", void 0);
143
163
  HInputStepper = __decorate([
144
- phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.control)
164
+ phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.control),
165
+ __metadata("design:paramtypes", [])
145
166
  ], HInputStepper);
146
167
 
147
168
  export { HInputStepper };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -10,6 +10,7 @@ export declare const INPUT_STEPPER_CUSTOM_EVENT_NAMES: {
10
10
  };
11
11
  export declare const INPUT_STEPPER_CLASS_NAMES: {
12
12
  readonly displayInput: "input-stepper__value_input";
13
+ readonly inputStepperDisabled: "input-stepper_disabled";
13
14
  };
14
15
  export declare const INPUT_STEPPER_COMPONENT_NAMES: {
15
16
  readonly control: "h-input-stepper";
@@ -19,3 +20,6 @@ export declare const INPUT_STEPPER_COMPONENT_NAMES: {
19
20
  export declare const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES: {
20
21
  readonly stepperContext: "stepperContext";
21
22
  };
23
+ export declare const INPUT_STEPPER_PROPS_TO_SYNC: {
24
+ readonly disabled: "disabled";
25
+ };
@@ -9,7 +9,8 @@ const INPUT_STEPPER_CUSTOM_EVENT_NAMES = {
9
9
  decrement: 'decrement'
10
10
  };
11
11
  const INPUT_STEPPER_CLASS_NAMES = {
12
- displayInput: 'input-stepper__value_input'
12
+ displayInput: 'input-stepper__value_input',
13
+ inputStepperDisabled: 'input-stepper_disabled'
13
14
  };
14
15
  const INPUT_STEPPER_COMPONENT_NAMES = {
15
16
  control: 'h-input-stepper',
@@ -18,7 +19,10 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
18
19
  };
19
20
  const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
20
21
  stepperContext: 'stepperContext'
22
+ };
23
+ const INPUT_STEPPER_PROPS_TO_SYNC = {
24
+ disabled: 'disabled'
21
25
  };
22
26
 
23
- export { INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES };
27
+ export { INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_PROPS_TO_SYNC };
24
28
  //# sourceMappingURL=input_stepper_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;"}
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;"}
@@ -26,11 +26,7 @@ let HRadio = class HRadio extends PhoenixLightLitElement {
26
26
  this._updateCssClassesBasedOnProps();
27
27
  }
28
28
  _updateCssClassesBasedOnProps() {
29
- const classes = [
30
- RADIO_CONTROL_CSS_CLASSES.radioDisabled,
31
- RADIO_CONTROL_CSS_CLASSES.radioReadonly,
32
- RADIO_CONTROL_CSS_CLASSES.radioError
33
- ];
29
+ const classes = [RADIO_CONTROL_CSS_CLASSES.radioDisabled, RADIO_CONTROL_CSS_CLASSES.radioReadonly, RADIO_CONTROL_CSS_CLASSES.radioError];
34
30
  this.classList.remove(...classes);
35
31
  const cssClasses = classnames({
36
32
  [RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,gDAAoD;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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,gDAAoD;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;"}
@@ -15,11 +15,17 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
15
15
  this.getProductRateHtml = (productRate) => {
16
16
  return html `
17
17
  <div class="${SEARCH_CLASS_NAMES.starScore}">
18
- ${[1, 2, 3, 4, 5].map((score) => html ` <h-icon
19
- icon-name="icon-star"
20
- css-classes=${productRate >= score ? SEARCH_CLASS_NAMES.productIconFilled : SEARCH_CLASS_NAMES.productIconEmpty}
21
- noStroke=${true}
22
- ></h-icon>`)}
18
+ ${[1, 2, 3, 4, 5].map((score) => {
19
+ const maxBoundary = score - 0.4;
20
+ const minBoundary = score - 0.81;
21
+ if (productRate >= score || productRate >= maxBoundary) {
22
+ return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconFilled} aria-hidden="true" noStroke=${true}></h-icon>`;
23
+ }
24
+ if (productRate > minBoundary) {
25
+ return html `<h-icon icon-name="icon-half-filled" css-classes="${SEARCH_CLASS_NAMES.productIconFilled}" aria-hidden="true" noStroke=${true}></h-icon>`;
26
+ }
27
+ return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconEmpty} aria-hidden="true" noStroke=${true}></h-icon>`;
28
+ })}
23
29
  </div>
24
30
  `;
25
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,8DAAkE;AAC5F;AACA,4BAA4B,gEAAoE;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;AACA;AACA;AACA;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,0BAA0B,8DAAkE;AAC5F;AACA,4BAA4B,gEAAoE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +3,7 @@ import { html } from 'lit';
3
3
  import { property } from 'lit/decorators';
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
- import { ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP } from './icon_constants.js';
6
+ import { ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP, ICON_CONTENT_SLOT_NAME } from './icon_constants.js';
7
7
  import classnames from '../../../../../external/classnames/index.js';
8
8
  import { namespacedAttribute } from '../../directives/namespaced_attribute_directive.js';
9
9
  import { Observer } from '../../core/classes/observer/observer.js';
@@ -39,6 +39,9 @@ let HIcon = HIcon_1 = class HIcon extends PhoenixLightLitElement {
39
39
  HIcon_1.src.unsubscribe(this._srcObserver);
40
40
  }
41
41
  render() {
42
+ if (this.hasSlot(ICON_CONTENT_SLOT_NAME)) {
43
+ return html `${this.getSlot(ICON_CONTENT_SLOT_NAME)}`;
44
+ }
42
45
  if (!HIcon_1.src.getValue())
43
46
  return null;
44
47
  return html `
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA,uBAAuB,6CAAiD;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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA,uBAAuB,6CAAiD;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;"}
@@ -18,4 +18,5 @@ export declare const ICONS_SIZES: {
18
18
  readonly xl: "xl";
19
19
  readonly xxl: "xxl";
20
20
  };
21
+ export declare const ICON_CONTENT_SLOT_NAME = "content";
21
22
  export declare type TIconSize = Any.Keys<typeof ICON_SIZES_CSS_CLASS_MAP>;
@@ -17,7 +17,8 @@ const ICONS_SIZES = {
17
17
  l: 'l',
18
18
  xl: 'xl',
19
19
  xxl: 'xxl'
20
- };
20
+ };
21
+ const ICON_CONTENT_SLOT_NAME = 'content';
21
22
 
22
- export { ICONS_SIZES, ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP };
23
+ export { ICONS_SIZES, ICON_CONTENT_SLOT_NAME, ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP };
23
24
  //# sourceMappingURL=icon_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;"}
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;"}
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.18.38",
5
+ "version": "1.18.39-1",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",