@infineon/infineon-design-system-stencil 34.1.0 → 34.1.1--canary.1879.f724e4188e39c07e6a2c7d0b211844eb866eea3c.0

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 (30) hide show
  1. package/dist/cjs/ifx-select.cjs.entry.js +3 -3
  2. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
  3. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/components/select/single-select/select.js +20 -3
  6. package/dist/collection/components/select/single-select/select.js.map +1 -1
  7. package/dist/collection/components/select/single-select/select.stories.js +6 -0
  8. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  9. package/dist/components/ifx-pagination.js +1 -1
  10. package/dist/components/ifx-select.js +1 -1
  11. package/dist/components/ifx-set-filter.js +1 -1
  12. package/dist/components/ifx-table.js +2 -2
  13. package/dist/components/{p-75572595.js → p-4616b2b3.js} +5 -4
  14. package/dist/components/p-4616b2b3.js.map +1 -0
  15. package/dist/components/{p-26dfe620.js → p-939bfa0c.js} +2 -2
  16. package/dist/components/{p-26dfe620.js.map → p-939bfa0c.js.map} +1 -1
  17. package/dist/esm/ifx-select.entry.js +3 -3
  18. package/dist/esm/ifx-select.entry.js.map +1 -1
  19. package/dist/esm/infineon-design-system-stencil.js +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  22. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  23. package/dist/infineon-design-system-stencil/{p-cbd79068.entry.js → p-9eeb5942.entry.js} +2 -2
  24. package/dist/infineon-design-system-stencil/p-9eeb5942.entry.js.map +1 -0
  25. package/dist/types/components/select/single-select/select.d.ts +1 -1
  26. package/dist/types/components/select/single-select/select.stories.d.ts +6 -0
  27. package/dist/types/components.d.ts +1 -0
  28. package/package.json +1 -1
  29. package/dist/components/p-75572595.js.map +0 -1
  30. package/dist/infineon-design-system-stencil/p-cbd79068.entry.js.map +0 -1
@@ -152,6 +152,12 @@ export default {
152
152
  },
153
153
  },
154
154
  },
155
+ clearSelection: {
156
+ description: 'Public method for clearing the selected options',
157
+ table: {
158
+ category: 'ifx-select public methods',
159
+ }
160
+ }
155
161
  },
156
162
  };
