@progressive-development/pd-calendar 0.6.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +21 -2
  2. package/README.md +32 -57
  3. package/dist/generated/locales/be.d.ts +7 -0
  4. package/dist/generated/locales/be.d.ts.map +1 -1
  5. package/dist/generated/locales/de.d.ts +7 -0
  6. package/dist/generated/locales/de.d.ts.map +1 -1
  7. package/dist/generated/locales/en.d.ts +7 -0
  8. package/dist/generated/locales/en.d.ts.map +1 -1
  9. package/dist/index.d.ts +12 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +23 -10
  12. package/dist/locales/be.js +10 -4
  13. package/dist/locales/de.js +10 -4
  14. package/dist/locales/en.js +10 -4
  15. package/dist/pd-calendar/PdCalendar.d.ts +133 -0
  16. package/dist/pd-calendar/PdCalendar.d.ts.map +1 -0
  17. package/dist/pd-calendar/PdCalendar.js +550 -0
  18. package/dist/pd-calendar/pd-calendar-cell/PdCalendarCell.d.ts +56 -0
  19. package/dist/pd-calendar/pd-calendar-cell/PdCalendarCell.d.ts.map +1 -0
  20. package/dist/pd-calendar/pd-calendar-cell/PdCalendarCell.js +337 -0
  21. package/dist/pd-calendar/pd-calendar-cell/pd-calendar-cell.d.ts +3 -0
  22. package/dist/pd-calendar/pd-calendar-cell/pd-calendar-cell.d.ts.map +1 -0
  23. package/dist/pd-calendar/pd-calendar-cell/pd-calendar-cell.js +8 -0
  24. package/dist/pd-calendar/pd-calendar-day-events-panel/PdCalendarDayEventsPanel.d.ts +27 -0
  25. package/dist/pd-calendar/pd-calendar-day-events-panel/PdCalendarDayEventsPanel.d.ts.map +1 -0
  26. package/dist/pd-calendar/pd-calendar-day-events-panel/PdCalendarDayEventsPanel.js +160 -0
  27. package/dist/pd-calendar/pd-calendar-day-events-panel/pd-calendar-day-events-panel.d.ts +3 -0
  28. package/dist/pd-calendar/pd-calendar-day-events-panel/pd-calendar-day-events-panel.d.ts.map +1 -0
  29. package/dist/pd-calendar/pd-calendar-day-events-panel/pd-calendar-day-events-panel.js +8 -0
  30. package/dist/pd-calendar/pd-calendar-event-cell/PdCalendarEventCell.d.ts +55 -0
  31. package/dist/pd-calendar/pd-calendar-event-cell/PdCalendarEventCell.d.ts.map +1 -0
  32. package/dist/pd-calendar/pd-calendar-event-cell/PdCalendarEventCell.js +341 -0
  33. package/dist/pd-calendar/pd-calendar-event-cell/pd-calendar-event-cell.d.ts +3 -0
  34. package/dist/pd-calendar/pd-calendar-event-cell/pd-calendar-event-cell.d.ts.map +1 -0
  35. package/dist/pd-calendar/pd-calendar-event-cell/pd-calendar-event-cell.js +8 -0
  36. package/dist/pd-calendar/pd-calendar-event-info-panel/PdCalendarEventInfoPanel.d.ts +29 -0
  37. package/dist/pd-calendar/pd-calendar-event-info-panel/PdCalendarEventInfoPanel.d.ts.map +1 -0
  38. package/dist/pd-calendar/pd-calendar-event-info-panel/PdCalendarEventInfoPanel.js +211 -0
  39. package/dist/pd-calendar/pd-calendar-event-info-panel/pd-calendar-event-info-panel.d.ts +3 -0
  40. package/dist/pd-calendar/pd-calendar-event-info-panel/pd-calendar-event-info-panel.d.ts.map +1 -0
  41. package/dist/pd-calendar/pd-calendar-event-info-panel/pd-calendar-event-info-panel.js +8 -0
  42. package/dist/pd-calendar/pd-calendar-list-cell/PdCalendarListCell.d.ts +28 -0
  43. package/dist/pd-calendar/pd-calendar-list-cell/PdCalendarListCell.d.ts.map +1 -0
  44. package/dist/pd-calendar/pd-calendar-list-cell/PdCalendarListCell.js +252 -0
  45. package/dist/pd-calendar/pd-calendar-list-cell/pd-calendar-list-cell.d.ts +3 -0
  46. package/dist/pd-calendar/pd-calendar-list-cell/pd-calendar-list-cell.d.ts.map +1 -0
  47. package/dist/pd-calendar/pd-calendar-list-cell/pd-calendar-list-cell.js +8 -0
  48. package/dist/pd-calendar/pd-calendar-list-view/PdCalendarListView.d.ts +26 -0
  49. package/dist/pd-calendar/pd-calendar-list-view/PdCalendarListView.d.ts.map +1 -0
  50. package/dist/pd-calendar/pd-calendar-list-view/PdCalendarListView.js +165 -0
  51. package/dist/pd-calendar/pd-calendar-list-view/pd-calendar-list-view.d.ts +3 -0
  52. package/dist/pd-calendar/pd-calendar-list-view/pd-calendar-list-view.d.ts.map +1 -0
  53. package/dist/pd-calendar/pd-calendar-list-view/pd-calendar-list-view.js +8 -0
  54. package/dist/pd-calendar/pd-calendar-month-view/PdCalendarMonthView.d.ts +55 -0
  55. package/dist/pd-calendar/pd-calendar-month-view/PdCalendarMonthView.d.ts.map +1 -0
  56. package/dist/pd-calendar/pd-calendar-month-view/PdCalendarMonthView.js +461 -0
  57. package/dist/pd-calendar/pd-calendar-month-view/pd-calendar-month-view.d.ts +3 -0
  58. package/dist/pd-calendar/pd-calendar-month-view/pd-calendar-month-view.d.ts.map +1 -0
  59. package/dist/pd-calendar/pd-calendar-month-view/pd-calendar-month-view.js +8 -0
  60. package/dist/pd-calendar/pd-calendar-time-grid-view/PdCalendarTimeGridView.d.ts +32 -0
  61. package/dist/pd-calendar/pd-calendar-time-grid-view/PdCalendarTimeGridView.d.ts.map +1 -0
  62. package/dist/pd-calendar/pd-calendar-time-grid-view/PdCalendarTimeGridView.js +468 -0
  63. package/dist/pd-calendar/pd-calendar-time-grid-view/pd-calendar-time-grid-view.d.ts +3 -0
  64. package/dist/pd-calendar/pd-calendar-time-grid-view/pd-calendar-time-grid-view.d.ts.map +1 -0
  65. package/dist/pd-calendar/pd-calendar-time-grid-view/pd-calendar-time-grid-view.js +8 -0
  66. package/dist/pd-calendar/pd-calendar-week-cell/PdCalendarWeekCell.d.ts +31 -0
  67. package/dist/pd-calendar/pd-calendar-week-cell/PdCalendarWeekCell.d.ts.map +1 -0
  68. package/dist/pd-calendar/pd-calendar-week-cell/PdCalendarWeekCell.js +134 -0
  69. package/dist/pd-calendar/pd-calendar-week-cell/pd-calendar-week-cell.d.ts +3 -0
  70. package/dist/pd-calendar/pd-calendar-week-cell/pd-calendar-week-cell.d.ts.map +1 -0
  71. package/dist/pd-calendar/pd-calendar-week-cell/pd-calendar-week-cell.js +8 -0
  72. package/dist/pd-calendar/pd-calendar.d.ts +3 -0
  73. package/dist/pd-calendar/pd-calendar.d.ts.map +1 -0
  74. package/dist/pd-calendar/pd-calendar.stories.d.ts +83 -0
  75. package/dist/pd-calendar/pd-calendar.stories.d.ts.map +1 -0
  76. package/dist/pd-calendar/pd-year-popup/PdYearPopup.d.ts +38 -0
  77. package/dist/pd-calendar/pd-year-popup/PdYearPopup.d.ts.map +1 -0
  78. package/dist/pd-calendar/pd-year-popup/PdYearPopup.js +249 -0
  79. package/dist/pd-calendar/pd-year-popup/pd-year-popup.d.ts +3 -0
  80. package/dist/pd-calendar/pd-year-popup/pd-year-popup.d.ts.map +1 -0
  81. package/dist/pd-calendar/pd-year-popup/pd-year-popup.js +8 -0
  82. package/dist/pd-calendar.d.ts +2 -48
  83. package/dist/pd-calendar.js +6 -437
  84. package/dist/pd-datepicker/PdDatepicker.d.ts +181 -0
  85. package/dist/pd-datepicker/PdDatepicker.d.ts.map +1 -0
  86. package/dist/pd-datepicker/PdDatepicker.js +701 -0
  87. package/dist/pd-datepicker/pd-date-picker.stories.d.ts +81 -0
  88. package/dist/pd-datepicker/pd-date-picker.stories.d.ts.map +1 -0
  89. package/dist/pd-datepicker/pd-datepicker.d.ts +3 -0
  90. package/dist/pd-datepicker/pd-datepicker.d.ts.map +1 -0
  91. package/dist/pd-datepicker.d.ts +2 -0
  92. package/dist/pd-datepicker.js +8 -0
  93. package/dist/pd-slot-picker/PdSlotPicker.d.ts +102 -0
  94. package/dist/pd-slot-picker/PdSlotPicker.d.ts.map +1 -0
  95. package/dist/pd-slot-picker/PdSlotPicker.js +339 -0
  96. package/dist/pd-slot-picker/pd-slot-cell/PdSlotCell.d.ts +35 -0
  97. package/dist/pd-slot-picker/pd-slot-cell/PdSlotCell.d.ts.map +1 -0
  98. package/dist/pd-slot-picker/pd-slot-cell/PdSlotCell.js +188 -0
  99. package/dist/pd-slot-picker/pd-slot-cell/pd-slot-cell.d.ts +3 -0
  100. package/dist/pd-slot-picker/pd-slot-cell/pd-slot-cell.d.ts.map +1 -0
  101. package/dist/pd-slot-picker/pd-slot-cell/pd-slot-cell.js +8 -0
  102. package/dist/pd-slot-picker/pd-slot-picker.d.ts +3 -0
  103. package/dist/pd-slot-picker/pd-slot-picker.d.ts.map +1 -0
  104. package/dist/pd-slot-picker/pd-slot-picker.stories.d.ts +67 -0
  105. package/dist/pd-slot-picker/pd-slot-picker.stories.d.ts.map +1 -0
  106. package/dist/pd-slot-picker.d.ts +2 -0
  107. package/dist/pd-slot-picker.js +8 -0
  108. package/dist/shared/PdBaseCell.d.ts +68 -0
  109. package/dist/shared/PdBaseCell.d.ts.map +1 -0
  110. package/dist/shared/PdBaseCell.js +120 -0
  111. package/dist/shared/PdBaseView.d.ts +22 -0
  112. package/dist/shared/PdBaseView.d.ts.map +1 -0
  113. package/dist/shared/PdBaseView.js +46 -0
  114. package/dist/shared/PdCalendarPanelBase.d.ts +34 -0
  115. package/dist/shared/PdCalendarPanelBase.d.ts.map +1 -0
  116. package/dist/shared/PdCalendarPanelBase.js +169 -0
  117. package/dist/shared/calendar-button-bar/calendar-button-bar.d.ts +41 -0
  118. package/dist/shared/calendar-button-bar/calendar-button-bar.d.ts.map +1 -0
  119. package/dist/shared/calendar-button-bar/calendar-button-bar.js +435 -0
  120. package/dist/shared/calendar-locales.d.ts +9 -0
  121. package/dist/shared/calendar-locales.d.ts.map +1 -0
  122. package/dist/shared/calendar-locales.js +30 -0
  123. package/dist/shared/calendar-utils.d.ts +34 -0
  124. package/dist/shared/calendar-utils.d.ts.map +1 -0
  125. package/dist/shared/calendar-utils.js +99 -0
  126. package/dist/shared/calendar-utils.test.d.ts +2 -0
  127. package/dist/shared/calendar-utils.test.d.ts.map +1 -0
  128. package/dist/types.d.ts +102 -1
  129. package/dist/types.d.ts.map +1 -1
  130. package/package.json +35 -47
  131. package/dist/pd-calendar-cell.d.ts +0 -47
  132. package/dist/pd-calendar-cell.d.ts.map +0 -1
  133. package/dist/pd-calendar-cell.js +0 -282
  134. package/dist/pd-calendar.d.ts.map +0 -1
  135. package/dist/pd-year-popup.d.ts +0 -25
  136. package/dist/pd-year-popup.d.ts.map +0 -1
  137. package/dist/pd-year-popup.js +0 -136
  138. package/dist/stories/cell.stories.d.ts +0 -15
  139. package/dist/stories/cell.stories.d.ts.map +0 -1
  140. package/dist/stories/index.stories.d.ts +0 -23
  141. package/dist/stories/index.stories.d.ts.map +0 -1
