@shoper/phoenix_design_system 1.18.42-0 → 1.18.43

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 (21) hide show
  1. package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js +5 -10
  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/input_stepper.js +0 -12
  4. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +0 -4
  6. package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/slider/slider.js +11 -50
  8. package/build/cjs/packages/phoenix/src/components/slider/slider.js.map +1 -1
  9. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.d.ts +0 -1
  10. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js +6 -11
  11. package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
  12. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +0 -2
  13. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +1 -13
  14. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
  15. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts +0 -3
  16. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +1 -4
  17. package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
  18. package/build/esm/packages/phoenix/src/components/slider/slider.d.ts +0 -3
  19. package/build/esm/packages/phoenix/src/components/slider/slider.js +11 -50
  20. package/build/esm/packages/phoenix/src/components/slider/slider.js.map +1 -1
  21. package/package.json +1 -1
@@ -21,10 +21,9 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
21
21
  };
22
22
  this.type = '';
23
23
  this.disabled = false;
24
- this.limitReached = false;
25
24
  this._dispatchStepperEvent = (ev) => {
26
25
  ev.stopImmediatePropagation();
27
- if (this.disabled || this.limitReached)
26
+ if (this.disabled)
28
27
  return;
29
28
  if (!this.type)
30
29
  throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
@@ -40,10 +39,10 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
40
39
  this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
41
40
  }
42
41
  updated(changedProperties) {
43
- if (changedProperties.has('disabled')) {
44
- this.disabled ? utilities.UiDomUtils.makeUnnavigable(this) : utilities.UiDomUtils.makeNavigable(this);
45
- }
46
- this.setAttribute('aria-disabled', String(this.disabled || this.limitReached));
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);
47
46
  }
48
47
  };
