@shoper/phoenix_design_system 1.18.39 → 1.18.41

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 (35) hide show
  1. package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js +45 -15
  2. package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js +3 -1
  4. package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
  6. package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js +11 -2
  8. package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js +24 -3
  10. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  11. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +6 -1
  12. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  13. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -5
  14. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  15. package/build/esm/packages/phoenix/src/components/accordion/accordion_content.d.ts +3 -0
  16. package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +45 -15
  17. package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
  18. package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js +3 -1
  19. package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
  20. package/build/esm/packages/phoenix/src/components/form/controllers/props_synchronizing/control_props_sync_controller_types.d.ts +2 -2
  21. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.d.ts +3 -0
  22. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
  23. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
  24. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.d.ts +2 -0
  25. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js +12 -3
  26. package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
  27. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +4 -1
  28. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +25 -4
  29. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  30. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts +4 -0
  31. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +6 -2
  32. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  33. package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -5
  34. package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  35. package/package.json +1 -1
@@ -19,10 +19,12 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
19
19
  super();
20
20
  this.transitionName = 'accordion-toggle';
21
21
  this.isDevAccordionOptimizationFlagEnabled = false;
22
+ this.isDevAccordionSafariFlashFixEnabled = false;
22
23
  this._resizeObserver = null;
23
24
  this._isTransitioning = false;
24
25
  this._resizeDebounceTimer = null;
25
26
  this._mutationDebounceTimer = null;
27
+ this._lastViewportWidth = window.innerWidth;
26
28
  this._mutationObserver = null;
27
29
  this._handleResizeObserver = () => {
28
30
  if (this._isTransitioning || this.hidden || this.style.height === '0px')
@@ -36,26 +38,47 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
36
38
  this.style.display = previousDisplay;
37
39
  };
38
40
  this._handleResize = () => {
41
+ if (this.isDevAccordionSafariFlashFixEnabled) {
42
+ if (this._isIosViewportHeightOnlyResize())
43
+ return;
44
+ this._lastViewportWidth = window.innerWidth;
45
+ }
39
46
  if (this._resizeDebounceTimer !== null) {
40
- window.cancelAnimationFrame(this._resizeDebounceTimer);
47
+ const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
48
+ clearMethod(this._resizeDebounceTimer);
49
+ }
50
+ if (this.isDevAccordionSafariFlashFixEnabled) {
51
+ this._resizeDebounceTimer = window.setTimeout(this._setStylingOptions, RESIZE_DEBOUNCE_MS);
52
+ }
53
+ else {
54
+ this._resizeDebounceTimer = requestAnimationFrame(() => {
55
+ setTimeout(() => {
56
+ this._setStylingOptions();
57
+ }, RESIZE_DEBOUNCE_MS);
58
+ });
41
59
  }
42
- this._resizeDebounceTimer = window.requestAnimationFrame(() => {
43
- setTimeout(() => {
44
- this._setStylingOptions();
45
- }, RESIZE_DEBOUNCE_MS);
46
- });
47
60
  };
48
61
  this._setStylingOptions = () => {
49
- requestAnimationFrame(() => {
62
+ if (this.isDevAccordionSafariFlashFixEnabled) {
50
63
  const previousDisplay = this.style.display;
51
64
  this.style.setProperty('display', 'block', 'important');
52
65
  this.style.height = 'auto';
66
+ this._setOriginalHeightValue(this.getBoundingClientRect().height);
67
+ this.style.display = previousDisplay;
68
+ this.style.height = this.hidden ? '0px' : this._originalHeight;
69
+ }
70
+ else {
53
71
  requestAnimationFrame(() => {
54
- this._setOriginalHeightValue(this.getBoundingClientRect().height);
55
- this.style.display = previousDisplay;
56
- this.style.height = this.hidden ? '0px' : this._originalHeight;
72
+ const previousDisplay = this.style.display;
73
+ this.style.setProperty('display', 'block', 'important');
74
+ this.style.height = 'auto';
75
+ requestAnimationFrame(() => {
76
+ this._setOriginalHeightValue(this.getBoundingClientRect().height);
77
+ this.style.display = previousDisplay;
78
+ this.style.height = this.hidden ? '0px' : this._originalHeight;
79
+ });
57
80
  });
58
- });
81
+ }
59
82
  };
