@shoper/phoenix_design_system 1.2.18 → 1.2.20

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.
@@ -125,8 +125,9 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
125
125
  render() {
126
126
  return lit.html `
127
127
  ${this.getSlot('default')}
128
- ${this._$colors.length > this.numberOfVisibleColors &&
129
- lit.html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`}
128
+ ${this._$colors.length > this.numberOfVisibleColors
129
+ ? lit.html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
130
+ : lit.nothing}
130
131
  `;
131
132
  }
132
133
  };
@@ -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;"}
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;"}
@@ -116,7 +116,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
116
116
  : select_utils.SelectControlUtils.getLastIndexOfSelectedOption(htmlOptions);
117
117
  }
118
118
  set selectedIndex(index) {
119
- const option = Object.values(this._$options)[index];
119
+ const option = Object.values(this._$options).filter(($option) => !$option.hidden)[index];
120
120
  option ? this._selectOption(option.value) : this._selectController.deselectAll();
121
121
  Object.values(this._$options).forEach(($option) => this.updateOptionAriaAttribute($option));
122
122
  }
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
- import { html } from 'lit';
2
+ import { html, nothing } from 'lit';
3
3
  import { property } from 'lit/decorators';
4
4
  import { ArrayUtils } from '@dreamcommerce/utilities';
5
5
  import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
@@ -121,8 +121,9 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
121
121
  render() {
122
122
  return html `
123
123
  ${this.getSlot('default')}
124
- ${this._$colors.length > this.numberOfVisibleColors &&
125
- html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`}
124
+ ${this._$colors.length > this.numberOfVisibleColors
125
+ ? html `<h-color-swatches-show-more>${this.showMoreBtnText}</h-color-swatches-show-more>`
126
+ : nothing}
126
127
  `;
127
128
  }
128
129
  };
@@ -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;"}
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;"}
@@ -1,6 +1,8 @@
1
1
  import { HRadio } from "./radio";
2
2
  import { HRadioContent } from "./radio_content";
3
3
  import { HRadioControl } from "./radio_control";
4
+ import { RADIO_CONTROL_VARIANTS } from "./radio_constants";
5
+ import { Any } from 'ts-toolbelt';
4
6
  declare global {
5
7
  interface HTMLElementTagNameMap {
6
8
  'h-radio': HRadio;
@@ -16,3 +18,4 @@ declare global {
16
18
  'h-radio-control': HRadioControl;
17
19
  }
18
20
  }
21
+ export declare type TRadioVariant = Any.Keys<typeof RADIO_CONTROL_VARIANTS>;
@@ -1,4 +1,6 @@
1
1
  import '@phoenixRoot/components/form/radio/radio';
2
2
  import '@phoenixRoot/components/form/radio/radio_content';
3
3
  import '@phoenixRoot/components/form/radio/radio_control';
4
+ import '@phoenixRoot/components/form/radio/radio_constants';
5
+ import 'ts-toolbelt';
4
6
  //# sourceMappingURL=radio_types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/radio/radio_types.ts"],"names":[],"mappings":"AAAA,OAAuB,0CAA0C,CAAC;AAClE,OAA8B,kDAAkD,CAAC;AACjF,OAA8B,kDAAkD,CAAC"}
1
+ {"version":3,"file":"radio_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/radio/radio_types.ts"],"names":[],"mappings":"AAAA,OAAuB,0CAA0C,CAAC;AAClE,OAA8B,kDAAkD,CAAC;AACjF,OAA8B,kDAAkD,CAAC;AACjF,OAAuC,oDAAoD,CAAC;AAC5F,OAAoB,aAAa,CAAC"}
@@ -112,7 +112,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
112
112
  : SelectControlUtils.getLastIndexOfSelectedOption(htmlOptions);
113
113
  }
114
114
  set selectedIndex(index) {
115
- const option = Object.values(this._$options)[index];
115
+ const option = Object.values(this._$options).filter(($option) => !$option.hidden)[index];
116
116
  option ? this._selectOption(option.value) : this._selectController.deselectAll();
117
117
  Object.values(this._$options).forEach(($option) => this.updateOptionAriaAttribute($option));
118
118
  }
@@ -49,6 +49,7 @@ export { HRadioControl } from './components/form/radio/radio_control';
49
49
  export * from './components/form/radio/radio_types';
50
50
  export * from './components/form/radio/radio_constants';
51
51
  export { RADIO_CONTROL_VARIANTS, RADIO_CONTROL_CSS_CLASSES } from "./components/form/radio/radio_constants";
52
+ export { TRadioVariant } from "./components/form/radio/radio_types";
52
53
  export { HTextarea } from './components/form/textarea/textarea';
53
54
  export { HTextareaControl } from './components/form/textarea/textarea_control';
54
55
  export * from './components/form/textarea/textarea_types';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@shoper/phoenix_design_system",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "1.2.18",
5
+ "version": "1.2.20",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",