@oiz/stzh-components 2.6.0 → 2.7.0-alpha

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 (170) hide show
  1. package/dist/cjs/{app-globals-4dcdf160.js → app-globals-5dfa53d1.js} +2 -2
  2. package/dist/cjs/{app-globals-4dcdf160.js.map → app-globals-5dfa53d1.js.map} +1 -1
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/stzh-amount.cjs.entry.js +30 -79
  6. package/dist/cjs/stzh-amount.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-components.cjs.js +2 -2
  8. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-dropdown.cjs.entry.js +60 -25
  10. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-monthyearpicker.cjs.entry.js +191 -0
  12. package/dist/cjs/stzh-monthyearpicker.cjs.entry.js.map +1 -0
  13. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-timepicker.cjs.entry.js +82 -0
  16. package/dist/cjs/stzh-timepicker.cjs.entry.js.map +1 -0
  17. package/dist/cjs/translation-utils-73073e44.js.map +1 -1
  18. package/dist/collection/assets/i18n/de.json +10 -7
  19. package/dist/collection/assets/i18n/en.json +8 -5
  20. package/dist/collection/collection-manifest.json +2 -0
  21. package/dist/collection/components/stzh-amount/stzh-amount.js +32 -85
  22. package/dist/collection/components/stzh-amount/stzh-amount.js.map +1 -1
  23. package/dist/collection/components/stzh-amount/stzh-amount.localization.js.map +1 -1
  24. package/dist/collection/components/stzh-amount/stzh-amount.stories.js +1 -1
  25. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  26. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  27. package/dist/collection/components/stzh-datepicker/stzh-datepicker.stories.js +3 -0
  28. package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +32 -20
  29. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +40 -9
  30. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  31. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +123 -0
  32. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js +724 -0
  33. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js.map +1 -0
  34. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js +2 -0
  35. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js.map +1 -0
  36. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.stories.js +61 -0
  37. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +1 -1
  38. package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +109 -0
  39. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +438 -0
  40. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js.map +1 -0
  41. package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js +2 -0
  42. package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js.map +1 -0
  43. package/dist/collection/components/stzh-timepicker/stzh-timepicker.stories.js +45 -0
  44. package/dist/collection/index.js.map +1 -1
  45. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +47 -18
  46. package/dist/collection/libraries/tom-select/cjs/tom-select.js +47 -18
  47. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +47 -18
  48. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +47 -18
  49. package/dist/collection/libraries/tom-select/esm/tom-select.js +47 -18
  50. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +47 -18
  51. package/dist/collection/libraries/tom-select/js/tom-select.base.js +47 -18
  52. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +16 -17
  53. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +47 -18
  54. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +12 -13
  55. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +47 -18
  56. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +21 -22
  57. package/dist/collection/utils/translation-utils.js.map +1 -1
  58. package/dist/components/index.js +1 -1
  59. package/dist/components/index2.js.map +1 -1
  60. package/dist/components/stzh-amount.js +40 -83
  61. package/dist/components/stzh-amount.js.map +1 -1
  62. package/dist/components/stzh-buttongroup.js +1 -31
  63. package/dist/components/stzh-buttongroup.js.map +1 -1
  64. package/dist/components/stzh-buttongroup2.js +35 -0
  65. package/dist/components/stzh-buttongroup2.js.map +1 -0
  66. package/dist/components/stzh-datepicker2.js.map +1 -1
  67. package/dist/components/stzh-dropdown2.js +61 -25
  68. package/dist/components/stzh-dropdown2.js.map +1 -1
  69. package/dist/components/stzh-monthyearpicker.d.ts +11 -0
  70. package/dist/components/stzh-monthyearpicker.js +251 -0
  71. package/dist/components/stzh-monthyearpicker.js.map +1 -0
  72. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  73. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  74. package/dist/components/stzh-timepicker.d.ts +11 -0
  75. package/dist/components/stzh-timepicker.js +132 -0
  76. package/dist/components/stzh-timepicker.js.map +1 -0
  77. package/dist/components/translation-utils.js.map +1 -1
  78. package/dist/esm/{app-globals-91875913.js → app-globals-862dc6d0.js} +2 -2
  79. package/dist/esm/{app-globals-91875913.js.map → app-globals-862dc6d0.js.map} +1 -1
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/loader.js +2 -2
  82. package/dist/esm/stzh-amount.entry.js +30 -79
  83. package/dist/esm/stzh-amount.entry.js.map +1 -1
  84. package/dist/esm/stzh-components.js +2 -2
  85. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  86. package/dist/esm/stzh-dropdown.entry.js +60 -25
  87. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  88. package/dist/esm/stzh-monthyearpicker.entry.js +187 -0
  89. package/dist/esm/stzh-monthyearpicker.entry.js.map +1 -0
  90. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  91. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  92. package/dist/esm/stzh-timepicker.entry.js +78 -0
  93. package/dist/esm/stzh-timepicker.entry.js.map +1 -0
  94. package/dist/esm/translation-utils-2623783f.js.map +1 -1
  95. package/dist/esm-es5/{app-globals-91875913.js → app-globals-862dc6d0.js} +2 -2
  96. package/dist/esm-es5/{app-globals-91875913.js.map → app-globals-862dc6d0.js.map} +1 -1
  97. package/dist/esm-es5/index.js.map +1 -1
  98. package/dist/esm-es5/loader.js +1 -1
  99. package/dist/esm-es5/loader.js.map +1 -1
  100. package/dist/esm-es5/stzh-amount.entry.js +1 -1
  101. package/dist/esm-es5/stzh-amount.entry.js.map +1 -1
  102. package/dist/esm-es5/stzh-components.js +1 -1
  103. package/dist/esm-es5/stzh-components.js.map +1 -1
  104. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  105. package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
  106. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  107. package/dist/esm-es5/stzh-monthyearpicker.entry.js +2 -0
  108. package/dist/esm-es5/stzh-monthyearpicker.entry.js.map +1 -0
  109. package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js +1 -1
  110. package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  111. package/dist/esm-es5/stzh-timepicker.entry.js +2 -0
  112. package/dist/esm-es5/stzh-timepicker.entry.js.map +1 -0
  113. package/dist/esm-es5/translation-utils-2623783f.js.map +1 -1
  114. package/dist/stzh-components/assets/i18n/de.json +10 -7
  115. package/dist/stzh-components/assets/i18n/en.json +8 -5
  116. package/dist/stzh-components/index.esm.js.map +1 -1
  117. package/dist/stzh-components/p-14e782cb.entry.js +2 -0
  118. package/dist/stzh-components/{p-85504842.entry.js.map → p-14e782cb.entry.js.map} +1 -1
  119. package/dist/stzh-components/p-1678e09c.system.js +2 -0
  120. package/dist/stzh-components/{p-3e10addb.system.js.map → p-1678e09c.system.js.map} +1 -1
  121. package/dist/stzh-components/p-25a09313.js.map +1 -1
  122. package/dist/stzh-components/{p-61b66e55.system.js → p-3b4833a0.system.js} +2 -2
  123. package/dist/stzh-components/{p-61b66e55.system.js.map → p-3b4833a0.system.js.map} +1 -1
  124. package/dist/stzh-components/p-51f1714c.system.entry.js +2 -0
  125. package/dist/stzh-components/p-51f1714c.system.entry.js.map +1 -0
  126. package/dist/stzh-components/p-5aa96b49.system.entry.js +2 -0
  127. package/dist/stzh-components/p-5aa96b49.system.entry.js.map +1 -0
  128. package/dist/stzh-components/p-82e886d4.entry.js.map +1 -1
  129. package/dist/stzh-components/p-9f31cf7d.entry.js +2 -0
  130. package/dist/stzh-components/p-9f31cf7d.entry.js.map +1 -0
  131. package/dist/stzh-components/p-9fe69be8.system.entry.js +2 -0
  132. package/dist/stzh-components/{p-479a02fb.system.entry.js.map → p-9fe69be8.system.entry.js.map} +1 -1
  133. package/dist/stzh-components/p-a408bfba.system.js.map +1 -1
  134. package/dist/stzh-components/p-ad33db31.entry.js +2 -0
  135. package/dist/stzh-components/p-ad33db31.entry.js.map +1 -0
  136. package/dist/stzh-components/p-b5cda655.entry.js +2 -0
  137. package/dist/stzh-components/p-b5cda655.entry.js.map +1 -0
  138. package/dist/stzh-components/{p-362af013.js → p-bc82ed48.js} +2 -2
  139. package/dist/stzh-components/{p-362af013.js.map → p-bc82ed48.js.map} +1 -1
  140. package/dist/stzh-components/p-c0f971f2.entry.js +9 -0
  141. package/dist/stzh-components/p-c0f971f2.entry.js.map +1 -0
  142. package/dist/stzh-components/p-c901fe72.system.entry.js +9 -0
  143. package/dist/stzh-components/p-c901fe72.system.entry.js.map +1 -0
  144. package/dist/stzh-components/p-e8545386.system.entry.js +2 -0
  145. package/dist/stzh-components/p-e8545386.system.entry.js.map +1 -0
  146. package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
  147. package/dist/stzh-components/p-f2d74491.system.entry.js.map +1 -1
  148. package/dist/stzh-components/stzh-components.css +1 -1
  149. package/dist/stzh-components/stzh-components.esm.js +1 -1
  150. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  151. package/dist/stzh-components/stzh-components.js +1 -1
  152. package/dist/types/components/stzh-amount/stzh-amount.localization.d.ts +0 -2
  153. package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.d.ts +5 -0
  154. package/dist/types/components/stzh-timepicker/stzh-timepicker.localization.d.ts +2 -0
  155. package/dist/types/components.d.ts +428 -6
  156. package/dist/types/index.d.ts +14 -0
  157. package/dist/types/utils/translation-utils.d.ts +1 -0
  158. package/dist/vscode-data.json +263 -1
  159. package/package.json +1 -1
  160. package/dist/stzh-components/p-1cc48f98.entry.js +0 -9
  161. package/dist/stzh-components/p-1cc48f98.entry.js.map +0 -1
  162. package/dist/stzh-components/p-3e10addb.system.js +0 -2
  163. package/dist/stzh-components/p-479a02fb.system.entry.js +0 -2
  164. package/dist/stzh-components/p-67b11b03.system.entry.js +0 -2
  165. package/dist/stzh-components/p-67b11b03.system.entry.js.map +0 -1
  166. package/dist/stzh-components/p-6bb83b30.system.entry.js +0 -9
  167. package/dist/stzh-components/p-6bb83b30.system.entry.js.map +0 -1
  168. package/dist/stzh-components/p-85504842.entry.js +0 -2
  169. package/dist/stzh-components/p-c94f7331.entry.js +0 -2
  170. package/dist/stzh-components/p-c94f7331.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stzh-monthyearpicker.js","sourceRoot":"","sources":["../../../src/components/stzh-monthyearpicker/stzh-monthyearpicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Host,\n Element,\n h,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhDropdownOption,\n StzhDropdownChangeEvent,\n StzhMonthyearpickerChangeEvent\n} from \"../../index\";\n\nimport { fetchTranslations } from \"../../utils/translation-utils\";\nimport { StzhMonthyearpickerLocalizedText } from \"./stzh-monthyearpicker.localization\";\n\n/**\n */\n@Component({\n tag: \"stzh-monthyearpicker\",\n styleUrl: \"stzh-monthyearpicker.scss\",\n scoped: true\n})\nexport class StzhMonthyearpicker {\n /** Set which months to show (overwrites months from min/max) */\n @Prop() months: number[] | string;\n private _months: number[];\n\n /** Set which years to show (overwrites years from min/max) */\n @Prop() years: number[] | string;\n private _years: number[];\n\n /**\n * Minimum month and year allowed to be picked in `YYYY-MM` format.\n * This setting can be used alone or together with the `max` property.\n */\n @Prop() min: string;\n\n /**\n * Maximum month and year allowed to be picked in `YYYY-MM` format.\n * This setting can be used alone or together with the `min` property.\n */\n @Prop() max: string;\n\n /**\n * Minimum year (will be overwritten if `min` is used).\n * This setting can be used alone or together with the `maxYear` property.\n */\n @Prop() minYear: number;\n\n /**\n * Maximum year (will be overwritten if `max` is used).\n * This setting can be used alone or together with the `minYear` property.\n */\n @Prop() maxYear: number;\n\n /** Picker format. */\n @Prop({ reflect: true }) format: \"default\" | \"creditcard\" = \"default\";\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Value of hidden input (current selected year and month YYYY-MM). */\n @Prop({ mutable: true }) value: string = \"0000-00\";\n\n /** Popover placement for the dropdown (if applicable) */\n @Prop({ reflect: true }) popoverPlacement: \"bottom\" | \"bottom-end\" | \"bottom-center\" | \"top\" | \"top-end\" | \"top-center\" = \"bottom\";\n\n /** Month dropdown label */\n @Prop() monthLabel: string = \"\";\n\n /** Year dropdown label */\n @Prop() yearLabel: string = \"\";\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Description message for month */\n @Prop() descriptionMonth: string;\n\n /** Description message for year */\n @Prop() descriptionYear: string;\n\n /** Long description message appearing in a popover for month */\n @Prop() descriptionLongMonth: string;\n\n /** Long description message appearing in a popover for year */\n @Prop() descriptionLongYear: string;\n\n /** One or multiple error message for month */\n @Prop() errorMonth: string | string[];\n\n /** One or multiple error message for year */\n @Prop() errorYear: string | string[];\n\n /** Invalid status for month */\n @Prop({ reflect: true }) invalidMonth: boolean = false;\n\n /** Invalid status for year */\n @Prop({ reflect: true }) invalidYear: boolean = false;\n\n /** Id of the element which describes the month dropdown */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedbyMonth: string = \"\";\n\n /** Id of the element which describes the year dropdown */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedbyYear: string = \"\";\n\n /** Translation strings. */\n @Prop() localization: StzhMonthyearpickerLocalizedText;\n\n /** Monthyearpicker change event */\n @Event() stzhChange: EventEmitter<StzhMonthyearpickerChangeEvent>;\n\n @Element() element: HTMLStzhMonthyearpickerElement;\n\n @Watch(\"months\")\n monthsWatcher(newValue: number[] | string) {\n if (typeof newValue === \"string\") {\n this._months = JSON.parse(newValue);\n } else {\n this._months = newValue;\n }\n\n this.updateMonthOptions();\n }\n\n @Watch(\"years\")\n yearsWatcher(newValue: number[] | string) {\n if (typeof newValue === \"string\") {\n this._years = JSON.parse(newValue);\n } else {\n this._years = newValue;\n }\n\n this.updateYearOptions();\n }\n\n @Watch(\"value\")\n @Watch(\"min\")\n @Watch(\"max\")\n minMaxWatcher() {\n this.updateMonthOptions();\n this.updateYearOptions();\n }\n\n private monthsDropdown: HTMLStzhDropdownElement;\n private dropdownMonthOptions: StzhDropdownOption[];\n private dropdownYearOptions: StzhDropdownOption[];\n\n private onRootFocus = () => {\n if (this.monthsDropdown) {\n this.monthsDropdown.setFocus();\n }\n }\n\n private onMonthsDropdownChange = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const year = this.value.split(\"-\")[0] || \"0000\";\n const month = event.detail.value || \"00\";\n this.onChange(year, month);\n }\n\n private onYearsDropdownChange = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const year = event.detail.value || \"0000\";\n const month = this.value.split(\"-\")[1] || \"00\";\n this.onChange(year, month);\n }\n\n private onChange(year, month) {\n this.value = `${year}-${month}`;\n this.stzhChange.emit({\n component: \"stzh-monthyearpicker\",\n value: this.value,\n valueMonth: month,\n valueYear: year\n });\n }\n\n private updateMonthOptions() {\n const options = [];\n let months = [];\n\n if (this._months) {\n months = this._months;\n } else {\n const currentYear = Number(this.value.split(\"-\")[0] || \"0000\");\n\n let minMonth = 1;\n let maxMonth = 12;\n\n if (this.min) {\n const minDate = new Date(this.min);\n\n if (currentYear === minDate.getFullYear()) {\n minMonth = minDate.getMonth() + 1;\n }\n }\n\n if (this.max) {\n const maxDate = new Date(this.max);\n\n if (currentYear === maxDate.getFullYear()) {\n maxMonth = maxDate.getMonth() + 1;\n }\n }\n\n for (let i = minMonth; i <= maxMonth; i++) {\n months.push(i);\n }\n }\n\n months.forEach((month) => {\n const paddedMonth = (\"00\" + month).slice(-2);\n const monthName = this.localization.$globals.monthNames[month - 1];\n\n options.push({\n text: this.format === \"creditcard\"\n ? `${paddedMonth} (${monthName})`\n : monthName,\n value: paddedMonth\n });\n });\n\n this.dropdownMonthOptions = options;\n }\n\n private updateYearOptions(): void {\n const options = [];\n let years = [];\n\n if (this._years) {\n years = this._years;\n } else {\n const currentMonth = Number(this.value.split(\"-\")[1] || \"00\");\n\n const yearNow = new Date().getFullYear();\n let minYear = this.minYear || (yearNow - 10);\n let maxYear = this.maxYear || (yearNow + 10);\n\n if (this.min) {\n const minDate = new Date(this.min);\n\n if (currentMonth && currentMonth < minDate.getMonth() + 1) {\n minYear = minDate.getFullYear() + 1;\n } else {\n minYear = minDate.getFullYear();\n }\n }\n\n if (this.max) {\n const maxDate = new Date(this.max);\n\n if (currentMonth && currentMonth > maxDate.getMonth() + 1) {\n maxYear = maxDate.getFullYear() - 1;\n } else {\n maxYear = maxDate.getFullYear();\n }\n }\n\n for (let i = minYear; i <= maxYear; i++) {\n years.push(i);\n }\n }\n\n years.forEach((year) => {\n options.push({ text: year, value: year });\n });\n\n this.dropdownYearOptions = options;\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await fetchTranslations(this.element, \"monthyearpicker\");\n }\n\n this.monthsWatcher(this.months);\n this.yearsWatcher(this.years);\n }\n\n render() {\n const classes = {\n \"stzh-monthyearpicker\": true\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n\n <div class=\"stzh-monthyearpicker__wrapper\">\n <stzh-dropdown\n name={`${this.name}-month`}\n class=\"stzh-monthyearpicker__months-dropdown\"\n label={this.monthLabel || this.localization.monthLabel}\n ref={(el) => (this.monthsDropdown = el as HTMLStzhDropdownElement)}\n onStzhChange={this.onMonthsDropdownChange}\n options={this.dropdownMonthOptions}\n items={[this.value.split(\"-\")[1]]}\n required={this.required}\n disabled={this.disabled}\n size={this.size}\n showMarker={this.showMarker}\n popoverPlacement={this.popoverPlacement}\n description={this.descriptionMonth}\n descriptionLong={this.descriptionLongMonth}\n error={this.errorMonth}\n a11yDescribedby={this.a11yDescribedbyMonth}\n invalid={this.invalidMonth}\n ></stzh-dropdown>\n\n <div class=\"stzh-monthyearpicker__separator\">/</div>\n\n <stzh-dropdown\n name={`${this.name}-year`}\n class=\"stzh-monthyearpicker__years-dropdown\"\n label={this.yearLabel || this.localization.yearLabel}\n onStzhChange={this.onYearsDropdownChange}\n options={this.dropdownYearOptions}\n items={[this.value.split(\"-\")[0]]}\n required={this.required}\n disabled={this.disabled}\n size={this.size}\n showMarker={this.showMarker}\n popoverPlacement={this.popoverPlacement}\n description={this.descriptionYear}\n descriptionLong={this.descriptionLongYear}\n error={this.errorYear}\n a11yDescribedby={this.a11yDescribedbyYear}\n invalid={this.invalidYear}\n ></stzh-dropdown>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stzh-monthyearpicker.localization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stzh-monthyearpicker.localization.js","sourceRoot":"","sources":["../../../src/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.ts"],"names":[],"mappings":"","sourcesContent":["import { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nexport type StzhMonthyearpickerLocalizedText = StzhLocaleComponent & {\n monthLabel: string\n yearLabel: string\n}\n"]}
