@oiz/stzh-components 2.6.0 → 2.7.0-beta

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 (188) hide show
  1. package/dist/cjs/{app-globals-4dcdf160.js → app-globals-d0d1f796.js} +2 -2
  2. package/dist/cjs/{app-globals-4dcdf160.js.map → app-globals-d0d1f796.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-pagetitle.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  16. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  17. package/dist/cjs/stzh-timepicker.cjs.entry.js +82 -0
  18. package/dist/cjs/stzh-timepicker.cjs.entry.js.map +1 -0
  19. package/dist/cjs/translation-utils-73073e44.js.map +1 -1
  20. package/dist/collection/assets/i18n/de.json +10 -7
  21. package/dist/collection/assets/i18n/en.json +8 -5
  22. package/dist/collection/collection-manifest.json +2 -0
  23. package/dist/collection/components/stzh-amount/stzh-amount.js +32 -85
  24. package/dist/collection/components/stzh-amount/stzh-amount.js.map +1 -1
  25. package/dist/collection/components/stzh-amount/stzh-amount.localization.js.map +1 -1
  26. package/dist/collection/components/stzh-amount/stzh-amount.stories.js +1 -1
  27. package/dist/collection/components/stzh-card/stzh-card.stories.js +5 -5
  28. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  29. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  30. package/dist/collection/components/stzh-datepicker/stzh-datepicker.stories.js +3 -0
  31. package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +32 -20
  32. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +40 -9
  33. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  34. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +123 -0
  35. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js +724 -0
  36. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js.map +1 -0
  37. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js +2 -0
  38. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js.map +1 -0
  39. package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.stories.js +61 -0
  40. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +3 -0
  41. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +1 -1
  42. package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +109 -0
  43. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +438 -0
  44. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js.map +1 -0
  45. package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js +2 -0
  46. package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js.map +1 -0
  47. package/dist/collection/components/stzh-timepicker/stzh-timepicker.stories.js +45 -0
  48. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +2 -2
  49. package/dist/collection/index.js.map +1 -1
  50. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +47 -18
  51. package/dist/collection/libraries/tom-select/cjs/tom-select.js +47 -18
  52. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +47 -18
  53. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +47 -18
  54. package/dist/collection/libraries/tom-select/esm/tom-select.js +47 -18
  55. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +47 -18
  56. package/dist/collection/libraries/tom-select/js/tom-select.base.js +47 -18
  57. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +16 -17
  58. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +47 -18
  59. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +12 -13
  60. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +47 -18
  61. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +21 -22
  62. package/dist/collection/utils/translation-utils.js.map +1 -1
  63. package/dist/components/index.js +1 -1
  64. package/dist/components/index2.js.map +1 -1
  65. package/dist/components/stzh-amount.js +40 -83
  66. package/dist/components/stzh-amount.js.map +1 -1
  67. package/dist/components/stzh-buttongroup.js +1 -31
  68. package/dist/components/stzh-buttongroup.js.map +1 -1
  69. package/dist/components/stzh-buttongroup2.js +35 -0
  70. package/dist/components/stzh-buttongroup2.js.map +1 -0
  71. package/dist/components/stzh-datepicker2.js.map +1 -1
  72. package/dist/components/stzh-dropdown2.js +61 -25
  73. package/dist/components/stzh-dropdown2.js.map +1 -1
  74. package/dist/components/stzh-monthyearpicker.d.ts +11 -0
  75. package/dist/components/stzh-monthyearpicker.js +251 -0
  76. package/dist/components/stzh-monthyearpicker.js.map +1 -0
  77. package/dist/components/stzh-pagetitle.js +1 -1
  78. package/dist/components/stzh-pagetitle.js.map +1 -1
  79. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  80. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  81. package/dist/components/stzh-timepicker.d.ts +11 -0
  82. package/dist/components/stzh-timepicker.js +132 -0
  83. package/dist/components/stzh-timepicker.js.map +1 -0
  84. package/dist/components/translation-utils.js.map +1 -1
  85. package/dist/esm/{app-globals-91875913.js → app-globals-bd1f456b.js} +2 -2
  86. package/dist/esm/{app-globals-91875913.js.map → app-globals-bd1f456b.js.map} +1 -1
  87. package/dist/esm/index.js.map +1 -1
  88. package/dist/esm/loader.js +2 -2
  89. package/dist/esm/stzh-amount.entry.js +30 -79
  90. package/dist/esm/stzh-amount.entry.js.map +1 -1
  91. package/dist/esm/stzh-components.js +2 -2
  92. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  93. package/dist/esm/stzh-dropdown.entry.js +60 -25
  94. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  95. package/dist/esm/stzh-monthyearpicker.entry.js +187 -0
  96. package/dist/esm/stzh-monthyearpicker.entry.js.map +1 -0
  97. package/dist/esm/stzh-pagetitle.entry.js +1 -1
  98. package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
  99. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  100. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  101. package/dist/esm/stzh-timepicker.entry.js +78 -0
  102. package/dist/esm/stzh-timepicker.entry.js.map +1 -0
  103. package/dist/esm/translation-utils-2623783f.js.map +1 -1
  104. package/dist/esm-es5/{app-globals-91875913.js → app-globals-bd1f456b.js} +2 -2
  105. package/dist/esm-es5/{app-globals-91875913.js.map → app-globals-bd1f456b.js.map} +1 -1
  106. package/dist/esm-es5/index.js.map +1 -1
  107. package/dist/esm-es5/loader.js +1 -1
  108. package/dist/esm-es5/loader.js.map +1 -1
  109. package/dist/esm-es5/stzh-amount.entry.js +1 -1
  110. package/dist/esm-es5/stzh-amount.entry.js.map +1 -1
  111. package/dist/esm-es5/stzh-components.js +1 -1
  112. package/dist/esm-es5/stzh-components.js.map +1 -1
  113. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  114. package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
  115. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  116. package/dist/esm-es5/stzh-monthyearpicker.entry.js +2 -0
  117. package/dist/esm-es5/stzh-monthyearpicker.entry.js.map +1 -0
  118. package/dist/esm-es5/stzh-pagetitle.entry.js +1 -1
  119. package/dist/esm-es5/stzh-pagetitle.entry.js.map +1 -1
  120. package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js +1 -1
  121. package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  122. package/dist/esm-es5/stzh-timepicker.entry.js +2 -0
  123. package/dist/esm-es5/stzh-timepicker.entry.js.map +1 -0
  124. package/dist/esm-es5/translation-utils-2623783f.js.map +1 -1
  125. package/dist/stzh-components/assets/i18n/de.json +10 -7
  126. package/dist/stzh-components/assets/i18n/en.json +8 -5
  127. package/dist/stzh-components/index.esm.js.map +1 -1
  128. package/dist/stzh-components/p-14e782cb.entry.js +2 -0
  129. package/dist/stzh-components/{p-85504842.entry.js.map → p-14e782cb.entry.js.map} +1 -1
  130. package/dist/stzh-components/p-25a09313.js.map +1 -1
  131. package/dist/stzh-components/p-51f1714c.system.entry.js +2 -0
  132. package/dist/stzh-components/p-51f1714c.system.entry.js.map +1 -0
  133. package/dist/stzh-components/p-5aa96b49.system.entry.js +2 -0
  134. package/dist/stzh-components/p-5aa96b49.system.entry.js.map +1 -0
  135. package/dist/stzh-components/{p-1ef5420a.entry.js → p-6c219530.entry.js} +2 -2
  136. package/dist/stzh-components/p-6c219530.entry.js.map +1 -0
  137. package/dist/stzh-components/p-7b297848.system.entry.js +2 -0
  138. package/dist/stzh-components/p-7b297848.system.entry.js.map +1 -0
  139. package/dist/stzh-components/p-82e886d4.entry.js.map +1 -1
  140. package/dist/stzh-components/p-9f31cf7d.entry.js +2 -0
  141. package/dist/stzh-components/p-9f31cf7d.entry.js.map +1 -0
  142. package/dist/stzh-components/p-9fe69be8.system.entry.js +2 -0
  143. package/dist/stzh-components/{p-479a02fb.system.entry.js.map → p-9fe69be8.system.entry.js.map} +1 -1
  144. package/dist/stzh-components/{p-61b66e55.system.js → p-a1be7b8e.system.js} +2 -2
  145. package/dist/stzh-components/{p-61b66e55.system.js.map → p-a1be7b8e.system.js.map} +1 -1
  146. package/dist/stzh-components/p-a408bfba.system.js.map +1 -1
  147. package/dist/stzh-components/p-ad33db31.entry.js +2 -0
  148. package/dist/stzh-components/p-ad33db31.entry.js.map +1 -0
  149. package/dist/stzh-components/p-b5cda655.entry.js +2 -0
  150. package/dist/stzh-components/p-b5cda655.entry.js.map +1 -0
  151. package/dist/stzh-components/p-c0f971f2.entry.js +9 -0
  152. package/dist/stzh-components/p-c0f971f2.entry.js.map +1 -0
  153. package/dist/stzh-components/p-c901fe72.system.entry.js +9 -0
  154. package/dist/stzh-components/p-c901fe72.system.entry.js.map +1 -0
  155. package/dist/stzh-components/{p-362af013.js → p-cb675f5e.js} +2 -2
  156. package/dist/stzh-components/{p-362af013.js.map → p-cb675f5e.js.map} +1 -1
  157. package/dist/stzh-components/p-daf83e0b.system.js +2 -0
  158. package/dist/stzh-components/{p-3e10addb.system.js.map → p-daf83e0b.system.js.map} +1 -1
  159. package/dist/stzh-components/p-e8545386.system.entry.js +2 -0
  160. package/dist/stzh-components/p-e8545386.system.entry.js.map +1 -0
  161. package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
  162. package/dist/stzh-components/p-f2d74491.system.entry.js.map +1 -1
  163. package/dist/stzh-components/stzh-components.css +1 -1
  164. package/dist/stzh-components/stzh-components.esm.js +1 -1
  165. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  166. package/dist/stzh-components/stzh-components.js +1 -1
  167. package/dist/types/components/stzh-amount/stzh-amount.localization.d.ts +0 -2
  168. package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.d.ts +5 -0
  169. package/dist/types/components/stzh-timepicker/stzh-timepicker.localization.d.ts +2 -0
  170. package/dist/types/components.d.ts +428 -6
  171. package/dist/types/index.d.ts +14 -0
  172. package/dist/types/utils/translation-utils.d.ts +1 -0
  173. package/dist/vscode-data.json +263 -1
  174. package/package.json +1 -1
  175. package/dist/stzh-components/p-1cc48f98.entry.js +0 -9
  176. package/dist/stzh-components/p-1cc48f98.entry.js.map +0 -1
  177. package/dist/stzh-components/p-1ef5420a.entry.js.map +0 -1
  178. package/dist/stzh-components/p-3e10addb.system.js +0 -2
  179. package/dist/stzh-components/p-479a02fb.system.entry.js +0 -2
  180. package/dist/stzh-components/p-67b11b03.system.entry.js +0 -2
  181. package/dist/stzh-components/p-67b11b03.system.entry.js.map +0 -1
  182. package/dist/stzh-components/p-6bb83b30.system.entry.js +0 -9
  183. package/dist/stzh-components/p-6bb83b30.system.entry.js.map +0 -1
  184. package/dist/stzh-components/p-7605ae9a.system.entry.js +0 -2
  185. package/dist/stzh-components/p-7605ae9a.system.entry.js.map +0 -1
  186. package/dist/stzh-components/p-85504842.entry.js +0 -2
  187. package/dist/stzh-components/p-c94f7331.entry.js +0 -2
  188. package/dist/stzh-components/p-c94f7331.entry.js.map +0 -1
@@ -0,0 +1,191 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-bf651831.js');
6
+ const translationUtils = require('./translation-utils-73073e44.js');
7
+
8
+ const stzhMonthyearpickerCss = ".sc-stzh-monthyearpicker-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-monthyearpicker-h{display:none}.sc-stzh-monthyearpicker-h *.sc-stzh-monthyearpicker,.sc-stzh-monthyearpicker-h *.sc-stzh-monthyearpicker::before,.sc-stzh-monthyearpicker-h *.sc-stzh-monthyearpicker::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-monthyearpicker-h{width:100%;--separator-height:var(--stzh-form-input-height)}[size=small].sc-stzh-monthyearpicker-h{--separator-height:var(--stzh-form-input-small-height)}.stzh-monthyearpicker__wrapper.sc-stzh-monthyearpicker{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-monthyearpicker__separator.sc-stzh-monthyearpicker{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);margin-left:var(--stzh-space-medium);margin-right:var(--stzh-space-medium);height:var(--separator-height);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
9
+
10
+ const StzhMonthyearpicker = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.stzhChange = index.createEvent(this, "stzhChange", 7);
14
+ this.onRootFocus = () => {
15
+ if (this.monthsDropdown) {
16
+ this.monthsDropdown.setFocus();
17
+ }
18
+ };
19
+ this.onMonthsDropdownChange = (event) => {
20
+ const year = this.value.split("-")[0] || "0000";
21
+ const month = event.detail.value || "00";
22
+ this.onChange(year, month);
23
+ };
24
+ this.onYearsDropdownChange = (event) => {
25
+ const year = event.detail.value || "0000";
26
+ const month = this.value.split("-")[1] || "00";
27
+ this.onChange(year, month);
28
+ };
29
+ this.months = undefined;
30
+ this.years = undefined;
31
+ this.min = undefined;
32
+ this.max = undefined;
33
+ this.minYear = undefined;
34
+ this.maxYear = undefined;
35
+ this.format = "default";
36
+ this.name = "";
37
+ this.value = "0000-00";
38
+ this.popoverPlacement = "bottom";
39
+ this.monthLabel = "";
40
+ this.yearLabel = "";
41
+ this.readonly = false;
42
+ this.disabled = false;
43
+ this.required = false;
44
+ this.showMarker = false;
45
+ this.size = "default";
46
+ this.descriptionMonth = undefined;
47
+ this.descriptionYear = undefined;
48
+ this.descriptionLongMonth = undefined;
49
+ this.descriptionLongYear = undefined;
50
+ this.errorMonth = undefined;
51
+ this.errorYear = undefined;
52
+ this.invalidMonth = false;
53
+ this.invalidYear = false;
54
+ this.a11yDescribedbyMonth = "";
55
+ this.a11yDescribedbyYear = "";
56
+ this.localization = undefined;
57
+ }
58
+ monthsWatcher(newValue) {
59
+ if (typeof newValue === "string") {
60
+ this._months = JSON.parse(newValue);
61
+ }
62
+ else {
63
+ this._months = newValue;
64
+ }
65
+ this.updateMonthOptions();
66
+ }
67
+ yearsWatcher(newValue) {
68
+ if (typeof newValue === "string") {
69
+ this._years = JSON.parse(newValue);
70
+ }
71
+ else {
72
+ this._years = newValue;
73
+ }
74
+ this.updateYearOptions();
75
+ }
76
+ minMaxWatcher() {
77
+ this.updateMonthOptions();
78
+ this.updateYearOptions();
79
+ }
80
+ onChange(year, month) {
81
+ this.value = `${year}-${month}`;
82
+ this.stzhChange.emit({
83
+ component: "stzh-monthyearpicker",
84
+ value: this.value,
85
+ valueMonth: month,
86
+ valueYear: year
87
+ });
88
+ }
89
+ updateMonthOptions() {
90
+ const options = [];
91
+ let months = [];
92
+ if (this._months) {
93
+ months = this._months;
94
+ }
95
+ else {
96
+ const currentYear = Number(this.value.split("-")[0] || "0000");
97
+ let minMonth = 1;
98
+ let maxMonth = 12;
99
+ if (this.min) {
100
+ const minDate = new Date(this.min);
101
+ if (currentYear === minDate.getFullYear()) {
102
+ minMonth = minDate.getMonth() + 1;
103
+ }
104
+ }
105
+ if (this.max) {
106
+ const maxDate = new Date(this.max);
107
+ if (currentYear === maxDate.getFullYear()) {
108
+ maxMonth = maxDate.getMonth() + 1;
109
+ }
110
+ }
111
+ for (let i = minMonth; i <= maxMonth; i++) {
112
+ months.push(i);
113
+ }
114
+ }
115
+ months.forEach((month) => {
116
+ const paddedMonth = ("00" + month).slice(-2);
117
+ const monthName = this.localization.$globals.monthNames[month - 1];
118
+ options.push({
119
+ text: this.format === "creditcard"
120
+ ? `${paddedMonth} (${monthName})`
121
+ : monthName,
122
+ value: paddedMonth
123
+ });
124
+ });
125
+ this.dropdownMonthOptions = options;
126
+ }
127
+ updateYearOptions() {
128
+ const options = [];
129
+ let years = [];
130
+ if (this._years) {
131
+ years = this._years;
132
+ }
133
+ else {
134
+ const currentMonth = Number(this.value.split("-")[1] || "00");
135
+ const yearNow = new Date().getFullYear();
136
+ let minYear = this.minYear || (yearNow - 10);
137
+ let maxYear = this.maxYear || (yearNow + 10);
138
+ if (this.min) {
139
+ const minDate = new Date(this.min);
140
+ if (currentMonth && currentMonth < minDate.getMonth() + 1) {
141
+ minYear = minDate.getFullYear() + 1;
142
+ }
143
+ else {
144
+ minYear = minDate.getFullYear();
145
+ }
146
+ }
147
+ if (this.max) {
148
+ const maxDate = new Date(this.max);
149
+ if (currentMonth && currentMonth > maxDate.getMonth() + 1) {
150
+ maxYear = maxDate.getFullYear() - 1;
151
+ }
152
+ else {
153
+ maxYear = maxDate.getFullYear();
154
+ }
155
+ }
156
+ for (let i = minYear; i <= maxYear; i++) {
157
+ years.push(i);
158
+ }
159
+ }
160
+ years.forEach((year) => {
161
+ options.push({ text: year, value: year });
162
+ });
163
+ this.dropdownYearOptions = options;
164
+ }
165
+ async componentWillLoad() {
166
+ if (!this.localization) {
167
+ this.localization = await translationUtils.fetchTranslations(this.element, "monthyearpicker");
168
+ }
169
+ this.monthsWatcher(this.months);
170
+ this.yearsWatcher(this.years);
171
+ }
172
+ render() {
173
+ const classes = {
174
+ "stzh-monthyearpicker": true
175
+ };
176
+ return (index.h(index.Host, { tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, index.h("div", { class: classes }, index.h("input", { type: "hidden", name: this.name, value: this.value }), index.h("div", { class: "stzh-monthyearpicker__wrapper" }, index.h("stzh-dropdown", { name: `${this.name}-month`, class: "stzh-monthyearpicker__months-dropdown", label: this.monthLabel || this.localization.monthLabel, ref: (el) => (this.monthsDropdown = el), onStzhChange: this.onMonthsDropdownChange, options: this.dropdownMonthOptions, items: [this.value.split("-")[1]], required: this.required, disabled: this.disabled, size: this.size, showMarker: this.showMarker, popoverPlacement: this.popoverPlacement, description: this.descriptionMonth, descriptionLong: this.descriptionLongMonth, error: this.errorMonth, a11yDescribedby: this.a11yDescribedbyMonth, invalid: this.invalidMonth }), index.h("div", { class: "stzh-monthyearpicker__separator" }, "/"), index.h("stzh-dropdown", { name: `${this.name}-year`, class: "stzh-monthyearpicker__years-dropdown", label: this.yearLabel || this.localization.yearLabel, onStzhChange: this.onYearsDropdownChange, options: this.dropdownYearOptions, items: [this.value.split("-")[0]], required: this.required, disabled: this.disabled, size: this.size, showMarker: this.showMarker, popoverPlacement: this.popoverPlacement, description: this.descriptionYear, descriptionLong: this.descriptionLongYear, error: this.errorYear, a11yDescribedby: this.a11yDescribedbyYear, invalid: this.invalidYear })))));
177
+ }
178
+ get element() { return index.getElement(this); }
179
+ static get watchers() { return {
180
+ "months": ["monthsWatcher"],
181
+ "years": ["yearsWatcher"],
182
+ "value": ["minMaxWatcher"],
183
+ "min": ["minMaxWatcher"],
184
+ "max": ["minMaxWatcher"]
185
+ }; }
186
+ };
187
+ StzhMonthyearpicker.style = stzhMonthyearpickerCss;
188
+
189
+ exports.stzh_monthyearpicker = StzhMonthyearpicker;
190
+
191
+ //# sourceMappingURL=stzh-monthyearpicker.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"stzh-monthyearpicker.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,sBAAsB,GAAG,2zCAA2zC;;MC2B70C,mBAAmB;;;;IA0ItB,gBAAW,GAAG;MACpB,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;OAChC;KACF,CAAA;IAEO,2BAAsB,GAAG,CAAC,KAA2C;MAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;MAChD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC;MACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC5B,CAAA;IAEO,0BAAqB,GAAG,CAAC,KAA2C;MAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM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,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,WAAW,EAAE,IAAI,CAAC,eAAe,EACjC,eAAe,EAAE,IAAI,CAAC,mBAAmB,EACzC,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,eAAe,EAAE,IAAI,CAAC,mBAAmB,EACzC,OAAO,EAAE,IAAI,CAAC,WAAW,GACV,CACb,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;","names":["fetchTranslations","h","Host"],"sources":["./src/components/stzh-monthyearpicker/stzh-monthyearpicker.scss?tag=stzh-monthyearpicker&encapsulation=scoped","./src/components/stzh-monthyearpicker/stzh-monthyearpicker.tsx"],"sourcesContent":[":host {\n width: 100%;\n --separator-height: #{$formInputHeight};\n\n &[size=\"small\"] {\n --separator-height: #{$formInputHeightSmall};\n }\n}\n\n.stzh-monthyearpicker {\n &__wrapper {\n display: flex;\n align-items: flex-start;\n }\n\n &__separator {\n @include fontSize('milli');\n margin-left: space('medium');\n margin-right: space('medium');\n height: var(--separator-height);\n display: flex;\n align-items: center;\n }\n}\n","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"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-bf651831.js');
6
6
  const utils = require('./utils-a2ff9f84.js');