157
163
  const DefaultTemplate = args => {
@@ -1 +1 @@
1
- {"version":3,"file":"select.stories.js","sourceRoot":"","sources":["../../../../src/components/select/single-select/select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,+FAA+F;AAC/F,yLAAyL;AACzL,MAAM,OAAO,GAAG;IACd;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC;AAEF,eAAe;IACb,KAAK,EAAE,iCAAiC;IACxC,sBAAsB;IACtB,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,GAAG;QACT,UAAU,EAAE,IAAI;QAChB,sBAAsB,EAAE,WAAW;QACnC,WAAW,EAAE,IAAI;QACjB,gBAAgB,EAAE,aAAa;QAC/B,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,IAAI;QACrB,6CAA6C;KAC9C;IAED,QAAQ,EAAE;QACR,qCAAqC;QACrC,mCAAmC;QACnC,oBAAoB;QACpB,KAAK;QACL,IAAI,EAAE;YACJ,WAAW,EAAE,kEAAkE;YAC/E,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAA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,CAAC,aAAa,CAAC,YAAY,CAAC,0CAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/C,MAAM,CAAC,IAAI,GAAG;IACZ,kBAAkB;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,gDAAgD;AAChD,gBAAgB;AAChB,kBAAkB;AAClB,kBAAkB;AAClB,0BAA0B;AAC1B,qBAAqB;AACrB,oBAAoB;AACpB,qBAAqB;AACrB,qBAAqB;AACrB,KAAK;AAEL,gDAAgD;AAChD,gBAAgB;AAChB,sBAAsB;AACtB,sBAAsB;AACtB,6CAA6C;AAC7C,KAAK;AAEL,0DAA0D;AAC1D,0BAA0B;AAC1B,oBAAoB;AACpB,uHAAuH;AACvH,KAAK;AAEL,+DAA+D;AAC/D,+BAA+B;AAC/B,sBAAsB;AACtB,+BAA+B;AAC/B,KAAK","sourcesContent":["import { action } from '@storybook/addon-actions';\n\n//use string instead of json format here to avoid ugly formatting in the storybook code snippet\n// let options = \"[{'value': 'a','label': 'option a','selected': 'false'},{'value': 'b','label': 'option b','selected': 'false'},{'value': 'c','label': 'option c','selected': 'false'}]\"\nconst options = [\n {\n value: 'a',\n label: 'option a',\n selected: false,\n },\n {\n value: 'b',\n label: 'option b',\n selected: false,\n },\n {\n value: 'c',\n label: 'option c',\n selected: false,\n },\n];\n\nexport default {\n title: 'Components/Select/Single Select',\n // tags: ['autodocs'],\n args: {\n label: '',\n size: 'm',\n showSearch: true,\n searchPlaceholderValue: 'Search...',\n placeholder: true,\n placeholderValue: 'Placeholder',\n error: false,\n errorMessage: 'Some error',\n disabled: false,\n showClearButton: true\n // type: 'single', //for later implementation\n },\n\n argTypes: {\n // type: { //for later implementation\n // // control: { type: 'radio' },\n // control: false,\n // },\n size: {\n description: 'Specifies the size. Options: small - s (36px) medium - m (40px).',\n control: 'radio',\n options: ['s', 'm'],\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n placeholder: {\n description: 'Determines whether a placeholder is displayed or not.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n placeholderValue: {\n description: 'Sets the text displayed as the placeholder when placeholder is set to true.',\n table: {\n category: 'ifx-select props'\n }\n },\n error: {\n description: 'Displays an error state.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: false\n }\n }\n },\n errorMessage: {\n description: 'Message displayed when error is set to true.',\n table: {\n category: 'ifx-select props'\n }\n },\n label: {\n description: 'Sets the label.',\n table: {\n category: 'ifx-select props'\n }\n },\n disabled: {\n description: 'Disables the dropdown.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: false\n }\n }\n },\n showSearch: {\n description: 'Enables a search bar inside the dropdown to filter options.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n showClearButton: {\n description: 'Shows the clear icon button.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n searchPlaceholderValue: {\n description: 'Placeholder text for the search input field.',\n table: {\n category: 'ifx-select props'\n }\n },\n options: {\n description: 'Takes an array of objects in the following format.',\n table: {\n category: 'ifx-select props'\n }\n },\n ifxSelect: {\n action: 'ifxSelect',\n description: 'Custom event emitted when item is selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxSelect={handleInput}\\nVue:@ifxSelect=\"handleInput\"\\nAngular:(ifxSelect)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxSelect\", (event) => {//handle input});',\n },\n },\n },\n ifxInput: {\n action: 'ifxInput',\n description: 'A custom event *ifxInput* is emitted immediately after the value of *Search* changes.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxInput={handleInput}\\nVue:@ifxInput=\"handleInput\"\\nAngular:(ifxInput)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxInput\", (event) => {//handle input});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const template = `<ifx-select \n size='${args.size}'\n placeholder='${args.placeholder}'\n show-clear-button='${args.showClearButton}'\n show-search='${args.showSearch}'\n search-placeholder-value='${args.searchPlaceholderValue}'\n disabled='${args.disabled}'\n error='${args.error}'\n error-message='${args.errorMessage}'\n label='${args.label}'\n placeholder-value='${args.placeholderValue}'\n options='${JSON.stringify(args.options)}' >\n </ifx-select>`;\n setTimeout(() => {\n document.querySelector('ifx-select')?.addEventListener('ifxSelect', action('ifxSelect'));\n document.querySelector('ifx-select')?.addEventListener('ifxInput', action('ifxInput'));\n }, 0);\n\n return template;\n};\n\nexport const Single = DefaultTemplate.bind({});\nSingle.args = {\n // type: 'single',\n options: options,\n};\n\n// export const Text = DefaultTemplate.bind({});\n// Text.args = {\n// type: 'text',\n// name: 'text',\n// value: 'Placeholder',\n// allowHTML: true,\n// delimiter: ',',\n// editItems: true,\n// maxItemCount: 5,\n// };\n\n// export const Text = DefaultTemplate.bind({});\n// Text.args = {\n// type: 'multiple',\n// name: 'multiple',\n// choices: 'Choice 1, Choice 2, Choice 3',\n// };\n\n// export const SingleWithIcon = DefaultTemplate.bind({});\n// SingleWithIcon.args = {\n// type: 'single',\n// choices: \"Choice 1, Choice 2 <ifx-icon icon='check16'></ifx-icon>, Choice 3 <ifx-icon icon='check16'></ifx-icon>\",\n// };\n\n// export const MultiselectCombobox = DefaultTemplate.bind({});\n// MultiselectCombobox.args = {\n// type: 'multiple',\n// // removeItemButton: true,\n// };\n"]}
1
+ {"version":3,"file":"select.stories.js","sourceRoot":"","sources":["../../../../src/components/select/single-select/select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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/C,MAAM,CAAC,IAAI,GAAG;IACZ,kBAAkB;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,gDAAgD;AAChD,gBAAgB;AAChB,kBAAkB;AAClB,kBAAkB;AAClB,0BAA0B;AAC1B,qBAAqB;AACrB,oBAAoB;AACpB,qBAAqB;AACrB,qBAAqB;AACrB,KAAK;AAEL,gDAAgD;AAChD,gBAAgB;AAChB,sBAAsB;AACtB,sBAAsB;AACtB,6CAA6C;AAC7C,KAAK;AAEL,0DAA0D;AAC1D,0BAA0B;AAC1B,oBAAoB;AACpB,uHAAuH;AACvH,KAAK;AAEL,+DAA+D;AAC/D,+BAA+B;AAC/B,sBAAsB;AACtB,+BAA+B;AAC/B,KAAK","sourcesContent":["import { action } from '@storybook/addon-actions';\n\n//use string instead of json format here to avoid ugly formatting in the storybook code snippet\n// let options = \"[{'value': 'a','label': 'option a','selected': 'false'},{'value': 'b','label': 'option b','selected': 'false'},{'value': 'c','label': 'option c','selected': 'false'}]\"\nconst options = [\n {\n value: 'a',\n label: 'option a',\n selected: false,\n },\n {\n value: 'b',\n label: 'option b',\n selected: false,\n },\n {\n value: 'c',\n label: 'option c',\n selected: false,\n },\n];\n\nexport default {\n title: 'Components/Select/Single Select',\n // tags: ['autodocs'],\n args: {\n label: '',\n size: 'm',\n showSearch: true,\n searchPlaceholderValue: 'Search...',\n placeholder: true,\n placeholderValue: 'Placeholder',\n error: false,\n errorMessage: 'Some error',\n disabled: false,\n showClearButton: true\n // type: 'single', //for later implementation\n },\n\n argTypes: {\n // type: { //for later implementation\n // // control: { type: 'radio' },\n // control: false,\n // },\n size: {\n description: 'Specifies the size. Options: small - s (36px) medium - m (40px).',\n control: 'radio',\n options: ['s', 'm'],\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n placeholder: {\n description: 'Determines whether a placeholder is displayed or not.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n placeholderValue: {\n description: 'Sets the text displayed as the placeholder when placeholder is set to true.',\n table: {\n category: 'ifx-select props'\n }\n },\n error: {\n description: 'Displays an error state.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: false\n }\n }\n },\n errorMessage: {\n description: 'Message displayed when error is set to true.',\n table: {\n category: 'ifx-select props'\n }\n },\n label: {\n description: 'Sets the label.',\n table: {\n category: 'ifx-select props'\n }\n },\n disabled: {\n description: 'Disables the dropdown.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: false\n }\n }\n },\n showSearch: {\n description: 'Enables a search bar inside the dropdown to filter options.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n showClearButton: {\n description: 'Shows the clear icon button.',\n control: 'boolean',\n table: {\n category: 'ifx-select props',\n defaultValue: {\n summary: true\n }\n }\n },\n searchPlaceholderValue: {\n description: 'Placeholder text for the search input field.',\n table: {\n category: 'ifx-select props'\n }\n },\n options: {\n description: 'Takes an array of objects in the following format.',\n table: {\n category: 'ifx-select props'\n }\n },\n ifxSelect: {\n action: 'ifxSelect',\n description: 'Custom event emitted when item is selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxSelect={handleInput}\\nVue:@ifxSelect=\"handleInput\"\\nAngular:(ifxSelect)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxSelect\", (event) => {//handle input});',\n },\n },\n },\n ifxInput: {\n action: 'ifxInput',\n description: 'A custom event *ifxInput* is emitted immediately after the value of *Search* changes.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxInput={handleInput}\\nVue:@ifxInput=\"handleInput\"\\nAngular:(ifxInput)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxInput\", (event) => {//handle input});',\n },\n },\n },\n clearSelection: {\n description: 'Public method for clearing the selected options',\n table: {\n category: 'ifx-select public methods',\n }\n }\n },\n};\n\nconst DefaultTemplate = args => {\n const template = `<ifx-select \n size='${args.size}'\n placeholder='${args.placeholder}'\n show-clear-button='${args.showClearButton}'\n show-search='${args.showSearch}'\n search-placeholder-value='${args.searchPlaceholderValue}'\n disabled='${args.disabled}'\n error='${args.error}'\n error-message='${args.errorMessage}'\n label='${args.label}'\n placeholder-value='${args.placeholderValue}'\n options='${JSON.stringify(args.options)}' >\n </ifx-select>`;\n setTimeout(() => {\n document.querySelector('ifx-select')?.addEventListener('ifxSelect', action('ifxSelect'));\n document.querySelector('ifx-select')?.addEventListener('ifxInput', action('ifxInput'));\n }, 0);\n\n return template;\n};\n\nexport const Single = DefaultTemplate.bind({});\nSingle.args = {\n // type: 'single',\n options: options,\n};\n\n// export const Text = DefaultTemplate.bind({});\n// Text.args = {\n// type: 'text',\n// name: 'text',\n// value: 'Placeholder',\n// allowHTML: true,\n// delimiter: ',',\n// editItems: true,\n// maxItemCount: 5,\n// };\n\n// export const Text = DefaultTemplate.bind({});\n// Text.args = {\n// type: 'multiple',\n// name: 'multiple',\n// choices: 'Choice 1, Choice 2, Choice 3',\n// };\n\n// export const SingleWithIcon = DefaultTemplate.bind({});\n// SingleWithIcon.args = {\n// type: 'single',\n// choices: \"Choice 1, Choice 2 <ifx-icon icon='check16'></ifx-icon>, Choice 3 <ifx-icon icon='check16'></ifx-icon>\",\n// };\n\n// export const MultiselectCombobox = DefaultTemplate.bind({});\n// MultiselectCombobox.args = {\n// type: 'multiple',\n// // removeItemButton: true,\n// };\n"]}
@@ -1,4 +1,4 @@
1
- import { P as Pagination, d as defineCustomElement$1 } from './p-26dfe620.js';
1
+ import { P as Pagination, d as defineCustomElement$1 } from './p-939bfa0c.js';
2
2
 
3
3
  const IfxPagination = Pagination;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { C as Choices, d as defineCustomElement$1 } from './p-75572595.js';
1
+ import { C as Choices, d as defineCustomElement$1 } from './p-4616b2b3.js';
2
2
 
3
3
  const IfxSelect = Choices;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { d as defineCustomElement$7 } from './p-3ec421ea.js';
3
3
  import { d as defineCustomElement$6 } from './p-68016aea.js';
4
4
  import { d as defineCustomElement$5 } from './p-11e95622.js';
5
5
  import { d as defineCustomElement$4 } from './p-a957f7ad.js';
6
- import { d as defineCustomElement$3 } from './p-75572595.js';
6
+ import { d as defineCustomElement$3 } from './p-4616b2b3.js';
7
7
  import { d as defineCustomElement$2 } from './p-ab5c15bf.js';
8
8
 
9
9
  const setFilterCss = "";
@@ -8,8 +8,8 @@ import { d as defineCustomElement$7 } from './p-b5256810.js';
8
8
  import { d as defineCustomElement$6 } from './p-11e95622.js';
9
9
  import { d as defineCustomElement$5 } from './p-e3cd5556.js';
10
10
  import { d as defineCustomElement$4 } from './p-08b10f2b.js';
11
- import { d as defineCustomElement$3 } from './p-26dfe620.js';
12
- import { d as defineCustomElement$2 } from './p-75572595.js';
11
+ import { d as defineCustomElement$3 } from './p-939bfa0c.js';
12
+ import { d as defineCustomElement$2 } from './p-4616b2b3.js';
13
13
 
14
14
  class ButtonCellRenderer {
15
15
  init(params) {
@@ -6860,7 +6860,7 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
6860
6860
  this.choice.enable();
6861
6861
  }
6862
6862
  }
6863
- handleDeleteSelection() {
6863
+ async clearSelection() {
6864
6864
  this.clearInput();
6865
6865
  this.clearSelectField();
6866
6866
  this.setPreSelected(null);
@@ -7056,9 +7056,9 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7056
7056
  // destroy choices element to restore previous dom structure
7057
7057
  // so vdom can replace the element correctly
7058
7058
  this.destroy();
7059
- return (h("div", { key: '567e0b578cba133bde34d862abeb39d0dd8c05b7', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: 'b77fc0c1d24954801862c66daccd642d76fe10ec', class: `${choicesWrapperClass}
7059
+ return (h("div", { key: 'f6d69a9b9f6eba5ac19c37daa861e672bf418148', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: 'e1afbea9c52278b70880b2943ebd8222cac7f539', class: `${choicesWrapperClass}
7060
7060
  ${this.disabled ? 'disabled' : ''}
7061
- ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : (e) => this.handleWrapperClick(e), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: '600f4bb07e626c53cb8cebdbd74dcc23c9113521', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), h("div", { key: 'cf6651956906c10cf55ed1fc0015160173b25afa', class: 'single__select-icon-container' }, this.optionIsSelected && (h("div", { key: '42d1609ecfff0547e4a18506ec169523f14eee83', class: `ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}` }, h("ifx-icon", { key: '9b4d6852021449749147b4b3ad9e03452427639a', icon: "cremove16", onClick: () => this.handleDeleteSelection() }))), h("div", { key: '0d92ad067db38b86fc94f8d3c8e693c68a08e699', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), h("div", { key: 'a36f5013e0dcc89b207f59a9f0e65e2fd8982e75', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7061
+ ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : (e) => this.handleWrapperClick(e), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: '3de39e69132429b2fbde2b756e27b80c8dca329c', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), h("div", { key: 'b6283bcdad25568a447fd04227bd86e8db372244', class: 'single__select-icon-container' }, this.optionIsSelected && (h("div", { key: 'f349ac7fc89bac17571df1f0b775d4d5c9233d4d', class: `ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}` }, h("ifx-icon", { key: '47b79f79562c7422d164f47b98d59a7c9a2cd759', icon: "cremove16", onClick: () => this.clearSelection() }))), h("div", { key: '65d3a40f4d23dc0c104644e4d909d5b50ed7c481', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), h("div", { key: 'b0fc4b8a2d86b83be9ad5f2bc11194c5fa0b45f0', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7062
7062
  }
7063
7063
  toggleDropdown() {
7064
7064
  const div = this.root.querySelector('.ifx-choices__wrapper');
@@ -7341,6 +7341,7 @@ const Choices = /*@__PURE__*/ proxyCustomElement(class Choices extends H {
7341
7341
  "showClearButton": [4, "show-clear-button"],
7342
7342
  "selectedOption": [32],
7343
7343
  "optionIsSelected": [32],
7344
+ "clearSelection": [64],
7344
7345
  "handleChange": [64],
7345
7346
  "highlightItem": [64],
7346
7347
  "unhighlightItem": [64],
@@ -7384,4 +7385,4 @@ function defineCustomElement() {
7384
7385
 
7385
7386
  export { Choices as C, defineCustomElement as d };
7386
7387
 
7387
- //# sourceMappingURL=p-75572595.js.map
7388
+ //# sourceMappingURL=p-4616b2b3.js.map