49
48
  tslib_es6.__decorate([
@@ -54,10 +53,6 @@ tslib_es6.__decorate([
54
53
  decorators.property({ type: Boolean, reflect: true }),
55
54
  tslib_es6.__metadata("design:type", Boolean)
56
55
  ], exports.HButtonStepper.prototype, "disabled", void 0);
57
- tslib_es6.__decorate([
58
- decorators.property({ type: Boolean, attribute: input_stepper_constants.INPUT_STEPPER_ATTRIBUTE_NAMES.limitReached }),
59
- tslib_es6.__metadata("design:type", Boolean)
60
- ], exports.HButtonStepper.prototype, "limitReached", void 0);
61
56
  exports.HButtonStepper = tslib_es6.__decorate([
62
57
  phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.button),
63
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;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;"}
@@ -23,7 +23,6 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
23
23
  this.max = Infinity;
24
24
  this.step = 1;
25
25
  this.disabled = false;
26
- this.disableButtonsAtLimits = false;
27
26
  this.increment = () => {
28
27
  if (this.disabled)
29
28
  return;
@@ -121,18 +120,11 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
121
120
  _outsideRangeEdges(number) {
122
121
  return number > this.max || number < this.min;
123
122
  }
124
- _markButtonsAtLimit() {
125
- this.querySelectorAll(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.button).forEach(($button) => {
126
- const isAtLimit = $button.getAttribute('type') === 'decrement' ? this.value <= this.min : this.value >= this.max;
127
- $button.toggleAttribute(input_stepper_constants.INPUT_STEPPER_ATTRIBUTE_NAMES.limitReached, this.disableButtonsAtLimits && isAtLimit);
128
- });
129
- }
130
123
  updated(changedProperties) {
131
124
  var _a;
132
125
  if (changedProperties.has('disabled')) {
133
126
  this.classList.toggle(input_stepper_constants.INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
134
127
  }
135
- this._markButtonsAtLimit();
136
128
  if (this._outsideRangeEdges(this.value))
137
129
  return;
138
130
  const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
@@ -172,10 +164,6 @@ tslib_es6.__decorate([
172
164
  decorators.property({ type: Boolean, reflect: true }),
173
165
  tslib_es6.__metadata("design:type", Boolean)
174
166
  ], exports.HInputStepper.prototype, "disabled", void 0);
175
- tslib_es6.__decorate([
176
- decorators.property({ type: Boolean, attribute: 'disable-buttons-at-limits' }),
177
- tslib_es6.__metadata("design:type", Boolean)
178
- ], exports.HInputStepper.prototype, "disableButtonsAtLimits", void 0);
179
167
  exports.HInputStepper = tslib_es6.__decorate([
180
168
  phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control),
181
169
  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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
@@ -21,9 +21,6 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
21
21
  input: 'h-display-stepper',
22
22
  button: 'h-button-stepper'
23
23
  };
24
- const INPUT_STEPPER_ATTRIBUTE_NAMES = {
25
- limitReached: 'limit-reached'
26
- };
27
24
  const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
28
25
  stepperContext: 'stepperContext'
29
26
  };
@@ -31,7 +28,6 @@ const INPUT_STEPPER_PROPS_TO_SYNC = {
31
28
  disabled: 'disabled'
32
29
  };
33
30
 
34
- exports.INPUT_STEPPER_ATTRIBUTE_NAMES = INPUT_STEPPER_ATTRIBUTE_NAMES;
35
31
  exports.INPUT_STEPPER_CLASS_NAMES = INPUT_STEPPER_CLASS_NAMES;
36
32
  exports.INPUT_STEPPER_COMPONENT_NAMES = INPUT_STEPPER_COMPONENT_NAMES;
37
33
  exports.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES;
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
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;"}
@@ -15,7 +15,6 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
15
15
  super(...arguments);
16
16
  this.settings = '';
17
17
  this.id = '';
18
- this.isSliderOptimizationFlagEnabled = false;
19
18
  this._settings = {
20
19
  mountOnConnectedCallback: true,
21
20
  type: 'loop',
@@ -36,35 +35,17 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
36
35
  if ($focusableSlideChildren.length === 0)
37
36
  return;
38
37
  let updateFocusability;
39
- if (this.isSliderOptimizationFlagEnabled) {
40
- updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? utilities.UiDomUtils.showFocusableElement : utilities.UiDomUtils.hideFocusableElement;
41
- }
42
- else {
43
- updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
44
- }
38
+ updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? utilities.UiDomUtils.showFocusableElement : utilities.UiDomUtils.hideFocusableElement;
45
39
  $focusableSlideChildren.forEach(($element) => updateFocusability($element));
46
40
  };
47
41
  this._scanMutationsForNewFocusableElements = (mutationList) => {
48
- if (this.isSliderOptimizationFlagEnabled) {
49
- for (const mutation of mutationList) {
50
- for (const addedNode of mutation.addedNodes) {
51
- if (!(addedNode instanceof HTMLElement))
52
- continue;
53
- if (utilities.UiDomUtils.isFocusable(addedNode))
54
- this._initializeFocusableElement(addedNode);
55
- const $focusableChildren = [...addedNode.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
56
- $focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
57
- }
58
- }
59
- }
60
- else {
61
- for (const mutation of mutationList) {
62
- if (mutation.type !== 'childList')
42
+ for (const mutation of mutationList) {
43
+ for (const addedNode of mutation.addedNodes) {
44
+ if (!(addedNode instanceof HTMLElement))
63
45
  continue;
64
- const $target = mutation.target;
65
- const isFocusable = utilities.UiDomUtils.isFocusable($target);
66
- const $focusableChildren = [...$target.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
67
- isFocusable && this._initializeFocusableElement($target);
46
+ if (utilities.UiDomUtils.isFocusable(addedNode))
47
+ this._initializeFocusableElement(addedNode);
48
+ const $focusableChildren = [...addedNode.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
68
49
  $focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
69
50
  }
70
51
  }
@@ -96,22 +77,8 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
96
77
  }
97
78
  this._slider.on('visible', this._showFocusableNodes);
98
79
  this._slider.on('hidden', this._hideFocusableNodes);
99
- if (this.isSliderOptimizationFlagEnabled) {
100
- this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
101
- this._mutationObserver.observe(this, { childList: true, subtree: true });
102
- }
103
- else {
104
- const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
105
- mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
106
- }
107
- }
108
- _showFocusableElement($element) {
109
- $element.setAttribute('tabindex', '0');
110
- $element.removeAttribute('aria-hidden');
111
- }
112
- _hideFocusableElement($element) {
113
- $element.setAttribute('tabindex', '-1');
114
- $element.setAttribute('aria-hidden', 'true');
80
+ this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
81
+ this._mutationObserver.observe(this, { childList: true, subtree: true });
115
82
  }
116
83
  getSlider() {
117
84
  return this._slider;
@@ -121,10 +88,8 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
121
88
  super.disconnectedCallback();
122
89
  (_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
123
90
  (_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
124
- if (this.isSliderOptimizationFlagEnabled) {
125
- (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
126
- this._mutationObserver = null;
127
- }
91
+ (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
92
+ this._mutationObserver = null;
128
93
  }
129
94
  };
130
95
  tslib_es6.__decorate([
@@ -135,10 +100,6 @@ tslib_es6.__decorate([
135
100
  decorators.property(),
136
101
  tslib_es6.__metadata("design:type", String)
137
102
  ], exports.HSlider.prototype, "id", void 0);
138
- tslib_es6.__decorate([
139
- decorators.property({ attribute: 'is-slider-optimization-flag-enabled' }),
140
- tslib_es6.__metadata("design:type", Boolean)
141
- ], exports.HSlider.prototype, "isSliderOptimizationFlagEnabled", void 0);
142
103
  exports.HSlider = tslib_es6.__decorate([
143
104
  phoenix_custom_element.phoenixCustomElement('h-slider')
144
105
  ], exports.HSlider);
@@ -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,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -5,7 +5,6 @@ export declare class HButtonStepper extends PhoenixLightLitElement {
5
5
  private _allowedEvents;
6
6
  type: string;
7
7
  disabled: boolean;
8
- limitReached: boolean;
9
8
  constructor();
10
9
  connectedCallback(): void;
11
10
  updated(changedProperties: PropertyValues): void;
@@ -6,7 +6,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
6
6
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
7
7
  import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
8
8
  import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
9
- import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_ATTRIBUTE_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
9
+ import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
10
10
 
11
11
  let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
12
12
  constructor() {
@@ -17,10 +17,9 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
17
17
  };
18
18
  this.type = '';
19
19
  this.disabled = false;
20
- this.limitReached = false;
21
20
  this._dispatchStepperEvent = (ev) => {
22
21
  ev.stopImmediatePropagation();
23
- if (this.disabled || this.limitReached)
22
+ if (this.disabled)
24
23
  return;
25
24
  if (!this.type)
26
25
  throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
@@ -36,10 +35,10 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
36
35
  this.addEventListener(INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
37
36
  }
38
37
  updated(changedProperties) {
39
- if (changedProperties.has('disabled')) {
40
- this.disabled ? UiDomUtils.makeUnnavigable(this) : UiDomUtils.makeNavigable(this);
41
- }
42
- this.setAttribute('aria-disabled', String(this.disabled || this.limitReached));
38
+ if (!changedProperties.has('disabled'))
39
+ return;
40
+ this.setAttribute('aria-disabled', String(this.disabled));
41
+ this.disabled ? UiDomUtils.makeUnnavigable(this) : UiDomUtils.makeNavigable(this);
43
42
  }
44
43
  };
45
44
  __decorate([
@@ -50,10 +49,6 @@ __decorate([
50
49
  property({ type: Boolean, reflect: true }),
51
50
  __metadata("design:type", Boolean)
52
51
  ], HButtonStepper.prototype, "disabled", void 0);
53
- __decorate([
54
- property({ type: Boolean, attribute: INPUT_STEPPER_ATTRIBUTE_NAMES.limitReached }),
55
- __metadata("design:type", Boolean)
56
- ], HButtonStepper.prototype, "limitReached", void 0);
57
52
  HButtonStepper = __decorate([
58
53
  phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.button),
59
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;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;"}
@@ -12,7 +12,6 @@ export declare class HInputStepper extends PhoenixLightLitElement {
12
12
  max: number;
13
13
  step: number;
14
14
  disabled: boolean;
15
- disableButtonsAtLimits: boolean;
16
15
  constructor();
17
16
  connectedCallback(): void;
18
17
  disconnectedCallback(): void;
@@ -24,7 +23,6 @@ export declare class HInputStepper extends PhoenixLightLitElement {
24
23
  private _calculateFractionDigitsByStepSize;
25
24
  private _roundToFractionDigits;
26
25
  private _outsideRangeEdges;
27
- private _markButtonsAtLimit;
28
26
  private _dispatchChangedValue;
29
27
  updated(changedProperties: PropertyValues): void;
30
28
  }
@@ -6,7 +6,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
6
6
  import { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior_subject.js';
7
7
  import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
8
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_COMPONENT_NAMES, INPUT_STEPPER_ATTRIBUTE_NAMES, INPUT_STEPPER_CLASS_NAMES } from './input_stepper_constants.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';
10
10
 
11
11
  let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
12
12
  constructor() {
@@ -19,7 +19,6 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
19
19
  this.max = Infinity;
20
20
  this.step = 1;
21
21
  this.disabled = false;
22
- this.disableButtonsAtLimits = false;
23
22
  this.increment = () => {
24
23
  if (this.disabled)
25
24
  return;
@@ -117,18 +116,11 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
117
116
  _outsideRangeEdges(number) {
118
117
  return number > this.max || number < this.min;
119
118
  }
120
- _markButtonsAtLimit() {
121
- this.querySelectorAll(INPUT_STEPPER_COMPONENT_NAMES.button).forEach(($button) => {
122
- const isAtLimit = $button.getAttribute('type') === 'decrement' ? this.value <= this.min : this.value >= this.max;
123
- $button.toggleAttribute(INPUT_STEPPER_ATTRIBUTE_NAMES.limitReached, this.disableButtonsAtLimits && isAtLimit);
124
- });
125
- }
126
119
  updated(changedProperties) {
127
120
  var _a;
128
121
  if (changedProperties.has('disabled')) {
129
122
  this.classList.toggle(INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
130
123
  }
131
- this._markButtonsAtLimit();
132
124
  if (this._outsideRangeEdges(this.value))
133
125
  return;
134
126
  const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
@@ -168,10 +160,6 @@ __decorate([
168
160
  property({ type: Boolean, reflect: true }),
169
161
  __metadata("design:type", Boolean)
170
162
  ], HInputStepper.prototype, "disabled", void 0);
171
- __decorate([
172
- property({ type: Boolean, attribute: 'disable-buttons-at-limits' }),
173
- __metadata("design:type", Boolean)
174
- ], HInputStepper.prototype, "disableButtonsAtLimits", void 0);
175
163
  HInputStepper = __decorate([
176
164
  phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.control),
177
165
  __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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
@@ -17,9 +17,6 @@ export declare const INPUT_STEPPER_COMPONENT_NAMES: {
17
17
  readonly input: "h-display-stepper";
18
18
  readonly button: "h-button-stepper";
19
19
  };
20
- export declare const INPUT_STEPPER_ATTRIBUTE_NAMES: {
21
- readonly limitReached: "limit-reached";
22
- };
23
20
  export declare const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES: {
24
21
  readonly stepperContext: "stepperContext";
25
22
  };
@@ -17,9 +17,6 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
17
17
  input: 'h-display-stepper',
18
18
  button: 'h-button-stepper'
19
19
  };
20
- const INPUT_STEPPER_ATTRIBUTE_NAMES = {
21
- limitReached: 'limit-reached'
22
- };
23
20
  const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
24
21
  stepperContext: 'stepperContext'
25
22
  };
@@ -27,5 +24,5 @@ const INPUT_STEPPER_PROPS_TO_SYNC = {
27
24
  disabled: 'disabled'
28
25
  };
29
26
 
30
- export { INPUT_STEPPER_ATTRIBUTE_NAMES, 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 };
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 };
31
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;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;"}
@@ -3,7 +3,6 @@ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/pho
3
3
  export declare class HSlider extends PhoenixLightLitElement {
4
4
  settings: string;
5
5
  id: string;
6
- isSliderOptimizationFlagEnabled: boolean;
7
6
  get sliderSettings(): ISliderOptions;
8
7
  set sliderSettings(newSettingsObject: ISliderOptions);
9
8
  private _settings;
@@ -14,8 +13,6 @@ export declare class HSlider extends PhoenixLightLitElement {
14
13
  private _showFocusableNodes;
15
14
  private _hideFocusableNodes;
16
15
  private _handleFocusableNodes;
17
- private _showFocusableElement;
18
- private _hideFocusableElement;
19
16
  private _scanMutationsForNewFocusableElements;
20
17
  private _initializeFocusableElement;
21
18
  getSlider(): ISlider | null;
@@ -11,7 +11,6 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
11
11
  super(...arguments);
12
12
  this.settings = '';
13
13
  this.id = '';
14
- this.isSliderOptimizationFlagEnabled = false;
15
14
  this._settings = {
16
15
  mountOnConnectedCallback: true,
17
16
  type: 'loop',
@@ -32,35 +31,17 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
32
31
  if ($focusableSlideChildren.length === 0)
33
32
  return;
34
33
  let updateFocusability;
35
- if (this.isSliderOptimizationFlagEnabled) {
36
- updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? UiDomUtils.showFocusableElement : UiDomUtils.hideFocusableElement;
37
- }
38
- else {
39
- updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
40
- }
34
+ updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? UiDomUtils.showFocusableElement : UiDomUtils.hideFocusableElement;
41
35
  $focusableSlideChildren.forEach(($element) => updateFocusability($element));
42
36
  };
43
37
  this._scanMutationsForNewFocusableElements = (mutationList) => {
44
- if (this.isSliderOptimizationFlagEnabled) {
45
- for (const mutation of mutationList) {
46
- for (const addedNode of mutation.addedNodes) {
47
- if (!(addedNode instanceof HTMLElement))
48
- continue;
49
- if (UiDomUtils.isFocusable(addedNode))
50
- this._initializeFocusableElement(addedNode);
51
- const $focusableChildren = [...addedNode.querySelectorAll(UiDomUtils.getFocusableSelector())];
52
- $focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
53
- }
54
- }
55
- }
56
- else {
57
- for (const mutation of mutationList) {
58
- if (mutation.type !== 'childList')
38
+ for (const mutation of mutationList) {
39
+ for (const addedNode of mutation.addedNodes) {
40
+ if (!(addedNode instanceof HTMLElement))
59
41
  continue;
60
- const $target = mutation.target;
61
- const isFocusable = UiDomUtils.isFocusable($target);
62
- const $focusableChildren = [...$target.querySelectorAll(UiDomUtils.getFocusableSelector())];
63
- isFocusable && this._initializeFocusableElement($target);
42
+ if (UiDomUtils.isFocusable(addedNode))
43
+ this._initializeFocusableElement(addedNode);
44
+ const $focusableChildren = [...addedNode.querySelectorAll(UiDomUtils.getFocusableSelector())];
64
45
  $focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
65
46
  }
66
47
  }
@@ -92,22 +73,8 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
92
73
  }
93
74
  this._slider.on('visible', this._showFocusableNodes);
94
75
  this._slider.on('hidden', this._hideFocusableNodes);
95
- if (this.isSliderOptimizationFlagEnabled) {
96
- this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
97
- this._mutationObserver.observe(this, { childList: true, subtree: true });
98
- }
99
- else {
100
- const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
101
- mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
102
- }
103
- }
104
- _showFocusableElement($element) {
105
- $element.setAttribute('tabindex', '0');
106
- $element.removeAttribute('aria-hidden');
107
- }
108
- _hideFocusableElement($element) {
109
- $element.setAttribute('tabindex', '-1');
110
- $element.setAttribute('aria-hidden', 'true');
76
+ this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
77
+ this._mutationObserver.observe(this, { childList: true, subtree: true });
111
78
  }
112
79
  getSlider() {
113
80
  return this._slider;
@@ -117,10 +84,8 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
117
84
  super.disconnectedCallback();
118
85
  (_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
119
86
  (_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
120
- if (this.isSliderOptimizationFlagEnabled) {
121
- (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
122
- this._mutationObserver = null;
123
- }
87
+ (_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
88
+ this._mutationObserver = null;
124
89
  }
125
90
  };
126
91
  __decorate([
@@ -131,10 +96,6 @@ __decorate([
131
96
  property(),
132
97
  __metadata("design:type", String)
133
98
  ], HSlider.prototype, "id", void 0);
134
- __decorate([
135
- property({ attribute: 'is-slider-optimization-flag-enabled' }),
136
- __metadata("design:type", Boolean)
137
- ], HSlider.prototype, "isSliderOptimizationFlagEnabled", void 0);
138
99
  HSlider = __decorate([
139
100
  phoenixCustomElement('h-slider')
140
101
  ], HSlider);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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.42-0",
5
+ "version": "1.18.43",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",