@@ -1,282 +0,0 @@
1
- import { css, LitElement, html } from "lit";
2
- import { property, customElement } from "lit/decorators.js";
3
- import { parse } from "fecha";
4
- import { PdColorStyles, PdFontStyles } from "@progressive-development/pd-shared-styles";
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __decorateClass = (decorators, target, key, kind) => {
8
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
- if (decorator = decorators[i])
11
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
- if (kind && result) __defProp(target, key, result);
13
- return result;
14
- };
15
- let PdCalendarCell = class extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- this.selectEnabled = false;
19
- this.today = false;
20
- this.selected = false;
21
- this.special = false;
22
- this.infoTxt = "";
23
- this.numberClass = "top-left";
24
- this.key = "";
25
- this.weekDayNumber = -1;
26
- this.dayNumber = -1;
27
- }
28
- render() {
29
- return this.selectEnabled ? this._renderSelectableCell() : this._renderEmptyCell();
30
- }
31
- _renderSelectableCell() {
32
- const baseClasses = [
33
- "cell",
34
- "cell-day",
35
- this.numberClass,
36
- this.special ? "special" : "free",
37
- (this.weekDayNumber === 6 || this.weekDayNumber === 0) && !this.special ? "we" : ""
38
- ].join(" ");
39
- return html`
40
- <div
41
- @click=${this._selectableCellClicked}
42
- @mouseenter=${this._mouseEnter}
43
- @mouseleave=${this._mouseLeave}
44
- class="${baseClasses}"
45
- data-date=${this.key}
46
- >
47
- ${this.infoTxt ? html`<div class="cell-info">${this.infoTxt}</div>` : ""}
48
- ${this.today ? html`<div class="number-ring today"></div>` : ""}
49
- ${this.selected ? html`<div class="number-ring selected"></div>` : ""}
50
- <div class="cell-number ${this.numberClass}">${this.dayNumber}</div>
51
- </div>
52
- `;
53
- }
54
- _renderEmptyCell() {
55
- const baseClasses = [
56
- "cell",
57
- "cell-day",
58
- this.numberClass,
59
- (this.weekDayNumber === 6 || this.weekDayNumber === 0) && !this.special ? "we" : ""
60
- ].join(" ");
61
- return html`
62
- <div class="${baseClasses}">
63
- ${this.infoTxt ? html`<div class="cell-info">${this.infoTxt}</div>` : ""}
64
- <div class="cell-number ${this.numberClass}">${this.dayNumber}</div>
65
- </div>
66
- `;
67
- }
68
- _selectableCellClicked(e) {
69
- const target = e.currentTarget;
70
- const dateKey = target.dataset.date;
71
- if (dateKey) {
72
- const userSelectedDate = parse(dateKey, "YYYY-MM-DD");
73
- this.dispatchEvent(
74
- new CustomEvent("select-date", {
75
- detail: { dateKey, date: userSelectedDate },
76
- bubbles: true,
77
- composed: true
78
- })
79
- );
80
- }
81
- }
82
- _mouseEnter() {
83
- const userSelectedDate = parse(this.key, "YYYY-MM-DD");
84
- this.dispatchEvent(
85
- new CustomEvent("mouse-enter-date", {
86
- detail: { dateKey: this.key, date: userSelectedDate },
87
- bubbles: true,
88
- composed: true
89
- })
90
- );
91
- }
92
- _mouseLeave() {
93
- this.dispatchEvent(
94
- new CustomEvent("mouse-leave-date", {
95
- bubbles: true,
96
- composed: true
97
- })
98
- );
99
- }
100
- };
101
- PdCalendarCell.styles = [
102
- PdColorStyles,
103
- PdFontStyles,
104
- css`
105
- :host {
106
- display: block;
107
- }
108
-
109
- .cell {
110
- width: 100%;
111
- height: 100%;
112
- min-height: 30px;
113
- }
114
-
115
- .cell-empty {
116
- background-color: var(
117
- --pd-calendar-cell-empty-bg-col,
118
- var(--pd-default-bg)
119
- );
120
- }
121
-
122
- .cell-day {
123
- position: relative;
124
- /*background-image: linear-gradient(to right, rgb(51, 101, 138) , rgb(38, 76, 104)); */
125
- /*box-shadow: 2px 2px 3px;*/
126
- background-color: var(
127
- --pd-calendar-cell-day-bg-col,
128
- var(--pd-default-light-col)
129
- );
130
- /*border-radius: 2px 2px 2px 2px;*/
131
- }
132
-
133
- .cell-day.we {
134
- background-color: var(
135
- --pd-calendar-cell-day-we-bg-col,
136
- var(--pd-default-disabled-light-col)
137
- );
138
- }
139
-
140
- .free {
141
- /*background-image: linear-gradient(to right, green, darkgreen);
142
- background-color: var(--my-info-cell-bg1-color);*/
143
- background-color: var(
144
- --pd-calendar-cell-day-free-bg-col,
145
- var(--pd-default-col)
146
- );
147
- /*background-image: linear-gradient(to right, var(--my-info-cell-bg1-color), var(--my-info-cell-bg2-color));*/
148
- box-shadow: var(--pd-calendar-cell-selectable-shadow, 1px 2px 2px);
149
- }
150
-
151
- .special {
152
- /*background-image: linear-gradient(to right, green, darkgreen);
153
- background-color: var(--my-info-cell-bg1-color);*/
154
- background-color: var(
155
- --pd-calendar-cell-day-special-bg-col,
156
- var(--pd-default-success-col)
157
- );
158
- /*background-image: linear-gradient(to right, var(--my-info-cell-bg1-color), var(--my-info-cell-bg2-color));*/
159
- box-shadow: var(--pd-calendar-cell-selectable-shadow, 1px 2px 2px);
160
- }
161
-
162
- .special:hover,
163
- .free:hover {
164
- background-color: var(
165
- --pd-calendar-cell-day-bg-col-hover,
166
- var(--pd-default-hover-col)
167
- );
168
- /*background-image: linear-gradient(to right, var(--my-info-cell-bg1-hover), var(--my-info-cell-bg2-hover));*/
169
- cursor: pointer;
170
- }
171
-
172
- .cell-info {
173
- display: flex;
174
- align-items: center;
175
- justify-content: center;
176
- height: 100%;
177
- color: var(--pd-calendar-cell-day-info-col, var(--pd-default-bg-col));
178
- font-family: var(--pd-default-font-title-family);
179
- font-weight: bold;
180
- font-size: var(--pd-calendar-info-font-size, 1.5em);
181
- text-shadow: 1px 1px var(--pd-default-dark-col);
182
- pointer-events: none;
183
- }
184
-
185
- .cell-number {
186
- pointer-events: none;
187
- font-size: var(--pd-calendar-number-font-size, 1em);
188
- font-weight: bold;
189
- color: var(--pd-calendar-cell-day-info-col, var(--pd-default-bg-col));
190
- font-family: var(--pd-default-font-content-family);
191
- }
192
-
193
- .cell-number.top-left {
194
- position: absolute;
195
- left: 3px;
196
- top: 2px;
197
- }
198
-
199
- /* Noch umstellen, passt nicht für alle größen (die anderen auf flex/center umgestellt) */
200
- .center {
201
- display: flex;
202
- align-items: center;
203
- justify-content: center;
204
- }
205
-
206
- .free .cell-number,
207
- .special .cell-number {
208
- color: var(
209
- --pd-calendar-cell-day-info-free-col,
210
- var(--pd-default-bg-col)
211
- );
212
- }
213
-
214
- .number-ring {
215
- position: absolute;
216
- height: 28px;
217
- width: 28px;
218
- border-radius: 50%;
219
- display: inline-block;
220
- }
221
-
222
- .today {
223
- border: 2px solid blue;
224
- pointer-events: none;
225
- }
226
-
227
- .selected {
228
- border: 2px solid red;
229
- }
230
-
231
- /* ToDo: Dont work for calendars sized by custom properties. Needed to calculate from calendar size
232
- not from window size, this is a topic for container queries, which are not available right now... */
233
- @media (max-width: 800px) {
234
- .cell-info {
235
- font-size: 1.3em;
236
- }
237
- .cell-number {
238
- font-size: 0.8em;
239
- }
240
- }
241
-
242
- @media (max-width: 500px) {
243
- .cell-info {
244
- font-weight: normal;
245
- font-size: 1em;
246
- }
247
- }
248
- `
249
- ];
250
- __decorateClass([
251
- property({ type: Boolean })
252
- ], PdCalendarCell.prototype, "selectEnabled", 2);
253
- __decorateClass([
254
- property({ type: Boolean })
255
- ], PdCalendarCell.prototype, "today", 2);
256
- __decorateClass([
257
- property({ type: Boolean })
258
- ], PdCalendarCell.prototype, "selected", 2);
259
- __decorateClass([
260
- property({ type: Boolean })
261
- ], PdCalendarCell.prototype, "special", 2);
262
- __decorateClass([
263
- property({ type: String })
264
- ], PdCalendarCell.prototype, "infoTxt", 2);
265
- __decorateClass([
266
- property({ type: String })
267
- ], PdCalendarCell.prototype, "numberClass", 2);
268
- __decorateClass([
269
- property({ type: String })
270
- ], PdCalendarCell.prototype, "key", 2);
271
- __decorateClass([
272
- property({ type: Number })
273
- ], PdCalendarCell.prototype, "weekDayNumber", 2);
274
- __decorateClass([
275
- property({ type: Number })
276
- ], PdCalendarCell.prototype, "dayNumber", 2);
277
- PdCalendarCell = __decorateClass([
278
- customElement("pd-calendar-cell")
279
- ], PdCalendarCell);
280
- export {
281
- PdCalendarCell
282
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"pd-calendar.d.ts","sourceRoot":"","sources":["../src/pd-calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK5E,OAAO,0CAA0C,CAAC;AASlD,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAqD1C;;;;;;;GAOG;AACH,qBAEa,UAAW,SAAQ,UAAU;IAExC,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,eAAe,UAAS;IAGxB,aAAa,EAAE,MAAM,EAAE,CAAM;IAG7B,mBAAmB,UAAS;IAG5B,mBAAmB,UAAS;IAG5B,aAAa,UAAS;IAGtB,WAAW,UAAS;IAGpB,mBAAmB,SAAM;IAGzB,mBAAmB,SAAM;IAGzB,IAAI,EAAE,YAAY,CAAM;IAGxB,WAAW,SAAc;IAGzB,OAAO,CAAC,SAAS,CAAc;IAG/B,OAAO,CAAC,YAAY,CAAc;IAGlC,OAAO,CAAC,WAAW,CAAK;IAExB,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,sBAAsB,CAAc;IAC5C,OAAO,CAAC,kBAAkB,CAAK;IAE/B,OAAgB,MAAM,EAAE,cAAc,CAsHpC;IAEO,iBAAiB,IAAI,IAAI;IAKzB,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAOrD,MAAM;IAOf,OAAO,CAAC,mBAAmB;IA6E3B,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAUpC,OAAO,CAAC,yBAAyB;IAOjC,OAAO,CAAC,yBAAyB;CAOlC"}
@@ -1,25 +0,0 @@
1
- import { LitElement, CSSResultGroup } from 'lit';
2
- /**
3
- * Web Component zur Anzeige eines Jahresauswahl-Popups.
4
- *
5
- * Wird typischerweise als Dropdown unterhalb eines Buttons eingeblendet und
6
- * zeigt eine Liste von auswählbaren Jahren an.
7
- *
8
- * @fires change-year-selection – wenn ein Jahr ausgewählt wurde
9
- * @fires abort-year-selection – wenn außerhalb geklickt wird / keine Auswahl
10
- */
11
- export declare class PdYearPopup extends LitElement {
12
- /**
13
- * Liste der auswählbaren Jahre.
14
- */
15
- yearSelection: string[];
16
- /**
17
- * Aktuell ausgewähltes Jahr.
18
- */
19
- currentYear: string;
20
- static styles: CSSResultGroup;
21
- render(): import('lit-html').TemplateResult<1>;
22
- private _yearSelection;
23
- private _closeSelection;
24
- }
25
- //# sourceMappingURL=pd-year-popup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pd-year-popup.d.ts","sourceRoot":"","sources":["../src/pd-year-popup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAQ5D;;;;;;;;GAQG;AACH,qBACa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,aAAa,EAAE,MAAM,EAAE,CAAM;IAE7B;;OAEG;IAEH,WAAW,SAAM;IAEjB,OAAgB,MAAM,EAAE,cAAc,CA+DpC;IAEO,MAAM;IAkBf,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,eAAe;CAQxB"}
@@ -1,136 +0,0 @@
1
- import { css, LitElement, html } from "lit";
2
- import { property, customElement } from "lit/decorators.js";
3
- import { PdColorStyles, PdFontStyles } from "@progressive-development/pd-shared-styles";
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __decorateClass = (decorators, target, key, kind) => {
7
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
- if (decorator = decorators[i])
10
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11
- if (kind && result) __defProp(target, key, result);
12
- return result;
13
- };
14
- let PdYearPopup = class extends LitElement {
15
- constructor() {
16
- super(...arguments);
17
- this.yearSelection = [];
18
- this.currentYear = "";
19
- }
20
- render() {
21
- return html`
22
- <ul>
23
- ${this.yearSelection.map(
24
- (year) => html`
25
- <li
26
- class="${this.currentYear === year ? "current" : "selectable"}"
27
- data-year="${year}"
28
- @click=${this._yearSelection}
29
- >
30
- ${year}
31
- </li>
32
- `
33
- )}
34
- </ul>
35
- `;
36
- }
37
- _yearSelection(event) {
38
- const target = event.currentTarget;
39
- const year = target.dataset.year;
40
- if (year) {
41
- this.dispatchEvent(
42
- new CustomEvent("change-year-selection", {
43
- detail: { year },
44
- bubbles: true,
45
- composed: true
46
- })
47
- );
48
- } else {
49
- this._closeSelection();
50
- }
51
- }
52
- _closeSelection() {
53
- this.dispatchEvent(
54
- new CustomEvent("abort-year-selection", {
55
- bubbles: true,
56
- composed: true
57
- })
58
- );
59
- }
60
- };
61
- PdYearPopup.styles = [
62
- PdColorStyles,
63
- PdFontStyles,
64
- css`
65
- :host {
66
- position: absolute;
67
- z-index: 10;
68
- top: 25px;
69
- right: 0;
70
- }
71
-
72
- ul {
73
- list-style: none;
74
- max-height: 250px;
75
- overflow-y: auto;
76
-
77
- margin: 0;
78
- padding: 4px 0;
79
- width: 90px;
80
- background: var(--pd-default-light-col, #ffffff);
81
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
82
- border-radius: 8px;
83
- border: 1px solid var(--pd-default-border-col, #ddd);
84
-
85
- display: flex;
86
- flex-direction: column;
87
-
88
- scrollbar-width: thin;
89
- }
90
-
91
- ul::-webkit-scrollbar {
92
- width: 6px;
93
- }
94
-
95
- ul::-webkit-scrollbar-thumb {
96
- background-color: rgba(0, 0, 0, 0.2);
97
- border-radius: 3px;
98
- }
99
-
100
- li {
101
- text-align: center;
102
- padding: 8px 0;
103
- margin: 0 4px;
104
- font-size: 14px;
105
- border-radius: 4px;
106
- color: var(--pd-default-dark-col, #333);
107
- transition:
108
- background-color 0.2s ease,
109
- color 0.2s ease;
110
- }
111
-
112
- li.selectable:hover {
113
- background-color: var(--pd-default-hover-bg, #f0f0f0);
114
- color: var(--pd-default-hover-col, #000);
115
- cursor: pointer;
116
- }
117
-
118
- li.current {
119
- background-color: var(--pd-default-primary-col, #007acc);
120
- color: white;
121
- font-weight: bold;
122
- }
123
- `
124
- ];
125
- __decorateClass([
126
- property({ type: Array })
127
- ], PdYearPopup.prototype, "yearSelection", 2);
128
- __decorateClass([
129
- property({ type: String })
130
- ], PdYearPopup.prototype, "currentYear", 2);
131
- PdYearPopup = __decorateClass([
132
- customElement("pd-year-popup")
133
- ], PdYearPopup);
134
- export {
135
- PdYearPopup
136
- };
@@ -1,15 +0,0 @@
1
- import { StoryObj } from '@storybook/web-components';
2
- declare const meta: {
3
- title: string;
4
- render: ({ infoTxt }: import('@storybook/web-components').Args) => import('lit-html').TemplateResult<1>;
5
- argTypes: {};
6
- parameters: {
7
- actions: {
8
- argTypesRegex: string;
9
- };
10
- };
11
- };
12
- export default meta;
13
- type Story = StoryObj;
14
- export declare const BasicCell: Story;
15
- //# sourceMappingURL=cell.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell.stories.d.ts","sourceRoot":"","sources":["../../src/stories/cell.stories.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,wBAAwB,CAAC;AAGhC,QAAA,MAAM,IAAI;;;;;;;;;CAuCM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC"}
@@ -1,23 +0,0 @@
1
- import { StoryObj } from '@storybook/web-components';
2
- declare const meta: {
3
- title: string;
4
- render: ({ hideWeekend, refDate, data, prevMonthConstraint, nextMonthConstraint, addSlot, }: import('@storybook/web-components').Args) => import('lit-html').TemplateResult<1>;
5
- argTypes: {};
6
- parameters: {
7
- actions: {
8
- argTypesRegex: string;
9
- };
10
- };
11
- };
12
- export default meta;
13
- type Story = StoryObj;
14
- export declare const Basic: Story;
15
- export declare const WithInfoAndConstraints: Story;
16
- export declare const WithSpecialDays: Story;
17
- export declare const WithSpecialDaysHideWeekend: Story;
18
- export declare const WithSpecificDateAndConstraints: Story;
19
- export declare const BasicSmall: Story;
20
- export declare const BasicSmallHugeYearSelection: Story;
21
- export declare const BasicSmallWithRefDate: Story;
22
- export declare const BasicSmallWithoutWeekend: Story;
23
- //# sourceMappingURL=index.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../src/stories/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAIhE,OAAO,mBAAmB,CAAC;AAG3B,QAAA,MAAM,IAAI;;;;;;;;;CAwBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AActB,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAUF,eAAO,MAAM,sBAAsB,EAAE,KAOpC,CAAC;AAiBF,eAAO,MAAM,eAAe,EAAE,KAO7B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,KAQxC,CAAC;AAIF,eAAO,MAAM,8BAA8B,EAAE,KAM5C,CAAC;AA2CF,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAC;AAOF,eAAO,MAAM,2BAA2B,EAAE,KA2BzC,CAAC;AAIF,eAAO,MAAM,qBAAqB,EAAE,KA+BnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KA0BtC,CAAC"}