@siemens/ix 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/components/dropdown.js +5 -2
  2. package/components/dropdown.js.map +1 -1
  3. package/components/ix-category-filter.js +1 -1
  4. package/components/ix-category-filter.js.map +1 -1
  5. package/components/ix-form-field.js +1 -1
  6. package/components/ix-form-field.js.map +1 -1
  7. package/components/time-picker.js +1 -1
  8. package/components/time-picker.js.map +1 -1
  9. package/dist/cjs/ix-category-filter.cjs.entry.js +1 -1
  10. package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ix-dropdown.cjs.entry.js +5 -2
  12. package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ix-form-field.cjs.entry.js +1 -1
  14. package/dist/cjs/ix-form-field.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ix-time-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/ix-time-picker.cjs.entry.js.map +1 -1
  17. package/dist/collection/components/category-filter/category-filter.css +60 -24
  18. package/dist/collection/components/dropdown/dropdown.js +5 -2
  19. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  20. package/dist/collection/components/form-field/form-field.css +30 -12
  21. package/dist/collection/components/time-picker/time-picker.css +30 -12
  22. package/dist/esm/ix-category-filter.entry.js +1 -1
  23. package/dist/esm/ix-category-filter.entry.js.map +1 -1
  24. package/dist/esm/ix-dropdown.entry.js +5 -2
  25. package/dist/esm/ix-dropdown.entry.js.map +1 -1
  26. package/dist/esm/ix-form-field.entry.js +1 -1
  27. package/dist/esm/ix-form-field.entry.js.map +1 -1
  28. package/dist/esm/ix-time-picker.entry.js +1 -1
  29. package/dist/esm/ix-time-picker.entry.js.map +1 -1
  30. package/dist/siemens-ix/p-4290098e.entry.js +2 -0
  31. package/dist/siemens-ix/{p-cb1c0d63.entry.js.map → p-4290098e.entry.js.map} +1 -1
  32. package/dist/siemens-ix/p-43a58a77.entry.js +2 -0
  33. package/dist/siemens-ix/{p-7289b0be.entry.js.map → p-43a58a77.entry.js.map} +1 -1
  34. package/dist/siemens-ix/p-6e63a875.entry.js +2 -0
  35. package/dist/siemens-ix/{p-04e5773b.entry.js.map → p-6e63a875.entry.js.map} +1 -1
  36. package/dist/siemens-ix/{p-1506f9ed.entry.js → p-a039faa9.entry.js} +2 -2
  37. package/dist/siemens-ix/{p-1506f9ed.entry.js.map → p-a039faa9.entry.js.map} +1 -1
  38. package/dist/siemens-ix/siemens-ix-core.css +1 -1
  39. package/dist/siemens-ix/siemens-ix.css +30 -12
  40. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  41. package/package.json +1 -1
  42. package/scss/components/form/_input.scss +11 -8
  43. package/dist/siemens-ix/p-04e5773b.entry.js +0 -2
  44. package/dist/siemens-ix/p-7289b0be.entry.js +0 -2
  45. package/dist/siemens-ix/p-cb1c0d63.entry.js +0 -2