7
7
 
8
- const stzhPagetitleCss = ".sc-stzh-pagetitle-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-pagetitle-h{display:none}.sc-stzh-pagetitle-h *.sc-stzh-pagetitle,.sc-stzh-pagetitle-h *.sc-stzh-pagetitle::before,.sc-stzh-pagetitle-h *.sc-stzh-pagetitle::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xxxlarge)}}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-xlarge)}}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xxxlarge)}}.stzh-pagetitle__actions.sc-stzh-pagetitle{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}";
8
+ const stzhPagetitleCss = ".sc-stzh-pagetitle-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-pagetitle-h{display:none}.sc-stzh-pagetitle-h *.sc-stzh-pagetitle,.sc-stzh-pagetitle-h *.sc-stzh-pagetitle::before,.sc-stzh-pagetitle-h *.sc-stzh-pagetitle::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=heading]{margin-bottom:var(--stzh-space-xxxlarge)}}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=image]{margin-top:var(--stzh-space-xlarge)}}.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.sc-stzh-pagetitle-h .sc-stzh-pagetitle-s>[slot=lead]{margin-top:var(--stzh-space-xxxlarge)}}.stzh-pagetitle__actions.sc-stzh-pagetitle{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.stzh-pagetitle__actions.sc-stzh-pagetitle:empty{display:none}";
9
9
 