60
83
  this._setOriginalHeightValue = (height) => {
61
84
  if (height !== 0 || this.children.length === 0) {
@@ -64,7 +87,7 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
64
87
  };
65
88
  this._handleMutation = () => {
66
89
  if (this._mutationDebounceTimer !== null) {
67
- window.clearTimeout(this._mutationDebounceTimer);
90
+ clearTimeout(this._mutationDebounceTimer);
68
91
  }
69
92
  this._mutationDebounceTimer = window.setTimeout(() => {
70
93
  requestAnimationFrame(() => {
@@ -148,6 +171,9 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
148
171
  this._setStylingOptions();
149
172
  }
150
173
  }
174
+ _isIosViewportHeightOnlyResize() {
175
+ return window.innerWidth === this._lastViewportWidth;
176
+ }
151
177
  _setupImageLoadListeners() {
152
178
  const images = this.querySelectorAll('img');
153
179
  images.forEach((img) => {
@@ -208,10 +234,11 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
208
234
  (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
209
235
  window.removeEventListener('resize', this._handleResize);
210
236
  if (this._resizeDebounceTimer !== null) {
211
- window.cancelAnimationFrame(this._resizeDebounceTimer);
237
+ const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
238
+ clearMethod(this._resizeDebounceTimer);
212
239
  }
213
240
  if (this._mutationDebounceTimer !== null) {
214
- window.clearTimeout(this._mutationDebounceTimer);
241
+ clearTimeout(this._mutationDebounceTimer);
215
242
  }
216
243
  }
217
244
  const images = this.querySelectorAll('img');
@@ -219,7 +246,6 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
219
246
  img.removeEventListener('load', this._boundHandleImageLoad);
220
247
  img.removeEventListener('error', this._boundHandleImageLoad);
221
248
  });
222
- window.removeEventListener('resize', this._handleResize);
223
249
  this.removeEventListener('transitionend', this._boundHandleTransitionEnd);
224
250
  }
225
251
  };
@@ -231,6 +257,10 @@ tslib_es6.__decorate([
231
257
  decorators.property({ type: Boolean, attribute: 'is-dev-accordion-optimization-flag-enabled' }),
232
258
  tslib_es6.__metadata("design:type", Boolean)
233
259
  ], exports.HAccordionContent.prototype, "isDevAccordionOptimizationFlagEnabled", void 0);
260
+ tslib_es6.__decorate([
261
+ decorators.property({ type: Boolean, attribute: 'is-dev-accordion-safari-flash-fix-enabled' }),
262
+ tslib_es6.__metadata("design:type", Boolean)
263
+ ], exports.HAccordionContent.prototype, "isDevAccordionSafariFlashFixEnabled", void 0);
234
264
  exports.HAccordionContent = tslib_es6.__decorate([
235
265
  phoenix_custom_element.phoenixCustomElement('h-accordion-content'),
236
266
  tslib_es6.__metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -52,7 +52,9 @@ exports.HAccordionGroup = class HAccordionGroup extends phoenix_light_lit_elemen
52
52
  this._accordionProps.subscribe(this._accordionPropsObserver);
53
53
  }
54
54
  disconnectedCallback() {
55
- this._accordionProps.unsubscribe(this._accordionPropsObserver);
55
+ var _a;
56
+ super.disconnectedCallback();
57
+ (_a = this._accordionProps) === null || _a === void 0 ? void 0 : _a.unsubscribe(this._accordionPropsObserver);
56
58
  this.removeEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
57
59
  }
58
60
  show() {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
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;"}
@@ -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;"}
@@ -3,6 +3,7 @@ import { PropertyValues } from 'lit';
3
3
  export declare class HAccordionContent extends PhoenixLightLitElement {
4
4
  transitionName: string;
5
5
  isDevAccordionOptimizationFlagEnabled: boolean;
6
+ isDevAccordionSafariFlashFixEnabled: boolean;
6
7
  private _transitionController;
7
8
  private _contextConsumer;
8
9
  private _accordionGroupProps;
@@ -12,6 +13,7 @@ export declare class HAccordionContent extends PhoenixLightLitElement {
12
13
  private _isTransitioning;
13
14
  private _resizeDebounceTimer;
14
15
  private _mutationDebounceTimer;
16
+ private _lastViewportWidth;
15
17
  private _mutationObserver;
16
18
  private _boundHandleTransitionEnd;
17
19
  private _boundHandleImageLoad;
@@ -20,6 +22,7 @@ export declare class HAccordionContent extends PhoenixLightLitElement {
20
22
  firstUpdated(props: PropertyValues): void;
21
23
  private _handleResizeObserver;
22
24
  private _updateOriginalHeight;
25
+ private _isIosViewportHeightOnlyResize;
23
26
  private _handleResize;
24
27
  private _setStylingOptions;
25
28
  private _setOriginalHeightValue;
@@ -15,10 +15,12 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
15
15
  super();
16
16
  this.transitionName = 'accordion-toggle';
17
17
  this.isDevAccordionOptimizationFlagEnabled = false;
18
+ this.isDevAccordionSafariFlashFixEnabled = false;
18
19
  this._resizeObserver = null;
19
20
  this._isTransitioning = false;
20
21
  this._resizeDebounceTimer = null;
21
22
  this._mutationDebounceTimer = null;
23
+ this._lastViewportWidth = window.innerWidth;
22
24
  this._mutationObserver = null;
23
25
  this._handleResizeObserver = () => {
24
26
  if (this._isTransitioning || this.hidden || this.style.height === '0px')
@@ -32,26 +34,47 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
32
34
  this.style.display = previousDisplay;
33
35
  };
34
36
  this._handleResize = () => {
37
+ if (this.isDevAccordionSafariFlashFixEnabled) {
38
+ if (this._isIosViewportHeightOnlyResize())
39
+ return;
40
+ this._lastViewportWidth = window.innerWidth;
41
+ }
35
42
  if (this._resizeDebounceTimer !== null) {
36
- window.cancelAnimationFrame(this._resizeDebounceTimer);
43
+ const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
44
+ clearMethod(this._resizeDebounceTimer);
45
+ }
46
+ if (this.isDevAccordionSafariFlashFixEnabled) {
47
+ this._resizeDebounceTimer = window.setTimeout(this._setStylingOptions, RESIZE_DEBOUNCE_MS);
48
+ }
49
+ else {
50
+ this._resizeDebounceTimer = requestAnimationFrame(() => {
51
+ setTimeout(() => {
52
+ this._setStylingOptions();
53
+ }, RESIZE_DEBOUNCE_MS);
54
+ });
37
55
  }
38
- this._resizeDebounceTimer = window.requestAnimationFrame(() => {
39
- setTimeout(() => {
40
- this._setStylingOptions();
41
- }, RESIZE_DEBOUNCE_MS);
42
- });
43
56
  };
44
57
  this._setStylingOptions = () => {
45
- requestAnimationFrame(() => {
58
+ if (this.isDevAccordionSafariFlashFixEnabled) {
46
59
  const previousDisplay = this.style.display;
47
60
  this.style.setProperty('display', 'block', 'important');
48
61
  this.style.height = 'auto';
62
+ this._setOriginalHeightValue(this.getBoundingClientRect().height);
63
+ this.style.display = previousDisplay;
64
+ this.style.height = this.hidden ? '0px' : this._originalHeight;
65
+ }
66
+ else {
49
67
  requestAnimationFrame(() => {
50
- this._setOriginalHeightValue(this.getBoundingClientRect().height);
51
- this.style.display = previousDisplay;
52
- this.style.height = this.hidden ? '0px' : this._originalHeight;
68
+ const previousDisplay = this.style.display;
69
+ this.style.setProperty('display', 'block', 'important');
70
+ this.style.height = 'auto';
71
+ requestAnimationFrame(() => {
72
+ this._setOriginalHeightValue(this.getBoundingClientRect().height);
73
+ this.style.display = previousDisplay;
74
+ this.style.height = this.hidden ? '0px' : this._originalHeight;
75
+ });
53
76
  });
54
- });
77
+ }
55
78
  };
56
79
  this._setOriginalHeightValue = (height) => {
57
80
  if (height !== 0 || this.children.length === 0) {
@@ -60,7 +83,7 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
60
83
  };
61
84
  this._handleMutation = () => {
62
85
  if (this._mutationDebounceTimer !== null) {
63
- window.clearTimeout(this._mutationDebounceTimer);
86
+ clearTimeout(this._mutationDebounceTimer);
64
87
  }
65
88
  this._mutationDebounceTimer = window.setTimeout(() => {
66
89
  requestAnimationFrame(() => {
@@ -144,6 +167,9 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
144
167
  this._setStylingOptions();
145
168
  }
146
169
  }
170
+ _isIosViewportHeightOnlyResize() {
171
+ return window.innerWidth === this._lastViewportWidth;
172
+ }
147
173
  _setupImageLoadListeners() {
148
174
  const images = this.querySelectorAll('img');
149
175
  images.forEach((img) => {
@@ -204,10 +230,11 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
204
230
  (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
205
231
  window.removeEventListener('resize', this._handleResize);
206
232
  if (this._resizeDebounceTimer !== null) {
207
- window.cancelAnimationFrame(this._resizeDebounceTimer);
233
+ const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
234
+ clearMethod(this._resizeDebounceTimer);
208
235
  }
209
236
  if (this._mutationDebounceTimer !== null) {
210
- window.clearTimeout(this._mutationDebounceTimer);
237
+ clearTimeout(this._mutationDebounceTimer);
211
238
  }
212
239
  }
213
240
  const images = this.querySelectorAll('img');
@@ -215,7 +242,6 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
215
242
  img.removeEventListener('load', this._boundHandleImageLoad);
216
243
  img.removeEventListener('error', this._boundHandleImageLoad);
217
244
  });
218
- window.removeEventListener('resize', this._handleResize);
219
245
  this.removeEventListener('transitionend', this._boundHandleTransitionEnd);
220
246
  }
221
247
  };
@@ -227,6 +253,10 @@ __decorate([
227
253
  property({ type: Boolean, attribute: 'is-dev-accordion-optimization-flag-enabled' }),
228
254
  __metadata("design:type", Boolean)
229
255
  ], HAccordionContent.prototype, "isDevAccordionOptimizationFlagEnabled", void 0);
256
+ __decorate([
257
+ property({ type: Boolean, attribute: 'is-dev-accordion-safari-flash-fix-enabled' }),
258
+ __metadata("design:type", Boolean)
259
+ ], HAccordionContent.prototype, "isDevAccordionSafariFlashFixEnabled", void 0);
230
260
  HAccordionContent = __decorate([
231
261
  phoenixCustomElement('h-accordion-content'),
232
262
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -48,7 +48,9 @@ let HAccordionGroup = class HAccordionGroup extends PhoenixLightLitElement {
48
48
  this._accordionProps.subscribe(this._accordionPropsObserver);
49
49
  }
50
50
  disconnectedCallback() {
51
- this._accordionProps.unsubscribe(this._accordionPropsObserver);
51
+ var _a;
52
+ super.disconnectedCallback();
53
+ (_a = this._accordionProps) === null || _a === void 0 ? void 0 : _a.unsubscribe(this._accordionPropsObserver);
52
54
  this.removeEventListener(ACCORDION_EVENTS.toggle, this._accordionToggle);
53
55
  }
54
56
  show() {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
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;"}
@@ -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;"}
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.39",
5
+ "version": "1.18.41",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",