@@ -1 +1 @@
1
- {"file":"ix-time-picker.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,oweAAowe,CAAC;AAC3xe,2BAAe,aAAa;;MCyCf,UAAU;;;;;;sBAOI,IAAI;uBAKQ,SAAS;oCAKN,IAAI;0BAKd,IAAI;wBAKf,IAAI;2BAKD,IAAI;2BAKJ,IAAI;oBAQHA,gBAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;iCAiBJ,SAAS;;8BAYvC,MAAM;wBAOJ,MAAM;;;;;IAjCjC,oBAAoB,CAAC,QAAgB;QACnC,IAAI,CAAC,KAAK,GAAGA,gBAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;SAC3D;KACF;IAkDD,iBAAiB;QACf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AK,QACL,IAAI,EAAC,YAAY,EACjB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,QAAQ,GACE,EAClBA,kEAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,QAAQ,CAAO,EACjDA,6EACE,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,EAAE,EACzC,KAAK,QACL,IAAI,EAAC,cAAc,EACnB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,QAAQ,GACE,CACd,CACF,EACNA,kEAAK,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAC9DA,wEACE,OAAO,EAAE;gBACP,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACvD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;aAClD,IAEA,IAAI,CAAC,cAAc,CACV,CACR,CACY,CACf,EACP;KACH;;;;;;;;;;","names":["DateTime","h","Host","index"],"sources":["src/components/time-picker/time-picker.scss?tag=ix-time-picker&encapsulation=shadow","src/components/time-picker/time-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n\n:host {\n @include ix-component;\n @import 'legacy/components/forms';\n\n display: block;\n position: relative;\n width: 22rem;\n\n @media (max-width: 576px) {\n .clock {\n padding: 1.5rem 0;\n }\n\n .header {\n height: $medium-control-height !important;\n }\n }\n\n @media (min-width: 576px) {\n .clock {\n padding: 4.25rem 0;\n }\n\n .header {\n height: $large-control-height !important;\n }\n }\n\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n height: $large-control-height;\n }\n\n .flex {\n display: flex;\n }\n\n .clock {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n input,\n .time-reference {\n width: 2.625rem;\n height: $large-space;\n text-align: center;\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0 0.3125rem;\n }\n\n /* Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n }\n\n .form-control[type='number'] {\n text-align: center;\n }\n\n .columns {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n }\n\n .column-seperator {\n display: flex;\n align-items: center;\n margin: 0 $tiny-space;\n }\n\n .button {\n display: flex;\n justify-content: flex-end;\n }\n\n .default-space {\n margin-left: $default-space;\n }\n\n .text-align {\n text-align: center;\n }\n\n .hidden {\n display: none;\n }\n\n .time-reference {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { DateTimeCardCorners } from '../date-time-card/date-time-card';\n\nexport type TimePickerCorners = DateTimeCardCorners;\n\ninterface TimePickerDescriptor {\n unit: 'hour' | 'minute' | 'second';\n placeholder: string;\n hidden: boolean;\n}\n\ninterface TimeOutputFormat {\n hour: string;\n minute: string;\n second: string;\n}\n\n@Component({\n tag: 'ix-time-picker',\n styleUrl: 'time-picker.scss',\n shadow: true,\n})\nexport class TimePicker {\n /**\n * Format of time string\n * See {@link \"https://moment.github.io/luxon/#/formatting?id=table-of-tokens\"} for all available tokens.\n *\n * @since 1.1.0\n */\n @Prop() format: string = 'TT';\n\n /**\n * Corner style\n */\n @Prop() corners: TimePickerCorners = 'rounded';\n\n /**\n * Controls the visual presentation and styling of the component when it is displayed as a standalone element\n */\n @Prop() standaloneAppearance: boolean = true;\n\n /**\n * @deprecated Not supported since 2.0.0.\n */\n @Prop() individual: boolean = true;\n\n /**\n * Show hour input\n */\n @Prop() showHour = true;\n\n /**\n * Show minutes input\n */\n @Prop() showMinutes = true;\n\n /**\n * Show seconds input\n */\n @Prop() showSeconds = true;\n\n /**\n * Select time with format string\n * Format has to match the `format` property.\n *\n * @since 1.1.0\n */\n @Prop() time: string = DateTime.now().toFormat(this.format);\n\n @Watch('time')\n watchTimePropHandler(newValue: string) {\n this._time = DateTime.fromFormat(newValue, this.format);\n if (!this._time.isValid) {\n throw new Error('Format is not supported or not correct');\n }\n }\n\n /**\n * Show time reference input\n *\n * @since 1.1.0 time reference is default aligned with format tt\n * @deprecated Since 2.0.0 time reference will be displayed depending on format.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) showTimeReference?: boolean = undefined;\n\n /**\n * Set time reference\n */\n @Prop() timeReference: 'AM' | 'PM' | undefined;\n\n /**\n * Text of date select button\n *\n * @since 1.1.0\n */\n @Prop() textSelectTime = 'Done';\n\n /**\n * Text for top label\n *\n * @since 2.1.0\n */\n @Prop() textTime: string = 'Time';\n\n /**\n * Time event\n */\n @Event() timeSelect: EventEmitter<string>;\n\n /**\n * Time event\n * @deprecated Will be removed in 3.0.0. Use `time-select` event.\n */\n @Event() done: EventEmitter<string>;\n\n /**\n * Time change event\n */\n @Event() timeChange: EventEmitter<string>;\n\n @State() private _time: DateTime;\n @State() private _timeRef: 'AM' | 'PM' | undefined;\n @State() private _formattedTime: TimeOutputFormat;\n\n componentWillLoad() {\n this._time = DateTime.fromFormat(this.time, this.format);\n\n if (!this._time.isValid) {\n console.error(\n `Invalid time format. The configured format does not match the format of the passed time. ${this._time.invalidReason}: ${this._time.invalidExplanation}`\n );\n return;\n }\n\n this._timeRef = this.format.includes('a')\n ? (DateTime.fromFormat(this.time, this.format).toFormat('a') as\n | 'AM'\n | 'PM')\n : undefined;\n this.formatTime();\n }\n\n @Watch('_time')\n formatTime() {\n const [hour, minute, second] = this._time\n .toFormat(this.format)\n .split(' ')[0]\n .split(':');\n\n this._formattedTime = {\n hour: hour,\n minute: minute,\n second: second,\n };\n }\n\n @Watch('_time')\n onInternalTimeChange() {\n this.timeChange.emit(this._time.toFormat(this.format));\n if (this._timeRef) this._timeRef = this._time.toFormat('a') as 'AM' | 'PM';\n }\n\n timeUpdate(unit: 'hour' | 'minute' | 'second', value: number): number {\n let maxValue = DateTime.now().endOf('day').get(unit);\n\n if (this._timeRef === 'PM' && unit === 'hour') value += 12;\n if (this._timeRef === 'AM' && unit === 'hour') maxValue = 12;\n\n if (value > maxValue) {\n value = maxValue;\n } else if (value < 0) {\n value = 0;\n }\n\n this._time = this._time.set({\n [unit]: value,\n });\n return value;\n }\n\n changeTimeReference() {\n this._timeRef = this._timeRef === 'AM' ? 'PM' : 'AM';\n\n if (!this._time.toFormat('a').includes(this._timeRef)) {\n this._time = this._time.plus({\n hour: 12,\n });\n }\n }\n\n /**\n * Get the current time based on the wanted format\n */\n @Method()\n async getCurrentTime() {\n return this._time.toFormat(this.format);\n }\n\n render() {\n let timepickerInformation: TimePickerDescriptor[] = [\n {\n unit: 'hour',\n placeholder: 'HH',\n hidden: !this.showHour,\n },\n {\n unit: 'minute',\n placeholder: 'MM',\n hidden: !this.showMinutes,\n },\n {\n unit: 'second',\n placeholder: 'SS',\n hidden: !this.showSeconds,\n },\n ];\n\n timepickerInformation = timepickerInformation.filter(\n (item) => !item.hidden\n );\n\n return (\n <Host>\n <ix-date-time-card\n standaloneAppearance={this.standaloneAppearance}\n corners={this.corners}\n >\n <div class=\"header\" slot=\"header\">\n <ix-typography variant=\"default-title\">\n {this.textTime || 'Time'}\n </ix-typography>\n </div>\n <div class=\"clock\">\n {timepickerInformation.map((descriptor, index: number) => (\n <div class=\"flex\">\n <div class={{ columns: true, hidden: descriptor.hidden }}>\n <ix-icon-button\n size=\"16\"\n onClick={() =>\n (this._time = this._time.plus({\n [descriptor.unit]: 1,\n }))\n }\n ghost\n icon=\"chevron-up\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n\n <input\n class=\"form-control\"\n name={descriptor.unit}\n type=\"number\"\n placeholder={descriptor.placeholder}\n value={\n this._formattedTime\n ? this._formattedTime[descriptor.unit]\n : null\n }\n onKeyDown={(e) => {\n if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown') return;\n\n const value = e.key === 'ArrowUp' ? 1 : -1;\n this._time = this._time.plus({\n [descriptor.unit]: value,\n });\n e.preventDefault();\n }}\n onChange={(e: any) => {\n let inputElement = e.target as HTMLInputElement;\n inputElement.value = this.timeUpdate(\n descriptor.unit,\n +inputElement.value\n ).toString();\n }}\n ></input>\n\n <ix-icon-button\n size=\"16\"\n onClick={() =>\n (this._time = this._time.minus({\n [descriptor.unit]: 1,\n }))\n }\n ghost\n icon=\"chevron-down\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n {index !== timepickerInformation.length - 1 && (\n <div\n class={{\n 'column-seperator': true,\n hidden: descriptor.hidden,\n }}\n >\n :\n </div>\n )}\n </div>\n ))}\n\n <div\n class={{\n columns: true,\n 'default-space': true,\n hidden: this._timeRef === undefined,\n }}\n >\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeTimeReference()}\n ghost\n icon=\"chevron-up\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <div class=\"time-reference\">{this._timeRef}</div>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeTimeReference()}\n ghost\n icon=\"chevron-down\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n </div>\n <div class={{ button: true, hidden: !this.standaloneAppearance }}>\n <ix-button\n onClick={() => {\n this.timeSelect.emit(this._time.toFormat(this.format));\n this.done.emit(this._time.toFormat(this.format));\n }}\n >\n {this.textSelectTime}\n </ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ix-time-picker.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,y8gBAAy8gB,CAAC;AACh+gB,2BAAe,aAAa;;MCyCf,UAAU;;;;;;sBAOI,IAAI;uBAKQ,SAAS;oCAKN,IAAI;0BAKd,IAAI;wBAKf,IAAI;2BAKD,IAAI;2BAKJ,IAAI;oBAQHA,gBAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;iCAiBJ,SAAS;;8BAYvC,MAAM;wBAOJ,MAAM;;;;;IAjCjC,oBAAoB,CAAC,QAAgB;QACnC,IAAI,CAAC,KAAK,GAAGA,gBAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;SAC3D;KACF;IAkDD,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAGA,gBAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAEzD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACvB,OAAO,CAAC,KAAK,CACX,4FAA4F,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CACzJ,CAAC;YACF,OAAO;SACR;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;cACpCA,gBAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ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CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACvD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;aAClD,IAEA,IAAI,CAAC,cAAc,CACV,CACR,CACY,CACf,EACP;KACH;;;;;;;;;;","names":["DateTime","h","Host","index"],"sources":["src/components/time-picker/time-picker.scss?tag=ix-time-picker&encapsulation=shadow","src/components/time-picker/time-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n\n:host {\n @include ix-component;\n @import 'legacy/components/forms';\n\n display: block;\n position: relative;\n width: 22rem;\n\n @media (max-width: 576px) {\n .clock {\n padding: 1.5rem 0;\n }\n\n .header {\n height: $medium-control-height !important;\n }\n }\n\n @media (min-width: 576px) {\n .clock {\n padding: 4.25rem 0;\n }\n\n .header {\n height: $large-control-height !important;\n }\n }\n\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n height: $large-control-height;\n }\n\n .flex {\n display: flex;\n }\n\n .clock {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n input,\n .time-reference {\n width: 2.625rem;\n height: $large-space;\n text-align: center;\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0 0.3125rem;\n }\n\n /* Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n }\n\n .form-control[type='number'] {\n text-align: center;\n }\n\n .columns {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n }\n\n .column-seperator {\n display: flex;\n align-items: center;\n margin: 0 $tiny-space;\n }\n\n .button {\n display: flex;\n justify-content: flex-end;\n }\n\n .default-space {\n margin-left: $default-space;\n }\n\n .text-align {\n text-align: center;\n }\n\n .hidden {\n display: none;\n }\n\n .time-reference {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { DateTimeCardCorners } from '../date-time-card/date-time-card';\n\nexport type TimePickerCorners = DateTimeCardCorners;\n\ninterface TimePickerDescriptor {\n unit: 'hour' | 'minute' | 'second';\n placeholder: string;\n hidden: boolean;\n}\n\ninterface TimeOutputFormat {\n hour: string;\n minute: string;\n second: string;\n}\n\n@Component({\n tag: 'ix-time-picker',\n styleUrl: 'time-picker.scss',\n shadow: true,\n})\nexport class TimePicker {\n /**\n * Format of time string\n * See {@link \"https://moment.github.io/luxon/#/formatting?id=table-of-tokens\"} for all available tokens.\n *\n * @since 1.1.0\n */\n @Prop() format: string = 'TT';\n\n /**\n * Corner style\n */\n @Prop() corners: TimePickerCorners = 'rounded';\n\n /**\n * Controls the visual presentation and styling of the component when it is displayed as a standalone element\n */\n @Prop() standaloneAppearance: boolean = true;\n\n /**\n * @deprecated Not supported since 2.0.0.\n */\n @Prop() individual: boolean = true;\n\n /**\n * Show hour input\n */\n @Prop() showHour = true;\n\n /**\n * Show minutes input\n */\n @Prop() showMinutes = true;\n\n /**\n * Show seconds input\n */\n @Prop() showSeconds = true;\n\n /**\n * Select time with format string\n * Format has to match the `format` property.\n *\n * @since 1.1.0\n */\n @Prop() time: string = DateTime.now().toFormat(this.format);\n\n @Watch('time')\n watchTimePropHandler(newValue: string) {\n this._time = DateTime.fromFormat(newValue, this.format);\n if (!this._time.isValid) {\n throw new Error('Format is not supported or not correct');\n }\n }\n\n /**\n * Show time reference input\n *\n * @since 1.1.0 time reference is default aligned with format tt\n * @deprecated Since 2.0.0 time reference will be displayed depending on format.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) showTimeReference?: boolean = undefined;\n\n /**\n * Set time reference\n */\n @Prop() timeReference: 'AM' | 'PM' | undefined;\n\n /**\n * Text of date select button\n *\n * @since 1.1.0\n */\n @Prop() textSelectTime = 'Done';\n\n /**\n * Text for top label\n *\n * @since 2.1.0\n */\n @Prop() textTime: string = 'Time';\n\n /**\n * Time event\n */\n @Event() timeSelect: EventEmitter<string>;\n\n /**\n * Time event\n * @deprecated Will be removed in 3.0.0. Use `time-select` event.\n */\n @Event() done: EventEmitter<string>;\n\n /**\n * Time change event\n */\n @Event() timeChange: EventEmitter<string>;\n\n @State() private _time: DateTime;\n @State() private _timeRef: 'AM' | 'PM' | undefined;\n @State() private _formattedTime: TimeOutputFormat;\n\n componentWillLoad() {\n this._time = DateTime.fromFormat(this.time, this.format);\n\n if (!this._time.isValid) {\n console.error(\n `Invalid time format. The configured format does not match the format of the passed time. ${this._time.invalidReason}: ${this._time.invalidExplanation}`\n );\n return;\n }\n\n this._timeRef = this.format.includes('a')\n ? (DateTime.fromFormat(this.time, this.format).toFormat('a') as\n | 'AM'\n | 'PM')\n : undefined;\n this.formatTime();\n }\n\n @Watch('_time')\n formatTime() {\n const [hour, minute, second] = this._time\n .toFormat(this.format)\n .split(' ')[0]\n .split(':');\n\n this._formattedTime = {\n hour: hour,\n minute: minute,\n second: second,\n };\n }\n\n @Watch('_time')\n onInternalTimeChange() {\n this.timeChange.emit(this._time.toFormat(this.format));\n if (this._timeRef) this._timeRef = this._time.toFormat('a') as 'AM' | 'PM';\n }\n\n timeUpdate(unit: 'hour' | 'minute' | 'second', value: number): number {\n let maxValue = DateTime.now().endOf('day').get(unit);\n\n if (this._timeRef === 'PM' && unit === 'hour') value += 12;\n if (this._timeRef === 'AM' && unit === 'hour') maxValue = 12;\n\n if (value > maxValue) {\n value = maxValue;\n } else if (value < 0) {\n value = 0;\n }\n\n this._time = this._time.set({\n [unit]: value,\n });\n return value;\n }\n\n changeTimeReference() {\n this._timeRef = this._timeRef === 'AM' ? 'PM' : 'AM';\n\n if (!this._time.toFormat('a').includes(this._timeRef)) {\n this._time = this._time.plus({\n hour: 12,\n });\n }\n }\n\n /**\n * Get the current time based on the wanted format\n */\n @Method()\n async getCurrentTime() {\n return this._time.toFormat(this.format);\n }\n\n render() {\n let timepickerInformation: TimePickerDescriptor[] = [\n {\n unit: 'hour',\n placeholder: 'HH',\n hidden: !this.showHour,\n },\n {\n unit: 'minute',\n placeholder: 'MM',\n hidden: !this.showMinutes,\n },\n {\n unit: 'second',\n placeholder: 'SS',\n hidden: !this.showSeconds,\n },\n ];\n\n timepickerInformation = timepickerInformation.filter(\n (item) => !item.hidden\n );\n\n return (\n <Host>\n <ix-date-time-card\n standaloneAppearance={this.standaloneAppearance}\n corners={this.corners}\n >\n <div class=\"header\" slot=\"header\">\n <ix-typography variant=\"default-title\">\n {this.textTime || 'Time'}\n </ix-typography>\n </div>\n <div class=\"clock\">\n {timepickerInformation.map((descriptor, index: number) => (\n <div class=\"flex\">\n <div class={{ columns: true, hidden: descriptor.hidden }}>\n <ix-icon-button\n size=\"16\"\n onClick={() =>\n (this._time = this._time.plus({\n [descriptor.unit]: 1,\n }))\n }\n ghost\n icon=\"chevron-up\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n\n <input\n class=\"form-control\"\n name={descriptor.unit}\n type=\"number\"\n placeholder={descriptor.placeholder}\n value={\n this._formattedTime\n ? this._formattedTime[descriptor.unit]\n : null\n }\n onKeyDown={(e) => {\n if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown') return;\n\n const value = e.key === 'ArrowUp' ? 1 : -1;\n this._time = this._time.plus({\n [descriptor.unit]: value,\n });\n e.preventDefault();\n }}\n onChange={(e: any) => {\n let inputElement = e.target as HTMLInputElement;\n inputElement.value = this.timeUpdate(\n descriptor.unit,\n +inputElement.value\n ).toString();\n }}\n ></input>\n\n <ix-icon-button\n size=\"16\"\n onClick={() =>\n (this._time = this._time.minus({\n [descriptor.unit]: 1,\n }))\n }\n ghost\n icon=\"chevron-down\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n {index !== timepickerInformation.length - 1 && (\n <div\n class={{\n 'column-seperator': true,\n hidden: descriptor.hidden,\n }}\n >\n :\n </div>\n )}\n </div>\n ))}\n\n <div\n class={{\n columns: true,\n 'default-space': true,\n hidden: this._timeRef === undefined,\n }}\n >\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeTimeReference()}\n ghost\n icon=\"chevron-up\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <div class=\"time-reference\">{this._timeRef}</div>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeTimeReference()}\n ghost\n icon=\"chevron-down\"\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n </div>\n <div class={{ button: true, hidden: !this.standaloneAppearance }}>\n <ix-button\n onClick={() => {\n this.timeSelect.emit(this._time.toFormat(this.format));\n this.done.emit(this._time.toFormat(this.format));\n }}\n >\n {this.textSelectTime}\n </ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -999,7 +999,7 @@ label.label-alignment-left {
999
999
  padding: 6px 0px;
1000
1000
  }
1001
1001
 
1002
- input, input:-webkit-autofill {
1002
+ input {
1003
1003
  font-feature-settings: "clig" off, "liga" off;
1004
1004
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
1005
1005
  font-style: normal;
@@ -1021,9 +1021,18 @@ input, input:-webkit-autofill {
1021
1021
  box-shadow: var(--theme-input--box-shadow);
1022
1022
  }
1023
1023
  input:-webkit-autofill {
1024
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
1025
- -webkit-text-fill-color: var(--theme-input--color) !important;
1026
- border-color: var(--theme-input--border-color) !important;
1024
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1025
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1026
+ background-color: var(--theme-input--background--autofill) !important;
1027
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1028
+ color: var(--theme-input--color--autofill) !important;
1029
+ }
1030
+ input:-webkit-autofill, input:autofill {
1031
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1032
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1033
+ background-color: var(--theme-input--background--autofill) !important;
1034
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1035
+ color: var(--theme-input--color--autofill) !important;
1027
1036
  }
1028
1037
  input::-moz-placeholder {
1029
1038
  color: var(--theme-input-hint--color);
@@ -1032,13 +1041,13 @@ input::placeholder {
1032
1041
  color: var(--theme-input-hint--color);
1033
1042
  }
1034
1043
  input.hover, input:hover {
1035
- border-color: var(--theme-input--border-color--hover);
1044
+ border-color: var(--theme-input--border-color--hover) !important;
1036
1045
  background-color: var(--theme-input--background--hover);
1037
1046
  }
1038
1047
  input.focus, input:focus {
1039
1048
  outline: 1px solid var(--theme-color-focus-bdr);
1040
1049
  outline-offset: var(--theme-input--focus--outline-offset);
1041
- border-color: var(--theme-input--border-color--focus);
1050
+ border-color: var(--theme-input--border-color--focus) !important;
1042
1051
  }
1043
1052
  input:-moz-read-only {
1044
1053
  box-shadow: none;
@@ -1091,7 +1100,7 @@ textarea {
1091
1100
  height: 3.25rem;
1092
1101
  padding: 0.375rem 1.25rem 0.375rem 0.5rem;
1093
1102
  }
1094
- textarea, textarea:-webkit-autofill {
1103
+ textarea {
1095
1104
  font-feature-settings: "clig" off, "liga" off;
1096
1105
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
1097
1106
  font-style: normal;
@@ -1113,9 +1122,18 @@ textarea, textarea:-webkit-autofill {
1113
1122
  box-shadow: var(--theme-input--box-shadow);
1114
1123
  }
1115
1124
  textarea:-webkit-autofill {
1116
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
1117
- -webkit-text-fill-color: var(--theme-input--color) !important;
1118
- border-color: var(--theme-input--border-color) !important;
1125
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1126
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1127
+ background-color: var(--theme-input--background--autofill) !important;
1128
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1129
+ color: var(--theme-input--color--autofill) !important;
1130
+ }
1131
+ textarea:-webkit-autofill, textarea:autofill {
1132
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1133
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1134
+ background-color: var(--theme-input--background--autofill) !important;
1135
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1136
+ color: var(--theme-input--color--autofill) !important;
1119
1137
  }
1120
1138
  textarea::-moz-placeholder {
1121
1139
  color: var(--theme-input-hint--color);
@@ -1124,13 +1142,13 @@ textarea::placeholder {
1124
1142
  color: var(--theme-input-hint--color);
1125
1143
  }
1126
1144
  textarea.hover, textarea:hover {
1127
- border-color: var(--theme-input--border-color--hover);
1145
+ border-color: var(--theme-input--border-color--hover) !important;
1128
1146
  background-color: var(--theme-input--background--hover);
1129
1147
  }
1130
1148
  textarea.focus, textarea:focus {
1131
1149
  outline: 1px solid var(--theme-color-focus-bdr);
1132
1150
  outline-offset: var(--theme-input--focus--outline-offset);
1133
- border-color: var(--theme-input--border-color--focus);
1151
+ border-color: var(--theme-input--border-color--focus) !important;
1134
1152
  }
1135
1153
  textarea:-moz-read-only {
1136
1154
  box-shadow: none;
@@ -1283,7 +1301,7 @@ form:not(.was-validated) .valid-feedback {
1283
1301
  max-height: 3.75rem;
1284
1302
  padding: 1px 1.5rem 1px 1.75rem !important;
1285
1303
  }
1286
- :host .input-container:not(.readonly):not(.disabled), :host .input-container:not(.readonly):not(.disabled):-webkit-autofill {
1304
+ :host .input-container:not(.readonly):not(.disabled) {
1287
1305
  font-feature-settings: "clig" off, "liga" off;
1288
1306
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
1289
1307
  font-style: normal;
@@ -1305,9 +1323,18 @@ form:not(.was-validated) .valid-feedback {
1305
1323
  box-shadow: var(--theme-input--box-shadow);
1306
1324
  }
1307
1325
  :host .input-container:not(.readonly):not(.disabled):-webkit-autofill {
1308
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
1309
- -webkit-text-fill-color: var(--theme-input--color) !important;
1310
- border-color: var(--theme-input--border-color) !important;
1326
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1327
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1328
+ background-color: var(--theme-input--background--autofill) !important;
1329
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1330
+ color: var(--theme-input--color--autofill) !important;
1331
+ }
1332
+ :host .input-container:not(.readonly):not(.disabled):-webkit-autofill, :host .input-container:not(.readonly):not(.disabled):autofill {
1333
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1334
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1335
+ background-color: var(--theme-input--background--autofill) !important;
1336
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1337
+ color: var(--theme-input--color--autofill) !important;
1311
1338
  }
1312
1339
  :host .input-container:not(.readonly):not(.disabled)::-moz-placeholder {
1313
1340
  color: var(--theme-input-hint--color);
@@ -1316,13 +1343,13 @@ form:not(.was-validated) .valid-feedback {
1316
1343
  color: var(--theme-input-hint--color);
1317
1344
  }
1318
1345
  :host .input-container:not(.readonly):not(.disabled).hover, :host .input-container:not(.readonly):not(.disabled):hover {
1319
- border-color: var(--theme-input--border-color--hover);
1346
+ border-color: var(--theme-input--border-color--hover) !important;
1320
1347
  background-color: var(--theme-input--background--hover);
1321
1348
  }
1322
1349
  :host .input-container:not(.readonly):not(.disabled).focus, :host .input-container:not(.readonly):not(.disabled):focus {
1323
1350
  outline: 1px solid var(--theme-color-focus-bdr);
1324
1351
  outline-offset: var(--theme-input--focus--outline-offset);
1325
- border-color: var(--theme-input--border-color--focus);
1352
+ border-color: var(--theme-input--border-color--focus) !important;
1326
1353
  }
1327
1354
  :host .input-container:not(.readonly):not(.disabled):disabled {
1328
1355
  box-shadow: none;
@@ -1342,7 +1369,7 @@ form:not(.was-validated) .valid-feedback {
1342
1369
  color: var(--theme-input--color--disabled);
1343
1370
  border-bottom: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled);
1344
1371
  }
1345
- :host .input-container.readonly, :host .input-container.readonly:-webkit-autofill {
1372
+ :host .input-container.readonly {
1346
1373
  font-feature-settings: "clig" off, "liga" off;
1347
1374
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
1348
1375
  font-style: normal;
@@ -1364,9 +1391,18 @@ form:not(.was-validated) .valid-feedback {
1364
1391
  box-shadow: var(--theme-input--box-shadow);
1365
1392
  }
1366
1393
  :host .input-container.readonly:-webkit-autofill {
1367
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
1368
- -webkit-text-fill-color: var(--theme-input--color) !important;
1369
- border-color: var(--theme-input--border-color) !important;
1394
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1395
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1396
+ background-color: var(--theme-input--background--autofill) !important;
1397
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1398
+ color: var(--theme-input--color--autofill) !important;
1399
+ }
1400
+ :host .input-container.readonly:-webkit-autofill, :host .input-container.readonly:autofill {
1401
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
1402
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
1403
+ background-color: var(--theme-input--background--autofill) !important;
1404
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
1405
+ color: var(--theme-input--color--autofill) !important;
1370
1406
  }
1371
1407
  :host .input-container.readonly::-moz-placeholder {
1372
1408
  color: var(--theme-input-hint--color);
@@ -1375,13 +1411,13 @@ form:not(.was-validated) .valid-feedback {
1375
1411
  color: var(--theme-input-hint--color);
1376
1412
  }
1377
1413
  :host .input-container.readonly.hover, :host .input-container.readonly:hover {
1378
- border-color: var(--theme-input--border-color--hover);
1414
+ border-color: var(--theme-input--border-color--hover) !important;
1379
1415
  background-color: var(--theme-input--background--hover);
1380
1416
  }
1381
1417
  :host .input-container.readonly.focus, :host .input-container.readonly:focus {
1382
1418
  outline: 1px solid var(--theme-color-focus-bdr);
1383
1419
  outline-offset: var(--theme-input--focus--outline-offset);
1384
- border-color: var(--theme-input--border-color--focus);
1420
+ border-color: var(--theme-input--border-color--focus) !important;
1385
1421
  }
1386
1422
  :host .input-container.readonly:-moz-read-only {
1387
1423
  box-shadow: none;
@@ -119,6 +119,9 @@ export class Dropdown {
119
119
  }));
120
120
  }
121
121
  registerKeyListener() {
122
+ if (!this.triggerElement) {
123
+ return;
124
+ }
122
125
  this.disposeKeyListener = addDisposableEventListener(this.triggerElement, 'keydown', (event) => {
123
126
  if (event.key !== 'ArrowDown') {
124
127
  return;
@@ -308,7 +311,7 @@ export class Dropdown {
308
311
  this.applyDropdownPosition();
309
312
  }
310
313
  render() {
311
- return (h(Host, { key: '6c86b142d9963a895cfde491883f6a68e3ff9c6d', "data-ix-dropdown": this.localUId, ref: (ref) => (this.dropdownRef = ref), class: {
314
+ return (h(Host, { key: 'afb0bd3099fd4e5363c4b48f9a718d6b58a29570', "data-ix-dropdown": this.localUId, ref: (ref) => (this.dropdownRef = ref), class: {
312
315
  'dropdown-menu': true,
313
316
  show: this.show,
314
317
  overflow: true,
@@ -316,7 +319,7 @@ export class Dropdown {
316
319
  margin: '0',
317
320
  minWidth: '0px',
318
321
  position: this.positioningStrategy,
319
- }, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '2dea0ac7c557fcd1ec0eaaf1939920c12773b6b4', style: { display: 'contents' } }, this.header && h("div", { class: "dropdown-header" }, this.header), h("slot", { key: '3ba4873f1241bd87c55dfb8e46b5f678efd0c514' }))));
322
+ }, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '19fd27ae702d808e76cf7484c2bca3a7cab38b53', style: { display: 'contents' } }, this.header && h("div", { class: "dropdown-header" }, this.header), h("slot", { key: 'cfaf1630739aba4c96fabf38a7d59780ba7b7a7c' }))));
320
323
  }
321
324
  static get is() { return "ix-dropdown"; }
322
325
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EAEf,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,0BAA0B,EAE1B,kBAAkB,EAElB,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAG/B,IAAI,UAAU,GAAG,CAAC,CAAC;AAOnB,MAAM,OAAO,QAAQ;;QA8EX,sBAAiB,GAAe,IAAI,CAAC;QAMrC,aAAQ,GAAG,YAAY,UAAU,EAAE,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n addDisposableEventListener,\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger: string | HTMLElement | Promise<HTMLElement>;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor: string | HTMLElement;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged: EventEmitter<boolean>;\n\n private autoUpdateCleanup: () => void = null;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private dropdownRef: HTMLElement;\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController: ArrowFocusController;\n private focusDropdownItemBind = this.focusDropdownItem.bind(this);\n\n private itemObserver = new MutationObserver(() => {\n this.arrowFocusController.items = this.dropdownItems;\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot.querySelector('slot');\n }\n\n private disposeClickListener?: () => void;\n private disposeKeyListener?: () => void;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: PointerEvent) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: false,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n (event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }\n );\n }\n\n private async registerListener(\n element: string | HTMLElement | Promise<HTMLElement>\n ) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(\n element: string | HTMLElement | Promise<HTMLElement>\n ) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element: Element) {\n if (!element) {\n return null;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(\n element: string | HTMLElement | Promise<HTMLElement>\n ): Promise<Element> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return;\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n if (document.querySelector(selector)) {\n return resolve(document.querySelector(selector));\n }\n\n const observer = new MutationObserver(() => {\n if (document.querySelector(selector)) {\n resolve(document.querySelector(selector));\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n this.anchorElement = await (this.anchor\n ? this.resolveElement(this.anchor)\n : this.resolveElement(this.trigger));\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.dropdownRef,\n this.focusDropdownItemBind\n );\n\n this.itemObserver.observe(this.dropdownRef, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.arrowFocusController.disconnect();\n this.itemObserver.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: string | HTMLElement | Promise<HTMLElement>) {\n this.registerListener(newTriggerValue);\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n if (!this.dropdownRef) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...positionConfig.middleware,\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = null;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.dropdownRef,\n async () => {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.dropdownRef,\n positionConfig\n );\n Object.assign(this.dropdownRef.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(\n computeResponse.y\n )}px)`,\n });\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.dropdownRef,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.dropdownRef.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n this.dropdownItems[index]?.shadowRoot.querySelector('button').focus();\n });\n }\n\n async componentDidLoad() {\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n this.anchorElement = await (this.anchor\n ? this.resolveElement(this.anchor)\n : this.resolveElement(this.trigger));\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n if (dropdownController.pathIncludesTrigger(event.composedPath())) {\n event.preventDefault();\n\n if (this.isTriggerElement(event.target as HTMLElement)) {\n return;\n }\n }\n\n if (this.closeBehavior === 'inside' || this.closeBehavior === 'both') {\n dropdownController.dismissAll([this.getId()]);\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n ref={(ref) => (this.dropdownRef = ref)}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EAEf,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,0BAA0B,EAE1B,kBAAkB,EAElB,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAG/B,IAAI,UAAU,GAAG,CAAC,CAAC;AAOnB,MAAM,OAAO,QAAQ;;QA8EX,sBAAiB,GAAe,IAAI,CAAC;QAMrC,aAAQ,GAAG,YAAY,UAAU,EAAE,EAAE,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n addDisposableEventListener,\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger: string | HTMLElement | Promise<HTMLElement>;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor: string | HTMLElement;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged: EventEmitter<boolean>;\n\n private autoUpdateCleanup: () => void = null;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private dropdownRef: HTMLElement;\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController: ArrowFocusController;\n private focusDropdownItemBind = this.focusDropdownItem.bind(this);\n\n private itemObserver = new MutationObserver(() => {\n this.arrowFocusController.items = this.dropdownItems;\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot.querySelector('slot');\n }\n\n private disposeClickListener?: () => void;\n private disposeKeyListener?: () => void;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: PointerEvent) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: false,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n (event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }\n );\n }\n\n private async registerListener(\n element: string | HTMLElement | Promise<HTMLElement>\n ) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(\n element: string | HTMLElement | Promise<HTMLElement>\n ) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element: Element) {\n if (!element) {\n return null;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(\n element: string | HTMLElement | Promise<HTMLElement>\n ): Promise<Element> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return;\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n if (document.querySelector(selector)) {\n return resolve(document.querySelector(selector));\n }\n\n const observer = new MutationObserver(() => {\n if (document.querySelector(selector)) {\n resolve(document.querySelector(selector));\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n this.anchorElement = await (this.anchor\n ? this.resolveElement(this.anchor)\n : this.resolveElement(this.trigger));\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.dropdownRef,\n this.focusDropdownItemBind\n );\n\n this.itemObserver.observe(this.dropdownRef, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.arrowFocusController.disconnect();\n this.itemObserver.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: string | HTMLElement | Promise<HTMLElement>) {\n this.registerListener(newTriggerValue);\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n if (!this.dropdownRef) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...positionConfig.middleware,\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = null;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.dropdownRef,\n async () => {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.dropdownRef,\n positionConfig\n );\n Object.assign(this.dropdownRef.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(computeResponse.x)}px,${Math.round(\n computeResponse.y\n )}px)`,\n });\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.dropdownRef,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.dropdownRef.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n this.dropdownItems[index]?.shadowRoot.querySelector('button').focus();\n });\n }\n\n async componentDidLoad() {\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n this.anchorElement = await (this.anchor\n ? this.resolveElement(this.anchor)\n : this.resolveElement(this.trigger));\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n if (dropdownController.pathIncludesTrigger(event.composedPath())) {\n event.preventDefault();\n\n if (this.isTriggerElement(event.target as HTMLElement)) {\n return;\n }\n }\n\n if (this.closeBehavior === 'inside' || this.closeBehavior === 'both') {\n dropdownController.dismissAll([this.getId()]);\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n ref={(ref) => (this.dropdownRef = ref)}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -43,7 +43,7 @@ label.label-alignment-left {
43
43
  padding: 6px 0px;
44
44
  }
45
45
 
46
- input, input:-webkit-autofill {
46
+ input {
47
47
  font-feature-settings: "clig" off, "liga" off;
48
48
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
49
49
  font-style: normal;
@@ -65,9 +65,18 @@ input, input:-webkit-autofill {
65
65
  box-shadow: var(--theme-input--box-shadow);
66
66
  }
67
67
  input:-webkit-autofill {
68
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
69
- -webkit-text-fill-color: var(--theme-input--color) !important;
70
- border-color: var(--theme-input--border-color) !important;
68
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
69
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
70
+ background-color: var(--theme-input--background--autofill) !important;
71
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
72
+ color: var(--theme-input--color--autofill) !important;
73
+ }
74
+ input:-webkit-autofill, input:autofill {
75
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
76
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
77
+ background-color: var(--theme-input--background--autofill) !important;
78
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
79
+ color: var(--theme-input--color--autofill) !important;
71
80
  }
72
81
  input::-moz-placeholder {
73
82
  color: var(--theme-input-hint--color);
@@ -76,13 +85,13 @@ input::placeholder {
76
85
  color: var(--theme-input-hint--color);
77
86
  }
78
87
  input.hover, input:hover {
79
- border-color: var(--theme-input--border-color--hover);
88
+ border-color: var(--theme-input--border-color--hover) !important;
80
89
  background-color: var(--theme-input--background--hover);
81
90
  }
82
91
  input.focus, input:focus {
83
92
  outline: 1px solid var(--theme-color-focus-bdr);
84
93
  outline-offset: var(--theme-input--focus--outline-offset);
85
- border-color: var(--theme-input--border-color--focus);
94
+ border-color: var(--theme-input--border-color--focus) !important;
86
95
  }
87
96
  input:-moz-read-only {
88
97
  box-shadow: none;
@@ -135,7 +144,7 @@ textarea {
135
144
  height: 3.25rem;
136
145
  padding: 0.375rem 1.25rem 0.375rem 0.5rem;
137
146
  }
138
- textarea, textarea:-webkit-autofill {
147
+ textarea {
139
148
  font-feature-settings: "clig" off, "liga" off;
140
149
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
141
150
  font-style: normal;
@@ -157,9 +166,18 @@ textarea, textarea:-webkit-autofill {
157
166
  box-shadow: var(--theme-input--box-shadow);
158
167
  }
159
168
  textarea:-webkit-autofill {
160
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
161
- -webkit-text-fill-color: var(--theme-input--color) !important;
162
- border-color: var(--theme-input--border-color) !important;
169
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
170
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
171
+ background-color: var(--theme-input--background--autofill) !important;
172
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
173
+ color: var(--theme-input--color--autofill) !important;
174
+ }
175
+ textarea:-webkit-autofill, textarea:autofill {
176
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
177
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
178
+ background-color: var(--theme-input--background--autofill) !important;
179
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
180
+ color: var(--theme-input--color--autofill) !important;
163
181
  }
164
182
  textarea::-moz-placeholder {
165
183
  color: var(--theme-input-hint--color);
@@ -168,13 +186,13 @@ textarea::placeholder {
168
186
  color: var(--theme-input-hint--color);
169
187
  }
170
188
  textarea.hover, textarea:hover {
171
- border-color: var(--theme-input--border-color--hover);
189
+ border-color: var(--theme-input--border-color--hover) !important;
172
190
  background-color: var(--theme-input--background--hover);
173
191
  }
174
192
  textarea.focus, textarea:focus {
175
193
  outline: 1px solid var(--theme-color-focus-bdr);
176
194
  outline-offset: var(--theme-input--focus--outline-offset);
177
- border-color: var(--theme-input--border-color--focus);
195
+ border-color: var(--theme-input--border-color--focus) !important;
178
196
  }
179
197
  textarea:-moz-read-only {
180
198
  box-shadow: none;
@@ -71,7 +71,7 @@ label.label-alignment-left {
71
71
  padding: 6px 0px;
72
72
  }
73
73
 
74
- input, input:-webkit-autofill {
74
+ input {
75
75
  font-feature-settings: "clig" off, "liga" off;
76
76
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
77
77
  font-style: normal;
@@ -93,9 +93,18 @@ input, input:-webkit-autofill {
93
93
  box-shadow: var(--theme-input--box-shadow);
94
94
  }
95
95
  input:-webkit-autofill {
96
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
97
- -webkit-text-fill-color: var(--theme-input--color) !important;
98
- border-color: var(--theme-input--border-color) !important;
96
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
97
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
98
+ background-color: var(--theme-input--background--autofill) !important;
99
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
100
+ color: var(--theme-input--color--autofill) !important;
101
+ }
102
+ input:-webkit-autofill, input:autofill {
103
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
104
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
105
+ background-color: var(--theme-input--background--autofill) !important;
106
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
107
+ color: var(--theme-input--color--autofill) !important;
99
108
  }
100
109
  input::-moz-placeholder {
101
110
  color: var(--theme-input-hint--color);
@@ -104,13 +113,13 @@ input::placeholder {
104
113
  color: var(--theme-input-hint--color);
105
114
  }
106
115
  input.hover, input:hover {
107
- border-color: var(--theme-input--border-color--hover);
116
+ border-color: var(--theme-input--border-color--hover) !important;
108
117
  background-color: var(--theme-input--background--hover);
109
118
  }
110
119
  input.focus, input:focus {
111
120
  outline: 1px solid var(--theme-color-focus-bdr);
112
121
  outline-offset: var(--theme-input--focus--outline-offset);
113
- border-color: var(--theme-input--border-color--focus);
122
+ border-color: var(--theme-input--border-color--focus) !important;
114
123
  }
115
124
  input:-moz-read-only {
116
125
  box-shadow: none;
@@ -163,7 +172,7 @@ textarea {
163
172
  height: 3.25rem;
164
173
  padding: 0.375rem 1.25rem 0.375rem 0.5rem;
165
174
  }
166
- textarea, textarea:-webkit-autofill {
175
+ textarea {
167
176
  font-feature-settings: "clig" off, "liga" off;
168
177
  font-family: Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;
169
178
  font-style: normal;
@@ -185,9 +194,18 @@ textarea, textarea:-webkit-autofill {
185
194
  box-shadow: var(--theme-input--box-shadow);
186
195
  }
187
196
  textarea:-webkit-autofill {
188
- -webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
189
- -webkit-text-fill-color: var(--theme-input--color) !important;
190
- border-color: var(--theme-input--border-color) !important;
197
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
198
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
199
+ background-color: var(--theme-input--background--autofill) !important;
200
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
201
+ color: var(--theme-input--color--autofill) !important;
202
+ }
203
+ textarea:-webkit-autofill, textarea:autofill {
204
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
205
+ -webkit-text-fill-color: var(--theme-input--color--autofill) !important;
206
+ background-color: var(--theme-input--background--autofill) !important;
207
+ border: var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;
208
+ color: var(--theme-input--color--autofill) !important;
191
209
  }
192
210
  textarea::-moz-placeholder {
193
211
  color: var(--theme-input-hint--color);
@@ -196,13 +214,13 @@ textarea::placeholder {
196
214
  color: var(--theme-input-hint--color);
197
215
  }
198
216
  textarea.hover, textarea:hover {
199
- border-color: var(--theme-input--border-color--hover);
217
+ border-color: var(--theme-input--border-color--hover) !important;
200
218
  background-color: var(--theme-input--background--hover);
201
219
  }
202
220
  textarea.focus, textarea:focus {
203
221
  outline: 1px solid var(--theme-color-focus-bdr);
204
222
  outline-offset: var(--theme-input--focus--outline-offset);
205
- border-color: var(--theme-input--border-color--focus);
223
+ border-color: var(--theme-input--border-color--focus) !important;
206
224
  }
207
225
  textarea:-moz-read-only {
208
226
  box-shadow: none;