10
10
  const StzhPagetitle = class {
11
11
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"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stzh-pagetitle&encapsulation=scoped","./src/components/stzh-pagetitle/stzh-pagetitle.tsx"],"sourcesContent":[":host {\n ::slotted([slot=\"heading\"]) {\n @include spaceCurve('margin-bottom', 'medium');\n }\n\n ::slotted([slot=\"image\"]) {\n @include spaceCurve('margin-top', 'regular');\n }\n\n ::slotted([slot=\"lead\"]) {\n @include spaceCurve('margin-top', 'medium');\n }\n\n // ::slotted([slot=\"meta\"]) {\n // margin: calc(#{space('xxsmall')} / 2);\n // }\n}\n\n.stzh-pagetitle {\n &__actions {\n display: flex;\n justify-content: space-between;\n }\n\n // &__meta {\n // display: flex;\n\n // &:not(:empty) {\n // margin: calc(#{space('xxsmall')} / -2);\n // margin-bottom: calc(#{space('xxsmall')} / -2 + #{space('xxsmall')});\n // }\n // }\n}\n","import {\n Component,\n Host,\n h,\n Element\n} from \"@stencil/core\";\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot heading - Slot for `stzh-heading` element\n * @slot image - Slot for `stzh-figure` or `img` element\n * @slot lead - Slot for `stzh-text` element\n * @slot action-left - Slot e.g. for `stzh-readspeaker` or `stzh-link` element\n * @slot action-right - Slot e.g. for `stzh-readspeaker` or `stzh-link` element\n */\n@Component({\n tag: \"stzh-pagetitle\",\n styleUrl: \"stzh-pagetitle.scss\",\n scoped: true\n})\nexport class StzhPagetitle {\n @Element() element: HTMLStzhPagetitleElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const headings = this.element.querySelectorAll('stzh-heading[slot=\"heading\"], [slot=\"heading\"] stzh-heading');\n const leads = this.element.querySelectorAll('stzh-text[slot=\"lead\"], [slot=\"lead\"] stzh-text');\n const actions = this.element.querySelectorAll('stzh-link[slot=\"action-left\"], stzh-link[slot=\"action-right\"], [slot=\"action-left\"] stzh-link, [slot=\"action-right\"] stzh-link');\n const actionsRight = this.element.querySelectorAll('stzh-link[slot=\"action-right\"], [slot=\"action-right\"] stzh-link');\n // const chips = this.element.querySelectorAll(\n // 'stzh-chip[slot=\"meta\"], [slot=\"meta\"] stzh-chip'\n // );\n\n headings.forEach((heading) => {\n setPropsIfNull(heading, {\n withBorder: true\n } as HTMLStzhHeadingElement)\n });\n\n leads.forEach((lead) => {\n setPropsIfNull(lead, {\n lead: true\n } as HTMLStzhTextElement)\n });\n\n actionsRight.forEach((link) => {\n setPropsIfNull(link, {\n icon: \"web-link\"\n } as HTMLStzhLinkElement)\n });\n\n actions.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\"\n } as HTMLStzhLinkElement)\n });\n\n // chips.forEach((chip) => {\n // setPropsIfNull(chip, {\n // size: \"small\"\n // } as HTMLStzhChipElement)\n // });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const headingSlotUsed = hasSlot(this.element, 'heading');\n const imageSlotUsed = hasSlot(this.element, 'image');\n const leadSlotUsed = hasSlot(this.element, 'lead');\n const actionLeftSlotUsed = hasSlot(this.element, 'action-left');\n const actionRightSlotUsed = hasSlot(this.element, 'action-right');\n\n const classes = {\n \"stzh-pagetitle\": true,\n \"stzh-pagetitle--has-heading\": headingSlotUsed,\n \"stzh-pagetitle--has-image\": imageSlotUsed,\n \"stzh-pagetitle--has-lead\": leadSlotUsed,\n \"stzh-pagetitle--has-action\": actionLeftSlotUsed || actionRightSlotUsed,\n \"stzh-pagetitle--has-action-left\": actionLeftSlotUsed,\n \"stzh-pagetitle--has-action-right\": actionRightSlotUsed,\n };\n\n return (\n <Host>\n <div class={classes}>\n {/* <div class=\"stzh-pagetitle__meta\">\n <slot name=\"meta\"></slot>\n </div> */}\n\n <slot name=\"heading\"></slot>\n\n <div class=\"stzh-pagetitle__actions\">\n <slot name=\"action-left\"></slot>\n <slot name=\"action-right\"></slot>\n </div>\n\n <slot name=\"image\"></slot>\n <slot name=\"lead\"></slot>\n </div>\n </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zh-pagetitle/stzh-pagetitle.scss?tag=stzh-pagetitle&encapsulation=scoped","./src/components/stzh-pagetitle/stzh-pagetitle.tsx"],"sourcesContent":[":host {\n ::slotted([slot=\"heading\"]) {\n @include spaceCurve('margin-bottom', 'medium');\n }\n\n ::slotted([slot=\"image\"]) {\n @include spaceCurve('margin-top', 'regular');\n }\n\n ::slotted([slot=\"lead\"]) {\n @include spaceCurve('margin-top', 'medium');\n }\n\n // ::slotted([slot=\"meta\"]) {\n // margin: calc(#{space('xxsmall')} / 2);\n // }\n}\n\n.stzh-pagetitle {\n &__actions {\n display: flex;\n justify-content: space-between;\n\n &:empty {\n display: none;\n }\n }\n\n // &__meta {\n // display: flex;\n\n // &:not(:empty) {\n // margin: calc(#{space('xxsmall')} / -2);\n // margin-bottom: calc(#{space('xxsmall')} / -2 + #{space('xxsmall')});\n // }\n // }\n}\n","import {\n Component,\n Host,\n h,\n Element\n} from \"@stencil/core\";\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot heading - Slot for `stzh-heading` element\n * @slot image - Slot for `stzh-figure` or `img` element\n * @slot lead - Slot for `stzh-text` element\n * @slot action-left - Slot e.g. for `stzh-readspeaker` or `stzh-link` element\n * @slot action-right - Slot e.g. for `stzh-readspeaker` or `stzh-link` element\n */\n@Component({\n tag: \"stzh-pagetitle\",\n styleUrl: \"stzh-pagetitle.scss\",\n scoped: true\n})\nexport class StzhPagetitle {\n @Element() element: HTMLStzhPagetitleElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const headings = this.element.querySelectorAll('stzh-heading[slot=\"heading\"], [slot=\"heading\"] stzh-heading');\n const leads = this.element.querySelectorAll('stzh-text[slot=\"lead\"], [slot=\"lead\"] stzh-text');\n const actions = this.element.querySelectorAll('stzh-link[slot=\"action-left\"], stzh-link[slot=\"action-right\"], [slot=\"action-left\"] stzh-link, [slot=\"action-right\"] stzh-link');\n const actionsRight = this.element.querySelectorAll('stzh-link[slot=\"action-right\"], [slot=\"action-right\"] stzh-link');\n // const chips = this.element.querySelectorAll(\n // 'stzh-chip[slot=\"meta\"], [slot=\"meta\"] stzh-chip'\n // );\n\n headings.forEach((heading) => {\n setPropsIfNull(heading, {\n withBorder: true\n } as HTMLStzhHeadingElement)\n });\n\n leads.forEach((lead) => {\n setPropsIfNull(lead, {\n lead: true\n } as HTMLStzhTextElement)\n });\n\n actionsRight.forEach((link) => {\n setPropsIfNull(link, {\n icon: \"web-link\"\n } as HTMLStzhLinkElement)\n });\n\n actions.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\"\n } as HTMLStzhLinkElement)\n });\n\n // chips.forEach((chip) => {\n // setPropsIfNull(chip, {\n // size: \"small\"\n // } as HTMLStzhChipElement)\n // });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const headingSlotUsed = hasSlot(this.element, 'heading');\n const imageSlotUsed = hasSlot(this.element, 'image');\n const leadSlotUsed = hasSlot(this.element, 'lead');\n const actionLeftSlotUsed = hasSlot(this.element, 'action-left');\n const actionRightSlotUsed = hasSlot(this.element, 'action-right');\n\n const classes = {\n \"stzh-pagetitle\": true,\n \"stzh-pagetitle--has-heading\": headingSlotUsed,\n \"stzh-pagetitle--has-image\": imageSlotUsed,\n \"stzh-pagetitle--has-lead\": leadSlotUsed,\n \"stzh-pagetitle--has-action\": actionLeftSlotUsed || actionRightSlotUsed,\n \"stzh-pagetitle--has-action-left\": actionLeftSlotUsed,\n \"stzh-pagetitle--has-action-right\": actionRightSlotUsed,\n };\n\n return (\n <Host>\n <div class={classes}>\n {/* <div class=\"stzh-pagetitle__meta\">\n <slot name=\"meta\"></slot>\n </div> */}\n\n <slot name=\"heading\"></slot>\n\n <div class=\"stzh-pagetitle__actions\">\n <slot name=\"action-left\"></slot>\n <slot name=\"action-right\"></slot>\n </div>\n\n <slot name=\"image\"></slot>\n <slot name=\"lead\"></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}