@@ -0,0 +1,61 @@
1
+ import { createComponentStory } from '../../utils/story-utils';
2
+ import { withActions } from '@storybook/addon-actions/decorator';
3
+ import readme from './readme.md?raw';
4
+ import { withDesign } from 'storybook-addon-designs';
5
+ import { getFigmaLink } from '../../../figma';
6
+ import { fullwidthCentered } from '../../utils/decorators';
7
+
8
+ const COMPONENT_NAME = 'stzh-monthyearpicker';
9
+ const story = createComponentStory(COMPONENT_NAME);
10
+
11
+ const TEMPLATE = `
12
+ <stzh-monthyearpicker></stzh-monthyearpicker>
13
+ `;
14
+
15
+ export default {
16
+ title: 'Components/Monthyearpicker',
17
+ component: COMPONENT_NAME,
18
+ parameters: {
19
+ actions: {
20
+ handles: ['stzhChange']
21
+ },
22
+ docs: {
23
+ description: {
24
+ component: readme
25
+ }
26
+ },
27
+ design: {
28
+ type: 'figma',
29
+ url: getFigmaLink('monthyearpicker'),
30
+ allowFullscreen: true
31
+ }
32
+ },
33
+ decorators: [
34
+ withActions,
35
+ withDesign,
36
+ fullwidthCentered
37
+ ]
38
+ };
39
+
40
+ export const Default = {
41
+ render: (args) => story(args, TEMPLATE),
42
+ args: {}
43
+ };
44
+
45
+ export const Creditcard = {
46
+ render: (args) => story(args, TEMPLATE),
47
+ args: {
48
+ 'format': 'creditcard',
49
+ 'min-year': new Date().getFullYear(),
50
+ 'max-year': new Date().getFullYear() + 5
51
+ }
52
+ };
53
+
54
+ export const WithMinMax = {
55
+ render: (args) => story(args, TEMPLATE),
56
+ args: {
57
+ min: "2022-03",
58
+ max: "2023-05"
59
+ }
60
+ };
61
+
@@ -520,7 +520,7 @@ the .has-focus class is used by the focus target */
520
520
 
521
521
  --stzh-button-text-hover-background: rgba(195, 0, 36, 0.08);
522
522
  --stzh-link-color: var(--stzh-color-scienceblue);
523
- --stzh-heading-color: var(--stzh-color-black);
523
+ --stzh-heading-color: var(--stzh-color-grey70);
524
524
  }
525
525
 
526
526
  .stzh-theme-pkzh {
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Colors
3
+ */
4
+ /*
5
+ * Base
6
+ */
7
+ /**
8
+ * Flyingfocus
9
+ */
10
+ /**
11
+ * Link
12
+ */
13
+ /**
14
+ * Text
15
+ */
16
+ /**
17
+ * Richtext
18
+ */
19
+ /**
20
+ * Section
21
+ */
22
+ /**
23
+ * Header
24
+ */
25
+ /**
26
+ * Appnav
27
+ */
28
+ /**
29
+ * Progressbar
30
+ */
31
+ /**
32
+ * Loader
33
+ */
34
+ /**
35
+ * Table
36
+ */
37
+ /**
38
+ * Heading
39
+ */
40
+ /**
41
+ * Menu (Item)
42
+ */
43
+ /**
44
+ * Form Elements (Input / Checkbox / Radio / Select / Datepicker)
45
+ */
46
+ /**
47
+ * Popover
48
+ */
49
+ /**
50
+ * Tooltips
51
+ */
52
+ /**
53
+ * Accordions
54
+ */
55
+ /**
56
+ * Buttons
57
+ */
58
+ /**
59
+ * Box Shadows
60
+ */
61
+ /**
62
+ * Z-Indexes
63
+ * Inspired by https://www.duetds.com/tokens/#z-index
64
+ */
65
+ /**
66
+ * Icon sizes
67
+ */
68
+ /**
69
+ * Grid
70
+ */
71
+ /**
72
+ * Breakpoints
73
+ */
74
+ /**
75
+ * Container
76
+ */
77
+ /**
78
+ * Spaces
79
+ */
80
+ /**
81
+ * Fonts
82
+ */
83
+ :host {
84
+ font-family: var(--stzh-font-family-regular);
85
+ font-weight: var(--stzh-font-weight-regular);
86
+ font-style: normal;
87
+ color: var(--stzh-base-color);
88
+ box-sizing: border-box;
89
+ display: block;
90
+ }
91
+ :host[hidden] {
92
+ display: none;
93
+ }
94
+ :host *,
95
+ :host *::before,
96
+ :host *::after {
97
+ box-sizing: border-box;
98
+ text-underline-offset: var(--stzh-link-text-underline-offset);
99
+ text-decoration-thickness: var(--stzh-link-text-decoration-thickness);
100
+ }
101
+
102
+ :host {
103
+ width: 100%;
104
+ }
105
+
106
+ .stzh-timepicker__dropdown {
107
+ --icon-angle-size: var(--stzh-icon-size-small);
108
+ --active-icon-angle-transform: rotate(0deg) translateY(-50%);
109
+ }
@@ -0,0 +1,438 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { fetchTranslations } from "../../utils/translation-utils";
3
+ /**
4
+ */
5
+ export class StzhTimepicker {
6
+ constructor() {
7
+ this.onRootFocus = () => {
8
+ if (this.input) {
9
+ this.input.setFocus();
10
+ }
11
+ };
12
+ this.onDropdownChange = (event) => {
13
+ this.value = event.detail.value;
14
+ this.stzhChange.emit({
15
+ component: "stzh-timepicker",
16
+ value: this.value
17
+ });
18
+ };
19
+ this.min = 0;
20
+ this.max = 1439;
21
+ this.step = 15;
22
+ this.name = "";
23
+ this.value = "";
24
+ this.popoverPlacement = "bottom";
25
+ this.label = "";
26
+ this.readonly = false;
27
+ this.disabled = false;
28
+ this.description = undefined;
29
+ this.descriptionLong = undefined;
30
+ this.error = undefined;
31
+ this.invalid = false;
32
+ this.required = false;
33
+ this.showMarker = false;
34
+ this.size = "default";
35
+ this.a11yDescribedby = '';
36
+ this.localization = undefined;
37
+ }
38
+ minMaxWatcher() {
39
+ this.updateDropdownOptions();
40
+ }
41
+ updateDropdownOptions() {
42
+ const options = [];
43
+ for (let i = this.min; i <= this.max; i = i + this.step) {
44
+ let hours = Math.floor(i / 60);
45
+ let minutes = i % 60;
46
+ let paddedHours = ('00' + hours).slice(-2);
47
+ let paddedMinutes = ('00' + minutes).slice(-2);
48
+ let time = `${paddedHours}.${paddedMinutes}`;
49
+ options.push({ text: time, value: time });
50
+ }
51
+ this._dropdownOptions = options;
52
+ }
53
+ async componentWillLoad() {
54
+ this.minMaxWatcher();
55
+ if (!this.localization) {
56
+ this.localization = await fetchTranslations(this.element, "timepicker");
57
+ }
58
+ }
59
+ render() {
60
+ const classes = {
61
+ "stzh-timepicker": true
62
+ };
63
+ return (h(Host, { tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, h("div", { class: classes }, h("stzh-dropdown", { class: "stzh-timepicker__dropdown", iconAngle: "clock", label: this.label, ref: (el) => (this.input = el), onStzhChange: this.onDropdownChange, options: this._dropdownOptions, items: [this.value], required: this.required, disabled: this.disabled, description: this.description, descriptionLong: this.descriptionLong, error: this.error, popoverPlacement: this.popoverPlacement, a11yDescribedby: this.a11yDescribedby, name: this.name, size: this.size, invalid: this.invalid, showMarker: this.showMarker }))));
64
+ }
65
+ static get is() { return "stzh-timepicker"; }
66
+ static get encapsulation() { return "scoped"; }
67
+ static get originalStyleUrls() {
68
+ return {
69
+ "$": ["stzh-timepicker.scss"]
70
+ };
71
+ }
72
+ static get styleUrls() {
73
+ return {
74
+ "$": ["stzh-timepicker.css"]
75
+ };
76
+ }
77
+ static get properties() {
78
+ return {
79
+ "min": {
80
+ "type": "number",
81
+ "mutable": false,
82
+ "complexType": {
83
+ "original": "number",
84
+ "resolved": "number",
85
+ "references": {}
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": "Minimum time allowed to be picked in minutes. Can not be lower than 0.\nThis setting can be used alone or together with the max property."
92
+ },
93
+ "attribute": "min",
94
+ "reflect": false,
95
+ "defaultValue": "0"
96
+ },
97
+ "max": {
98
+ "type": "number",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "number",
102
+ "resolved": "number",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Maximum time allowed to be picked in minutes. Can not be higher than 1440 (24h * 60).\nThis setting can be used alone or together with the min property."
110
+ },
111
+ "attribute": "max",
112
+ "reflect": false,
113
+ "defaultValue": "1439"
114
+ },
115
+ "step": {
116
+ "type": "number",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "number",
120
+ "resolved": "number",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": "Time added for each step in minutes."
128
+ },
129
+ "attribute": "step",
130
+ "reflect": false,
131
+ "defaultValue": "15"
132
+ },
133
+ "name": {
134
+ "type": "string",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "string",
138
+ "resolved": "string",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": false,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "Name of the hidden date picker input."
146
+ },
147
+ "attribute": "name",
148
+ "reflect": true,
149
+ "defaultValue": "\"\""
150
+ },
151
+ "value": {
152
+ "type": "string",
153
+ "mutable": true,
154
+ "complexType": {
155
+ "original": "string",
156
+ "resolved": "string",
157
+ "references": {}
158
+ },
159
+ "required": false,
160
+ "optional": false,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": "Value of hidden date picker input (current selected date in ISO format)."
164
+ },
165
+ "attribute": "value",
166
+ "reflect": false,
167
+ "defaultValue": "\"\""
168
+ },
169
+ "popoverPlacement": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "\"bottom\" | \"bottom-end\" | \"bottom-center\" | \"top\" | \"top-end\" | \"top-center\"",
174
+ "resolved": "\"bottom\" | \"bottom-center\" | \"bottom-end\" | \"top\" | \"top-center\" | \"top-end\"",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": false,
179
+ "docs": {
180
+ "tags": [],
181
+ "text": "Popover placement for the dropdown (if applicable)"
182
+ },
183
+ "attribute": "popover-placement",
184
+ "reflect": true,
185
+ "defaultValue": "\"bottom\""
186
+ },
187
+ "label": {
188
+ "type": "string",
189
+ "mutable": false,
190
+ "complexType": {
191
+ "original": "string",
192
+ "resolved": "string",
193
+ "references": {}
194
+ },
195
+ "required": false,
196
+ "optional": false,
197
+ "docs": {
198
+ "tags": [],
199
+ "text": "Label for dropdown"
200
+ },
201
+ "attribute": "label",
202
+ "reflect": false,
203
+ "defaultValue": "\"\""
204
+ },
205
+ "readonly": {
206
+ "type": "boolean",
207
+ "mutable": false,
208
+ "complexType": {
209
+ "original": "boolean",
210
+ "resolved": "boolean",
211
+ "references": {}
212
+ },
213
+ "required": false,
214
+ "optional": false,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": "Whether the element is readonly or not"
218
+ },
219
+ "attribute": "readonly",
220
+ "reflect": true,
221
+ "defaultValue": "false"
222
+ },
223
+ "disabled": {
224
+ "type": "boolean",
225
+ "mutable": false,
226
+ "complexType": {
227
+ "original": "boolean",
228
+ "resolved": "boolean",
229
+ "references": {}
230
+ },
231
+ "required": false,
232
+ "optional": false,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": "Whether the element is disabled or not"
236
+ },
237
+ "attribute": "disabled",
238
+ "reflect": true,
239
+ "defaultValue": "false"
240
+ },
241
+ "description": {
242
+ "type": "string",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "string",
246
+ "resolved": "string",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": false,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "Description message (use description slot as alternative)"
254
+ },
255
+ "attribute": "description",
256
+ "reflect": false
257
+ },
258
+ "descriptionLong": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "string",
263
+ "resolved": "string",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": false,
268
+ "docs": {
269
+ "tags": [],
270
+ "text": "Long description message appearing in a popover (use description-long slot as alternative)"
271
+ },
272
+ "attribute": "description-long",
273
+ "reflect": false
274
+ },
275
+ "error": {
276
+ "type": "string",
277
+ "mutable": false,
278
+ "complexType": {
279
+ "original": "string | string[]",
280
+ "resolved": "string | string[]",
281
+ "references": {}
282
+ },
283
+ "required": false,
284
+ "optional": false,
285
+ "docs": {
286
+ "tags": [],
287
+ "text": "One or multiple error message (use error slot as alternative)"
288
+ },
289
+ "attribute": "error",
290
+ "reflect": false
291
+ },
292
+ "invalid": {
293
+ "type": "boolean",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "boolean",
297
+ "resolved": "boolean",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": "Invalid status"
305
+ },
306
+ "attribute": "invalid",
307
+ "reflect": true,
308
+ "defaultValue": "false"
309
+ },
310
+ "required": {
311
+ "type": "boolean",
312
+ "mutable": false,
313
+ "complexType": {
314
+ "original": "boolean",
315
+ "resolved": "boolean",
316
+ "references": {}
317
+ },
318
+ "required": false,
319
+ "optional": false,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": "Required status"
323
+ },
324
+ "attribute": "required",
325
+ "reflect": true,
326
+ "defaultValue": "false"
327
+ },
328
+ "showMarker": {
329
+ "type": "boolean",
330
+ "mutable": false,
331
+ "complexType": {
332
+ "original": "boolean",
333
+ "resolved": "boolean",
334
+ "references": {}
335
+ },
336
+ "required": false,
337
+ "optional": false,
338
+ "docs": {
339
+ "tags": [],
340
+ "text": "Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing"
341
+ },
342
+ "attribute": "show-marker",
343
+ "reflect": true,
344
+ "defaultValue": "false"
345
+ },
346
+ "size": {
347
+ "type": "string",
348
+ "mutable": false,
349
+ "complexType": {
350
+ "original": "\"default\" | \"small\"",
351
+ "resolved": "\"default\" | \"small\"",
352
+ "references": {}
353
+ },
354
+ "required": false,
355
+ "optional": false,
356
+ "docs": {
357
+ "tags": [],
358
+ "text": "Size variant"
359
+ },
360
+ "attribute": "size",
361
+ "reflect": true,
362
+ "defaultValue": "\"default\""
363
+ },
364
+ "a11yDescribedby": {
365
+ "type": "string",
366
+ "mutable": false,
367
+ "complexType": {
368
+ "original": "string",
369
+ "resolved": "string",
370
+ "references": {}
371
+ },
372
+ "required": false,
373
+ "optional": false,
374
+ "docs": {
375
+ "tags": [],
376
+ "text": "Id of the element which describes the input"
377
+ },
378
+ "attribute": "a11y-describedby",
379
+ "reflect": false,
380
+ "defaultValue": "''"
381
+ },
382
+ "localization": {
383
+ "type": "unknown",
384
+ "mutable": false,
385
+ "complexType": {
386
+ "original": "StzhTimepickerLocalizedText",
387
+ "resolved": "{ $locale: \"de\" | \"en\"; $formats: StzhLocaleFormats; $globals: StzhLocaleGlobals; }",
388
+ "references": {
389
+ "StzhTimepickerLocalizedText": {
390
+ "location": "import",
391
+ "path": "./stzh-timepicker.localization"
392
+ }
393
+ }
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "Translation strings."
400
+ }
401
+ }
402
+ };
403
+ }
404
+ static get events() {
405
+ return [{
406
+ "method": "stzhChange",
407
+ "name": "stzhChange",
408
+ "bubbles": true,
409
+ "cancelable": true,
410
+ "composed": true,
411
+ "docs": {
412
+ "tags": [],
413
+ "text": "Timepicker change event"
414
+ },
415
+ "complexType": {
416
+ "original": "StzhTimepickerChangeEvent",
417
+ "resolved": "{ component: \"stzh-timepicker\"; value: string; }",
418
+ "references": {
419
+ "StzhTimepickerChangeEvent": {
420
+ "location": "import",
421
+ "path": "../../index"
422
+ }
423
+ }
424
+ }
425
+ }];
426
+ }
427
+ static get elementRef() { return "element"; }
428
+ static get watchers() {
429
+ return [{
430
+ "propName": "min",
431
+ "methodName": "minMaxWatcher"
432
+ }, {
433
+ "propName": "max",
434
+ "methodName": "minMaxWatcher"
435
+ }];
436
+ }
437
+ }
438
+ //# sourceMappingURL=stzh-timepicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stzh-timepicker.js","sourceRoot":"","sources":["../../../src/components/stzh-timepicker/stzh-timepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,CAAC,EACD,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AAQvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE;GACG;AAMH,MAAM,OAAO,cAAc;;IA2EjB,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;OACvB;IACH,CAAC,CAAA;IAEO,qBAAgB,GAAG,CAAC,KAA2C,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Host,\n Element,\n h,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhDropdownOption,\n StzhDropdownChangeEvent,\n StzhTimepickerChangeEvent\n} from \"../../index\";\n\nimport { fetchTranslations } from \"../../utils/translation-utils\";\nimport { StzhTimepickerLocalizedText } from \"./stzh-timepicker.localization\";\n\n/**\n */\n@Component({\n tag: \"stzh-timepicker\",\n styleUrl: \"stzh-timepicker.scss\",\n scoped: true\n})\nexport class StzhTimepicker {\n /**\n * Minimum time allowed to be picked in minutes. Can not be lower than 0.\n * This setting can be used alone or together with the max property.\n */\n @Prop() min: number = 0\n\n /**\n * Maximum time allowed to be picked in minutes. Can not be higher than 1440 (24h * 60).\n * This setting can be used alone or together with the min property.\n */\n @Prop() max: number = 1439;\n\n /** Time added for each step in minutes. */\n @Prop() step: number = 15;\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Value of hidden date picker input (current selected date in ISO format). */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Popover placement for the dropdown (if applicable) */\n @Prop({ reflect: true }) popoverPlacement: \"bottom\" | \"bottom-end\" | \"bottom-center\" | \"top\" | \"top-end\" | \"top-center\" = \"bottom\";\n\n /** Label for dropdown */\n @Prop() label: string = \"\";\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Id of the element which describes the input */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = '';\n\n /** Translation strings. */\n @Prop() localization: StzhTimepickerLocalizedText;\n\n /** Timepicker change event */\n @Event() stzhChange: EventEmitter<StzhTimepickerChangeEvent>;\n\n @Element() element: HTMLStzhTimepickerElement;\n\n @Watch(\"min\")\n @Watch(\"max\")\n minMaxWatcher() {\n this.updateDropdownOptions();\n }\n\n private input: HTMLStzhDropdownElement;\n private _dropdownOptions: StzhDropdownOption[];\n\n private onRootFocus = () => {\n if (this.input) {\n this.input.setFocus();\n }\n }\n\n private onDropdownChange = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n this.value = event.detail.value;\n\n this.stzhChange.emit({\n component: \"stzh-timepicker\",\n value: this.value\n });\n }\n\n private updateDropdownOptions(): void {\n const options = [];\n\n for (let i = this.min; i <= this.max; i = i + this.step) {\n let hours: number = Math.floor(i / 60);\n let minutes: number = i % 60;\n\n let paddedHours: string = ('00' + hours).slice(-2);\n let paddedMinutes: string = ('00' + minutes).slice(-2);\n let time = `${paddedHours}.${paddedMinutes}`;\n\n options.push({ text: time, value: time });\n }\n\n this._dropdownOptions = options;\n }\n\n async componentWillLoad() {\n this.minMaxWatcher();\n\n if (!this.localization) {\n this.localization = await fetchTranslations(this.element, \"timepicker\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-timepicker\": true\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <stzh-dropdown\n class=\"stzh-timepicker__dropdown\"\n iconAngle={\"clock\"}\n label={this.label}\n ref={(el) => (this.input = el as HTMLStzhDropdownElement)}\n onStzhChange={this.onDropdownChange}\n options={this._dropdownOptions}\n items={[this.value]}\n required={this.required}\n disabled={this.disabled}\n description={this.description}\n descriptionLong={this.descriptionLong}\n error={this.error}\n popoverPlacement={this.popoverPlacement}\n a11yDescribedby={this.a11yDescribedby}\n name={this.name}\n size={this.size}\n invalid={this.invalid}\n showMarker={this.showMarker}\n ></stzh-dropdown>\n </div>\n </Host>\n );\n }\n}\n"]}