@semantic-components/ui 0.0.1 → 0.0.10

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 (48) hide show
  1. package/README.md +6 -0
  2. package/components/date-picker/date-picker.component.d.ts +30 -2
  3. package/components/date-picker/index.d.ts +1 -0
  4. package/components/date-picker/inline-date-picker.component.d.ts +23 -0
  5. package/components/date-picker/month-days.component.d.ts +11 -0
  6. package/components/date-picker/month-year-header.component.d.ts +7 -0
  7. package/components/date-picker/week-days-names.component.d.ts +11 -0
  8. package/components/dropdown/dropdown-divider.component.d.ts +5 -0
  9. package/components/dropdown/dropdown-item.component.d.ts +6 -0
  10. package/components/dropdown/dropdown.component.d.ts +5 -0
  11. package/components/dropdown/index.d.ts +3 -0
  12. package/components/editor/editor.component.d.ts +1 -1
  13. package/components/nav/index.d.ts +3 -0
  14. package/components/nav/nav-item-dropdown.component.d.ts +5 -0
  15. package/components/nav/nav-item.component.d.ts +5 -0
  16. package/components/nav/nav.component.d.ts +5 -0
  17. package/components/select/index.d.ts +2 -0
  18. package/components/select/select-option.component.d.ts +7 -0
  19. package/components/select/select.component.d.ts +55 -0
  20. package/components/tooltip/tooltip.component.d.ts +1 -1
  21. package/esm2022/components/date-picker/date-picker.component.mjs +181 -8
  22. package/esm2022/components/date-picker/index.mjs +2 -1
  23. package/esm2022/components/date-picker/inline-date-picker.component.mjs +185 -0
  24. package/esm2022/components/date-picker/month-days.component.mjs +69 -0
  25. package/esm2022/components/date-picker/month-year-header.component.mjs +124 -0
  26. package/esm2022/components/date-picker/week-days-names.component.mjs +37 -0
  27. package/esm2022/components/dropdown/dropdown-divider.component.mjs +16 -0
  28. package/esm2022/components/dropdown/dropdown-item.component.mjs +33 -0
  29. package/esm2022/components/dropdown/dropdown.component.mjs +85 -0
  30. package/esm2022/components/dropdown/index.mjs +4 -0
  31. package/esm2022/components/editor/editor.component.mjs +4 -4
  32. package/esm2022/components/nav/index.mjs +4 -0
  33. package/esm2022/components/nav/nav-item-dropdown.component.mjs +148 -0
  34. package/esm2022/components/nav/nav-item.component.mjs +16 -0
  35. package/esm2022/components/nav/nav.component.mjs +16 -0
  36. package/esm2022/components/select/index.mjs +3 -0
  37. package/esm2022/components/select/select-option.component.mjs +28 -0
  38. package/esm2022/components/select/select.component.mjs +252 -0
  39. package/esm2022/components/tooltip/tooltip.component.mjs +4 -4
  40. package/esm2022/index.mjs +4 -2
  41. package/fesm2022/semantic-components-ui.mjs +1132 -559
  42. package/fesm2022/semantic-components-ui.mjs.map +1 -1
  43. package/index.d.ts +3 -1
  44. package/package.json +7 -3
  45. package/components/navbar/index.d.ts +0 -1
  46. package/components/navbar/navbar.component.d.ts +0 -5
  47. package/esm2022/components/navbar/index.mjs +0 -2
  48. package/esm2022/components/navbar/navbar.component.mjs +0 -566
@@ -1,612 +1,1185 @@
1
+ import { Directionality } from '@angular/cdk/bidi';
2
+ import * as i2 from '@angular/cdk/overlay';
3
+ import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
4
+ import { _getEventTarget } from '@angular/cdk/platform';
5
+ import * as i4 from '@angular/cdk/portal';
6
+ import { ComponentPortal, CdkPortal, PortalModule } from '@angular/cdk/portal';
7
+ import * as i1 from '@angular/common';
8
+ import { CommonModule, NgClass } from '@angular/common';
1
9
  import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
10
+ import { input, output, Component, ViewEncapsulation, ChangeDetectionStrategy, signal, computed, LOCALE_ID, Inject, inject, Injector, viewChild, Input, HostBinding, EventEmitter, forwardRef, Output, ViewChild, ContentChildren } from '@angular/core';
11
+ import { CdkMenuTrigger, CdkMenu, CdkMenuItem } from '@angular/cdk/menu';
12
+ import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
13
+ import * as i1$1 from '@angular/platform-browser';
14
+ import { noop } from 'rxjs';
15
+
16
+ class MonthDaysComponent {
17
+ days = input.required();
18
+ firstDayMonth = input.required();
19
+ selectedDay = input('');
20
+ selectedDayChange = output();
21
+ isSelected(day) {
22
+ return day === this.selectedDay();
23
+ }
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ setSelectedDay(event) {
26
+ const selectedDay = event.target.dataset.scDay;
27
+ this.selectedDayChange.emit(selectedDay);
28
+ }
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: MonthDaysComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: MonthDaysComponent, isStandalone: true, selector: "sc-month-days", inputs: { days: { classPropertyName: "days", publicName: "days", isSignal: true, isRequired: true, transformFunction: null }, firstDayMonth: { classPropertyName: "firstDayMonth", publicName: "firstDayMonth", isSignal: true, isRequired: true, transformFunction: null }, selectedDay: { classPropertyName: "selectedDay", publicName: "selectedDay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedDayChange: "selectedDayChange" }, ngImport: i0, template: `
31
+ <div class="grid w-64 grid-cols-7">
32
+ @for (day of days(); track $index; let index = $index) {
33
+ <button
34
+ class="block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
35
+ [ngClass]="{
36
+ 'col-start-1': index === 0 && firstDayMonth() === 0,
37
+ 'col-start-2': index === 0 && firstDayMonth() === 1,
38
+ 'col-start-3': index === 0 && firstDayMonth() === 2,
39
+ 'col-start-4': index === 0 && firstDayMonth() === 3,
40
+ 'col-start-5': index === 0 && firstDayMonth() === 4,
41
+ 'col-start-6': index === 0 && firstDayMonth() === 5,
42
+ 'col-start-7': index === 0 && firstDayMonth() === 6,
43
+ '!bg-primary-700 dark:!bg-primary-600 !text-white': isSelected(day),
44
+ }"
45
+ [attr.data-sc-day]="day"
46
+ (click)="setSelectedDay($event)"
47
+ >
48
+ {{ day.slice(-2) }}
49
+ </button>
50
+ }
51
+ </div>
52
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: MonthDaysComponent, decorators: [{
55
+ type: Component,
56
+ args: [{ selector: 'sc-month-days', standalone: true, imports: [CommonModule, NgClass], template: `
57
+ <div class="grid w-64 grid-cols-7">
58
+ @for (day of days(); track $index; let index = $index) {
59
+ <button
60
+ class="block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
61
+ [ngClass]="{
62
+ 'col-start-1': index === 0 && firstDayMonth() === 0,
63
+ 'col-start-2': index === 0 && firstDayMonth() === 1,
64
+ 'col-start-3': index === 0 && firstDayMonth() === 2,
65
+ 'col-start-4': index === 0 && firstDayMonth() === 3,
66
+ 'col-start-5': index === 0 && firstDayMonth() === 4,
67
+ 'col-start-6': index === 0 && firstDayMonth() === 5,
68
+ 'col-start-7': index === 0 && firstDayMonth() === 6,
69
+ '!bg-primary-700 dark:!bg-primary-600 !text-white': isSelected(day),
70
+ }"
71
+ [attr.data-sc-day]="day"
72
+ (click)="setSelectedDay($event)"
73
+ >
74
+ {{ day.slice(-2) }}
75
+ </button>
76
+ }
77
+ </div>
78
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
79
+ }] });
80
+
81
+ class MonthYearHeaderComponent {
82
+ monthYear = input.required();
83
+ monthYearChange = output();
84
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: MonthYearHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.11", type: MonthYearHeaderComponent, isStandalone: true, selector: "sc-month-year-header", inputs: { monthYear: { classPropertyName: "monthYear", publicName: "monthYear", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { monthYearChange: "monthYearChange" }, ngImport: i0, template: `
86
+ <div class="mb-2 flex justify-between">
87
+ <button
88
+ class="rounded-lg bg-white p-2.5 text-lg text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white"
89
+ (click)="monthYearChange.emit(-1)"
90
+ aria-label="Previous month"
91
+ type="button"
92
+ >
93
+ <svg
94
+ class="size-4 text-gray-800 rtl:rotate-180 dark:text-white"
95
+ aria-hidden="true"
96
+ xmlns="http://www.w3.org/2000/svg"
97
+ fill="none"
98
+ viewBox="0 0 14 10"
99
+ >
100
+ <path
101
+ stroke="currentColor"
102
+ stroke-linecap="round"
103
+ stroke-linejoin="round"
104
+ stroke-width="2"
105
+ d="M13 5H1m0 0 4 4M1 5l4-4"
106
+ ></path>
107
+ </svg>
108
+ </button>
109
+
110
+ <button
111
+ class="rounded-lg bg-white px-5 py-2.5 text-sm font-semibold text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"
112
+ type="button"
113
+ >
114
+ {{ monthYear() }}
115
+ </button>
116
+
117
+ <button
118
+ class="rounded-lg bg-white p-2.5 text-lg text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white"
119
+ (click)="monthYearChange.emit(1)"
120
+ type="button"
121
+ aria-label="Next month"
122
+ >
123
+ <svg
124
+ class="size-4 text-gray-800 rtl:rotate-180 dark:text-white"
125
+ aria-hidden="true"
126
+ xmlns="http://www.w3.org/2000/svg"
127
+ fill="none"
128
+ viewBox="0 0 14 10"
129
+ >
130
+ <path
131
+ stroke="currentColor"
132
+ stroke-linecap="round"
133
+ stroke-linejoin="round"
134
+ stroke-width="2"
135
+ d="M1 5h12m0 0L9 1m4 4L9 9"
136
+ ></path>
137
+ </svg>
138
+ </button>
139
+ </div>
140
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
141
+ }
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: MonthYearHeaderComponent, decorators: [{
143
+ type: Component,
144
+ args: [{ selector: 'sc-month-year-header', standalone: true, imports: [CommonModule], template: `
145
+ <div class="mb-2 flex justify-between">
146
+ <button
147
+ class="rounded-lg bg-white p-2.5 text-lg text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white"
148
+ (click)="monthYearChange.emit(-1)"
149
+ aria-label="Previous month"
150
+ type="button"
151
+ >
152
+ <svg
153
+ class="size-4 text-gray-800 rtl:rotate-180 dark:text-white"
154
+ aria-hidden="true"
155
+ xmlns="http://www.w3.org/2000/svg"
156
+ fill="none"
157
+ viewBox="0 0 14 10"
158
+ >
159
+ <path
160
+ stroke="currentColor"
161
+ stroke-linecap="round"
162
+ stroke-linejoin="round"
163
+ stroke-width="2"
164
+ d="M13 5H1m0 0 4 4M1 5l4-4"
165
+ ></path>
166
+ </svg>
167
+ </button>
168
+
169
+ <button
170
+ class="rounded-lg bg-white px-5 py-2.5 text-sm font-semibold text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"
171
+ type="button"
172
+ >
173
+ {{ monthYear() }}
174
+ </button>
175
+
176
+ <button
177
+ class="rounded-lg bg-white p-2.5 text-lg text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white"
178
+ (click)="monthYearChange.emit(1)"
179
+ type="button"
180
+ aria-label="Next month"
181
+ >
182
+ <svg
183
+ class="size-4 text-gray-800 rtl:rotate-180 dark:text-white"
184
+ aria-hidden="true"
185
+ xmlns="http://www.w3.org/2000/svg"
186
+ fill="none"
187
+ viewBox="0 0 14 10"
188
+ >
189
+ <path
190
+ stroke="currentColor"
191
+ stroke-linecap="round"
192
+ stroke-linejoin="round"
193
+ stroke-width="2"
194
+ d="M1 5h12m0 0L9 1m4 4L9 9"
195
+ ></path>
196
+ </svg>
197
+ </button>
198
+ </div>
199
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
200
+ }] });
201
+
202
+ class WeekDaysNamesComponent {
203
+ weekDaysNames = input.required();
204
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: WeekDaysNamesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
205
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: WeekDaysNamesComponent, isStandalone: true, selector: "sc-week-days-names", inputs: { weekDaysNames: { classPropertyName: "weekDaysNames", publicName: "weekDaysNames", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
206
+ <div class="mb-1 grid grid-cols-7">
207
+ @for (weekDayName of weekDaysNames(); track weekDayName.long) {
208
+ <abbr
209
+ class="h-6 text-center text-sm font-medium leading-6 text-gray-500 dark:text-gray-400"
210
+ [title]="weekDayName.long"
211
+ [attr.aria-label]="weekDayName.long"
212
+ >
213
+ {{ weekDayName.short }}
214
+ </abbr>
215
+ }
216
+ </div>
217
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
218
+ }
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: WeekDaysNamesComponent, decorators: [{
220
+ type: Component,
221
+ args: [{ selector: 'sc-week-days-names', standalone: true, imports: [CommonModule], template: `
222
+ <div class="mb-1 grid grid-cols-7">
223
+ @for (weekDayName of weekDaysNames(); track weekDayName.long) {
224
+ <abbr
225
+ class="h-6 text-center text-sm font-medium leading-6 text-gray-500 dark:text-gray-400"
226
+ [title]="weekDayName.long"
227
+ [attr.aria-label]="weekDayName.long"
228
+ >
229
+ {{ weekDayName.short }}
230
+ </abbr>
231
+ }
232
+ </div>
233
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
234
+ }] });
235
+
236
+ class InlineDatePickerComponent {
237
+ localeId;
238
+ year = signal(0);
239
+ month = signal(0);
240
+ weekDaysNames = signal([]);
241
+ monthYear = computed(() => {
242
+ const options = {
243
+ month: 'long',
244
+ year: 'numeric',
245
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
246
+ };
247
+ const s = new Intl.DateTimeFormat(this.localeId, options).format(new Date(this.year(), this.month(), 1));
248
+ return s;
249
+ });
250
+ monthDays = computed(() => {
251
+ // Month in JavaScript is 0-indexed (January is 0, February is 1, etc),
252
+ // but by using 0 as the day it will give us the last day of the prior
253
+ // month. So passing in 1 as the month number will return the last day
254
+ // of January, not February
255
+ const numOfDays = new Date(this.year(), this.month() + 1, 0).getDate();
256
+ const days = [];
257
+ for (let i = 1; i <= numOfDays; i++) {
258
+ const date = new Date(this.year(), this.month(), i);
259
+ days.push(`${date.getFullYear()}-${this.twoDigits(date.getMonth() + 1)}-${this.twoDigits(date.getDate())}`);
260
+ }
261
+ return days;
262
+ });
263
+ firstDayMonth = computed(() => {
264
+ const date = new Date(this.year(), this.month(), 1);
265
+ const intlLongFormatter = new Intl.DateTimeFormat(this.localeId, { weekday: 'long' });
266
+ const dayName = intlLongFormatter.format(date);
267
+ return this.weekDaysNames()
268
+ .map((e) => e.long)
269
+ .indexOf(dayName);
270
+ });
271
+ selectedDay = signal('');
272
+ constructor(localeId) {
273
+ this.localeId = localeId;
274
+ }
275
+ ngOnInit() {
276
+ this.init();
277
+ this.setLocaleDayNames();
278
+ }
279
+ init() {
280
+ const today = new Date();
281
+ this.year.set(today.getFullYear());
282
+ this.month.set(today.getMonth());
283
+ }
284
+ setSelectedDay(day) {
285
+ this.selectedDay.set(day);
286
+ }
287
+ //https://github.com/angular/angular/issues/57193
288
+ setLocaleDayNames() {
289
+ const weekDaysNames = [];
290
+ const intlNarrowFormatter = new Intl.DateTimeFormat(this.localeId, { weekday: 'narrow' });
291
+ const intlShortFormatter = new Intl.DateTimeFormat(this.localeId, { weekday: 'short' });
292
+ const intlLongFormatter = new Intl.DateTimeFormat(this.localeId, { weekday: 'long' });
293
+ let k = 0;
294
+ const firstDayOfWeek = this.getFirstDayOfWeek();
295
+ if (firstDayOfWeek === 7) {
296
+ // First day of the week is Sunday
297
+ k = 3; // 3th January 2021 is a Sunday
298
+ }
299
+ if (firstDayOfWeek === 1) {
300
+ // First day of the week is Monday
301
+ k = 4; // 4th January 2021 is a Monday
302
+ }
303
+ for (let i = 0; i < 7; i += 1) {
304
+ const date = new Date(Date.UTC(2021, 0, i + k));
305
+ weekDaysNames.push({
306
+ narrow: intlNarrowFormatter.format(date),
307
+ short: intlShortFormatter.format(date),
308
+ long: intlLongFormatter.format(date),
309
+ });
310
+ }
311
+ this.weekDaysNames.set(weekDaysNames);
312
+ }
313
+ getFirstDayOfWeek() {
314
+ const locale = new Intl.Locale(this.localeId);
315
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
316
+ return locale.getWeekInfo().firstDay;
317
+ }
318
+ setMonthYear(n) {
319
+ if (n === 1) {
320
+ if (this.month() < 11) {
321
+ this.month.update((value) => value + 1);
322
+ }
323
+ else {
324
+ this.month.set(0);
325
+ this.year.update((value) => value + 1);
326
+ }
327
+ }
328
+ if (n === -1) {
329
+ if (this.month() > 0) {
330
+ this.month.update((value) => value - 1);
331
+ }
332
+ else {
333
+ this.month.set(11);
334
+ this.year.update((value) => value - 1);
335
+ }
336
+ }
337
+ }
338
+ twoDigits(n) {
339
+ return n.toLocaleString(this.localeId, {
340
+ minimumIntegerDigits: 2,
341
+ useGrouping: false,
342
+ });
343
+ }
344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InlineDatePickerComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
345
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: InlineDatePickerComponent, isStandalone: true, selector: "sc-inline-date-picker", ngImport: i0, template: `
346
+ <div class="inline-block rounded-lg bg-white p-4 shadow-lg dark:bg-gray-700">
347
+ <div class="bg-white px-2 py-3 text-center font-semibold dark:bg-gray-700 dark:text-white">
348
+ <sc-month-year-header [monthYear]="monthYear()" (monthYearChange)="setMonthYear($event)" />
349
+ </div>
350
+
351
+ <sc-week-days-names [weekDaysNames]="weekDaysNames()" />
352
+
353
+ <sc-month-days
354
+ [days]="monthDays()"
355
+ [firstDayMonth]="firstDayMonth()"
356
+ [selectedDay]="selectedDay()"
357
+ (selectedDayChange)="setSelectedDay($event)"
358
+ />
359
+
360
+ <div class="mt-2 flex space-x-2 rtl:space-x-reverse">
361
+ <button
362
+ class="bg-primary-700 hover:bg-primary-800 dark:hover:bg-primary-700 focus:ring-primary-300 dark:bg-primary-600 w-1/2 rounded-lg px-5 py-2 text-center text-sm font-medium text-white focus:ring-4"
363
+ type="button"
364
+ >
365
+ Today
366
+ </button>
367
+ <button
368
+ class="focus:ring-primary-300 w-1/2 rounded-lg border border-gray-300 bg-white px-5 py-2 text-center text-sm font-medium text-gray-900 hover:bg-gray-100 focus:ring-4 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"
369
+ type="button"
370
+ >
371
+ Clear
372
+ </button>
373
+ </div>
374
+ </div>
375
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: WeekDaysNamesComponent, selector: "sc-week-days-names", inputs: ["weekDaysNames"] }, { kind: "component", type: MonthYearHeaderComponent, selector: "sc-month-year-header", inputs: ["monthYear"], outputs: ["monthYearChange"] }, { kind: "component", type: MonthDaysComponent, selector: "sc-month-days", inputs: ["days", "firstDayMonth", "selectedDay"], outputs: ["selectedDayChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
376
+ }
377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: InlineDatePickerComponent, decorators: [{
378
+ type: Component,
379
+ args: [{ selector: 'sc-inline-date-picker', standalone: true, imports: [CommonModule, WeekDaysNamesComponent, MonthYearHeaderComponent, MonthDaysComponent], template: `
380
+ <div class="inline-block rounded-lg bg-white p-4 shadow-lg dark:bg-gray-700">
381
+ <div class="bg-white px-2 py-3 text-center font-semibold dark:bg-gray-700 dark:text-white">
382
+ <sc-month-year-header [monthYear]="monthYear()" (monthYearChange)="setMonthYear($event)" />
383
+ </div>
384
+
385
+ <sc-week-days-names [weekDaysNames]="weekDaysNames()" />
386
+
387
+ <sc-month-days
388
+ [days]="monthDays()"
389
+ [firstDayMonth]="firstDayMonth()"
390
+ [selectedDay]="selectedDay()"
391
+ (selectedDayChange)="setSelectedDay($event)"
392
+ />
393
+
394
+ <div class="mt-2 flex space-x-2 rtl:space-x-reverse">
395
+ <button
396
+ class="bg-primary-700 hover:bg-primary-800 dark:hover:bg-primary-700 focus:ring-primary-300 dark:bg-primary-600 w-1/2 rounded-lg px-5 py-2 text-center text-sm font-medium text-white focus:ring-4"
397
+ type="button"
398
+ >
399
+ Today
400
+ </button>
401
+ <button
402
+ class="focus:ring-primary-300 w-1/2 rounded-lg border border-gray-300 bg-white px-5 py-2 text-center text-sm font-medium text-gray-900 hover:bg-gray-100 focus:ring-4 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"
403
+ type="button"
404
+ >
405
+ Clear
406
+ </button>
407
+ </div>
408
+ </div>
409
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
410
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
411
+ type: Inject,
412
+ args: [LOCALE_ID]
413
+ }] }] });
4
414
 
5
415
  class DatePickerComponent {
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: DatePickerComponent, isStandalone: true, selector: "lib-date-picker", ngImport: i0, template: `
8
- <p>date-picker works!</p>
416
+ localeId;
417
+ dateFormatPattern = signal('');
418
+ constructor(localeId) {
419
+ this.localeId = localeId;
420
+ }
421
+ ngOnInit() {
422
+ this.dateFormatPattern.set(this.getDateFormatPattern(this.localeId));
423
+ }
424
+ getDateFormatPattern(localeId) {
425
+ const getPatternForPart = (part) => {
426
+ switch (part.type) {
427
+ case 'day':
428
+ return 'd'.repeat(part.value.length);
429
+ case 'month':
430
+ return 'M'.repeat(part.value.length);
431
+ case 'year':
432
+ return 'y'.repeat(part.value.length);
433
+ case 'literal':
434
+ return part.value;
435
+ default:
436
+ throw new Error('no default');
437
+ }
438
+ };
439
+ return new Intl.DateTimeFormat(localeId)
440
+ .formatToParts(new Date('2022-01-01'))
441
+ .map(getPatternForPart)
442
+ .join('');
443
+ }
444
+ _injector = inject(Injector);
445
+ _dir = inject(Directionality, { optional: true });
446
+ _overlay = inject(Overlay);
447
+ _isOpen = signal(false);
448
+ _input = viewChild('input');
449
+ _overlayOrigin = viewChild('overlayOrigin');
450
+ _overlayRef = null;
451
+ _portal = null;
452
+ /** Emits when the datepicker is opened. */
453
+ opened = output();
454
+ /** Emits when the datepicker is closed. */
455
+ closed = output();
456
+ /** Emits when the user selects a date. */
457
+ selected = output();
458
+ /** Opens the datepicker. */
459
+ open() {
460
+ if (!this._input) {
461
+ return;
462
+ }
463
+ // Focus should already be on the input, but this call is in case the datepicker is opened
464
+ // programmatically. We need to call this even if the datepicker is already open, because
465
+ // the user might be clicking the toggle.
466
+ this._input()?.nativeElement.focus();
467
+ if (this._isOpen()) {
468
+ return;
469
+ }
470
+ this._isOpen.set(true);
471
+ const overlayRef = this._getOverlayRef();
472
+ overlayRef.updateSize({ width: this._overlayOrigin()?.nativeElement.offsetWidth });
473
+ this._portal ??= new ComponentPortal(InlineDatePickerComponent);
474
+ overlayRef.attach(this._portal);
475
+ this.opened.emit();
476
+ }
477
+ /** Closes the datepicker. */
478
+ close() {
479
+ if (this._isOpen()) {
480
+ this._isOpen.set(false);
481
+ this._overlayRef?.detach();
482
+ this.closed.emit();
483
+ }
484
+ }
485
+ /** Creates an overlay reference for the datepicker panel. */
486
+ _getOverlayRef() {
487
+ if (this._overlayRef) {
488
+ return this._overlayRef;
489
+ }
490
+ const _overlayOrigin = this._overlayOrigin();
491
+ if (_overlayOrigin === undefined) {
492
+ throw new Error('_overlayOrigin is undefined');
493
+ }
494
+ const positionStrategy = this._overlay
495
+ .position()
496
+ .flexibleConnectedTo(_overlayOrigin)
497
+ .withFlexibleDimensions(false)
498
+ .withPush(false)
499
+ // .withTransformOriginOn('.mat-datepicker-panel')
500
+ .withPositions([
501
+ {
502
+ originX: 'start',
503
+ originY: 'bottom',
504
+ overlayX: 'start',
505
+ overlayY: 'top',
506
+ },
507
+ {
508
+ originX: 'start',
509
+ originY: 'top',
510
+ overlayX: 'start',
511
+ overlayY: 'bottom',
512
+ //panelClass: 'mat-datepicker-above',
513
+ },
514
+ ]);
515
+ this._overlayRef = this._overlay.create({
516
+ positionStrategy,
517
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
518
+ direction: this._dir || 'ltr',
519
+ hasBackdrop: false,
520
+ });
521
+ this._overlayRef.keydownEvents().subscribe((event) => {
522
+ console.log(event);
523
+ });
524
+ this._overlayRef.outsidePointerEvents().subscribe((event) => {
525
+ const target = _getEventTarget(event);
526
+ const origin = this._overlayOrigin()?.nativeElement;
527
+ if (target && target !== origin && !origin?.contains(target)) {
528
+ this.close();
529
+ }
530
+ });
531
+ return this._overlayRef;
532
+ }
533
+ /** Selects a specific date value. */
534
+ _selectValue(value) {
535
+ this.close();
536
+ this.selected.emit(value);
537
+ this._input()?.nativeElement.focus();
538
+ }
539
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DatePickerComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
540
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.11", type: DatePickerComponent, isStandalone: true, selector: "sc-date-picker", outputs: { opened: "opened", closed: "closed", selected: "selected" }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "_overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true, isSignal: true }], ngImport: i0, template: `
541
+ <div class="relative max-w-sm" #overlayOrigin>
542
+ <button class="absolute inset-y-0 end-0 flex items-center pe-3.5" (click)="open()">
543
+ <svg
544
+ class="size-4 text-gray-500 dark:text-gray-400"
545
+ aria-hidden="true"
546
+ xmlns="http://www.w3.org/2000/svg"
547
+ fill="currentColor"
548
+ viewBox="0 0 20 20"
549
+ >
550
+ <path
551
+ d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"
552
+ />
553
+ </svg>
554
+ </button>
555
+ <input
556
+ class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pe-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
557
+ #input
558
+ type="text"
559
+ placeholder="Select date"
560
+ />
561
+ </div>
562
+ {{ dateFormatPattern() }}
9
563
  `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10
564
  }
11
565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DatePickerComponent, decorators: [{
12
566
  type: Component,
13
- args: [{ selector: 'lib-date-picker', standalone: true, imports: [CommonModule], template: `
14
- <p>date-picker works!</p>
567
+ args: [{ selector: 'sc-date-picker', standalone: true, imports: [CommonModule, InlineDatePickerComponent], template: `
568
+ <div class="relative max-w-sm" #overlayOrigin>
569
+ <button class="absolute inset-y-0 end-0 flex items-center pe-3.5" (click)="open()">
570
+ <svg
571
+ class="size-4 text-gray-500 dark:text-gray-400"
572
+ aria-hidden="true"
573
+ xmlns="http://www.w3.org/2000/svg"
574
+ fill="currentColor"
575
+ viewBox="0 0 20 20"
576
+ >
577
+ <path
578
+ d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"
579
+ />
580
+ </svg>
581
+ </button>
582
+ <input
583
+ class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pe-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
584
+ #input
585
+ type="text"
586
+ placeholder="Select date"
587
+ />
588
+ </div>
589
+ {{ dateFormatPattern() }}
590
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
591
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
592
+ type: Inject,
593
+ args: [LOCALE_ID]
594
+ }] }] });
595
+
596
+ class DropdownComponent {
597
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
598
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: DropdownComponent, isStandalone: true, selector: "sc-dropdown", ngImport: i0, template: `
599
+ <!--ng-content select="dropdown-toggle" /-->
600
+
601
+ <button
602
+ class="inline-flex items-center rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
603
+ [cdkMenuTriggerFor]="menu"
604
+ type="button"
605
+ >
606
+ Dropdown button
607
+ <svg
608
+ class="ms-3 size-2.5"
609
+ aria-hidden="true"
610
+ xmlns="http://www.w3.org/2000/svg"
611
+ fill="none"
612
+ viewBox="0 0 10 6"
613
+ >
614
+ <path
615
+ stroke="currentColor"
616
+ stroke-linecap="round"
617
+ stroke-linejoin="round"
618
+ stroke-width="2"
619
+ d="m1 1 4 4 4-4"
620
+ />
621
+ </svg>
622
+ </button>
623
+
624
+ <ng-template #menu>
625
+ <div
626
+ class="z-10 w-44 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"
627
+ cdkMenu
628
+ >
629
+ <ul class="py-2 text-sm text-gray-700 dark:text-gray-200">
630
+ <ng-content select="dropdown-items" />
631
+ </ul>
632
+ </div>
633
+ </ng-template>
634
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
635
+ }
636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownComponent, decorators: [{
637
+ type: Component,
638
+ args: [{ selector: 'sc-dropdown', standalone: true, imports: [CommonModule, CdkMenuTrigger, CdkMenu], template: `
639
+ <!--ng-content select="dropdown-toggle" /-->
640
+
641
+ <button
642
+ class="inline-flex items-center rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
643
+ [cdkMenuTriggerFor]="menu"
644
+ type="button"
645
+ >
646
+ Dropdown button
647
+ <svg
648
+ class="ms-3 size-2.5"
649
+ aria-hidden="true"
650
+ xmlns="http://www.w3.org/2000/svg"
651
+ fill="none"
652
+ viewBox="0 0 10 6"
653
+ >
654
+ <path
655
+ stroke="currentColor"
656
+ stroke-linecap="round"
657
+ stroke-linejoin="round"
658
+ stroke-width="2"
659
+ d="m1 1 4 4 4-4"
660
+ />
661
+ </svg>
662
+ </button>
663
+
664
+ <ng-template #menu>
665
+ <div
666
+ class="z-10 w-44 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"
667
+ cdkMenu
668
+ >
669
+ <ul class="py-2 text-sm text-gray-700 dark:text-gray-200">
670
+ <ng-content select="dropdown-items" />
671
+ </ul>
672
+ </div>
673
+ </ng-template>
674
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
675
+ }] });
676
+
677
+ class DropdownDividerComponent {
678
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
679
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: DropdownDividerComponent, isStandalone: true, selector: "sc-dropdown-divider", ngImport: i0, template: `
680
+ <li class="py-2"><hr /></li>
681
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
682
+ }
683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownDividerComponent, decorators: [{
684
+ type: Component,
685
+ args: [{ selector: 'sc-dropdown-divider', standalone: true, imports: [CommonModule], template: `
686
+ <li class="py-2"><hr /></li>
687
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
688
+ }] });
689
+
690
+ //TODO try to add CdkMenuItem
691
+ class DropdownItemComponent {
692
+ text = input.required();
693
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
694
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.11", type: DropdownItemComponent, isStandalone: true, selector: "sc-dropdown-item", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
695
+ <li>
696
+ <a
697
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
698
+ href="javascript:void(0)"
699
+ >
700
+ {{ text() }}
701
+ </a>
702
+ </li>
703
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
704
+ }
705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: DropdownItemComponent, decorators: [{
706
+ type: Component,
707
+ args: [{ selector: 'sc-dropdown-item', standalone: true, imports: [CommonModule, CdkMenuItem], template: `
708
+ <li>
709
+ <a
710
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
711
+ href="javascript:void(0)"
712
+ >
713
+ {{ text() }}
714
+ </a>
715
+ </li>
15
716
  `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
16
717
  }] });
17
718
 
18
719
  class EditorComponent {
19
720
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: EditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: EditorComponent, isStandalone: true, selector: "lib-editor", ngImport: i0, template: `
721
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: EditorComponent, isStandalone: true, selector: "sc-editor", ngImport: i0, template: `
21
722
  <p>editor works!</p>
22
723
  `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
23
724
  }
24
725
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: EditorComponent, decorators: [{
25
726
  type: Component,
26
- args: [{ selector: 'lib-editor', standalone: true, imports: [CommonModule], template: `
727
+ args: [{ selector: 'sc-editor', standalone: true, imports: [CommonModule], template: `
27
728
  <p>editor works!</p>
28
729
  `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
29
730
  }] });
30
731
 
31
- class NavbarComponent {
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: NavbarComponent, isStandalone: true, selector: "lib-navbar", ngImport: i0, template: `
34
- <nav class="border-gray-200 bg-white dark:bg-gray-900">
35
- <div class="mx-auto flex max-w-screen-xl flex-wrap items-center justify-between p-4">
36
- <a class="flex items-center space-x-3 rtl:space-x-reverse" href="https://flowbite.com/">
37
- <img class="h-8" src="https://flowbite.com/docs/images/logo.svg" alt="Flowbite Logo" />
38
- <span class="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">
39
- Flowbite
40
- </span>
41
- </a>
42
- <div class="flex items-center space-x-1 md:order-2 md:space-x-0 rtl:space-x-reverse">
43
- <button
44
- class="inline-flex cursor-pointer items-center justify-center rounded-lg px-4 py-2 text-sm font-medium text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white"
45
- type="button"
46
- data-dropdown-toggle="language-dropdown-menu"
47
- >
48
- <svg
49
- class="me-3 h-5 w-5 rounded-full"
50
- aria-hidden="true"
51
- xmlns="http://www.w3.org/2000/svg"
52
- xmlns:xlink="http://www.w3.org/1999/xlink"
53
- viewBox="0 0 3900 3900"
732
+ class NavComponent {
733
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
734
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: NavComponent, isStandalone: true, selector: "sc-nav", ngImport: i0, template: `
735
+ <p>nav works!</p>
736
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
737
+ }
738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavComponent, decorators: [{
739
+ type: Component,
740
+ args: [{ selector: 'sc-nav', standalone: true, imports: [CommonModule], template: `
741
+ <p>nav works!</p>
742
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
743
+ }] });
744
+
745
+ class NavItemComponent {
746
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
747
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: NavItemComponent, isStandalone: true, selector: "sc-nav-item", ngImport: i0, template: `
748
+ <p>nav-item works!</p>
749
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
750
+ }
751
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavItemComponent, decorators: [{
752
+ type: Component,
753
+ args: [{ selector: 'sc-nav-item', standalone: true, imports: [CommonModule], template: `
754
+ <p>nav-item works!</p>
755
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
756
+ }] });
757
+
758
+ class NavItemDropdownComponent {
759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavItemDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
760
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: NavItemDropdownComponent, isStandalone: true, selector: "sc-nav-item-dropdown", ngImport: i0, template: `
761
+ <li>
762
+ <button
763
+ class="flex w-full items-center justify-between rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:w-auto md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:focus:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
764
+ id="dropdownNavbarLink"
765
+ data-dropdown-toggle="dropdownNavbar"
766
+ >
767
+ Dropdown
768
+ <svg
769
+ class="ms-2.5 size-2.5"
770
+ aria-hidden="true"
771
+ xmlns="http://www.w3.org/2000/svg"
772
+ fill="none"
773
+ viewBox="0 0 10 6"
774
+ >
775
+ <path
776
+ stroke="currentColor"
777
+ stroke-linecap="round"
778
+ stroke-linejoin="round"
779
+ stroke-width="2"
780
+ d="m1 1 4 4 4-4"
781
+ />
782
+ </svg>
783
+ </button>
784
+ <!-- Dropdown menu -->
785
+ <div
786
+ class="z-10 hidden w-44 divide-y divide-gray-100 rounded-lg bg-white font-normal shadow dark:divide-gray-600 dark:bg-gray-700"
787
+ id="dropdownNavbar"
788
+ >
789
+ <ul
790
+ class="py-2 text-sm text-gray-700 dark:text-gray-400"
791
+ aria-labelledby="dropdownLargeButton"
792
+ >
793
+ <li>
794
+ <a
795
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
796
+ href="javascript:void(0)"
54
797
  >
55
- <path fill="#b22234" d="M0 0h7410v3900H0z" />
56
- <path
57
- d="M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0"
58
- stroke="#fff"
59
- stroke-width="300"
60
- />
61
- <path fill="#3c3b6e" d="M0 0h2964v2100H0z" />
62
- <g fill="#fff">
63
- <g id="d">
64
- <g id="c">
65
- <g id="e">
66
- <g id="b">
67
- <path
68
- id="a"
69
- d="M247 90l70.534 217.082-184.66-134.164h228.253L176.466 307.082z"
70
- />
71
- <use xlink:href="#a" y="420" />
72
- <use xlink:href="#a" y="840" />
73
- <use xlink:href="#a" y="1260" />
74
- </g>
75
- <use xlink:href="#a" y="1680" />
76
- </g>
77
- <use xlink:href="#b" x="247" y="210" />
78
- </g>
79
- <use xlink:href="#c" x="494" />
80
- </g>
81
- <use xlink:href="#d" x="988" />
82
- <use xlink:href="#c" x="1976" />
83
- <use xlink:href="#e" x="2470" />
84
- </g>
85
- </svg>
86
- English (US)
87
- </button>
88
- <!-- Dropdown -->
89
- <div
90
- class="z-50 my-4 hidden list-none divide-y divide-gray-100 rounded-lg bg-white text-base shadow dark:bg-gray-700"
91
- id="language-dropdown-menu"
92
- >
93
- <ul class="py-2 font-medium" role="none">
94
- <li>
95
- <a
96
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
97
- href="javascript:void(0)"
98
- role="menuitem"
99
- >
100
- <div class="inline-flex items-center">
101
- <svg
102
- class="me-2 h-3.5 w-3.5 rounded-full"
103
- id="flag-icon-css-us"
104
- aria-hidden="true"
105
- xmlns="http://www.w3.org/2000/svg"
106
- viewBox="0 0 512 512"
107
- >
108
- <g fill-rule="evenodd">
109
- <g stroke-width="1pt">
110
- <path
111
- fill="#bd3d44"
112
- d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z"
113
- transform="scale(3.9385)"
114
- />
115
- <path
116
- fill="#fff"
117
- d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z"
118
- transform="scale(3.9385)"
119
- />
120
- </g>
121
- <path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)" />
122
- <path
123
- fill="#fff"
124
- d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 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1.7 1-2.7-2.4-1.7h2.9z"
125
- transform="scale(3.9385)"
126
- />
127
- </g>
128
- </svg>
129
- English (US)
130
- </div>
131
- </a>
132
- </li>
133
- <li>
134
- <a
135
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
136
- href="javascript:void(0)"
137
- role="menuitem"
138
- >
139
- <div class="inline-flex items-center">
140
- <svg
141
- class="me-2 h-3.5 w-3.5 rounded-full"
142
- id="flag-icon-css-de"
143
- aria-hidden="true"
144
- xmlns="http://www.w3.org/2000/svg"
145
- viewBox="0 0 512 512"
146
- >
147
- <path fill="#ffce00" d="M0 341.3h512V512H0z" />
148
- <path d="M0 0h512v170.7H0z" />
149
- <path fill="#d00" d="M0 170.7h512v170.6H0z" />
150
- </svg>
151
- Deutsch
152
- </div>
153
- </a>
154
- </li>
155
- <li>
156
- <a
157
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
158
- href="javascript:void(0)"
159
- role="menuitem"
160
- >
161
- <div class="inline-flex items-center">
162
- <svg
163
- class="me-2 h-3.5 w-3.5 rounded-full"
164
- id="flag-icon-css-it"
165
- aria-hidden="true"
166
- xmlns="http://www.w3.org/2000/svg"
167
- viewBox="0 0 512 512"
168
- >
169
- <g fill-rule="evenodd" stroke-width="1pt">
170
- <path fill="#fff" d="M0 0h512v512H0z" />
171
- <path fill="#009246" d="M0 0h170.7v512H0z" />
172
- <path fill="#ce2b37" d="M341.3 0H512v512H341.3z" />
173
- </g>
174
- </svg>
175
- Italiano
176
- </div>
177
- </a>
178
- </li>
179
- <li>
180
- <a
181
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
182
- href="javascript:void(0)"
183
- role="menuitem"
184
- >
185
- <div class="inline-flex items-center">
186
- <svg
187
- class="me-2 h-3.5 w-3.5 rounded-full"
188
- id="flag-icon-css-cn"
189
- aria-hidden="true"
190
- xmlns="http://www.w3.org/2000/svg"
191
- xmlns:xlink="http://www.w3.org/1999/xlink"
192
- viewBox="0 0 512 512"
193
- >
194
- <defs><path id="a" fill="#ffde00" d="M1-.3L-.7.8 0-1 .6.8-1-.3z" /></defs>
195
- <path fill="#de2910" d="M0 0h512v512H0z" />
196
- <use
197
- width="30"
198
- height="20"
199
- transform="matrix(76.8 0 0 76.8 128 128)"
200
- xlink:href="#a"
201
- />
202
- <use
203
- width="30"
204
- height="20"
205
- transform="rotate(-121 142.6 -47) scale(25.5827)"
206
- xlink:href="#a"
207
- />
208
- <use
209
- width="30"
210
- height="20"
211
- transform="rotate(-98.1 198 -82) scale(25.6)"
212
- xlink:href="#a"
213
- />
214
- <use
215
- width="30"
216
- height="20"
217
- transform="rotate(-74 272.4 -114) scale(25.6137)"
218
- xlink:href="#a"
219
- />
220
- <use
221
- width="30"
222
- height="20"
223
- transform="matrix(16 -19.968 19.968 16 256 230.4)"
224
- xlink:href="#a"
225
- />
226
- </svg>
227
- 中文 (繁體)
228
- </div>
229
- </a>
230
- </li>
231
- </ul>
232
- </div>
233
- <button
234
- class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
235
- data-collapse-toggle="navbar-language"
236
- type="button"
237
- aria-controls="navbar-language"
238
- aria-expanded="false"
239
- >
240
- <span class="sr-only">Open main menu</span>
241
- <svg
242
- class="h-5 w-5"
243
- aria-hidden="true"
244
- xmlns="http://www.w3.org/2000/svg"
245
- fill="none"
246
- viewBox="0 0 17 14"
798
+ Dashboard
799
+ </a>
800
+ </li>
801
+ <li>
802
+ <a
803
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
804
+ href="javascript:void(0)"
247
805
  >
248
- <path
249
- stroke="currentColor"
250
- stroke-linecap="round"
251
- stroke-linejoin="round"
252
- stroke-width="2"
253
- d="M1 1h15M1 7h15M1 13h15"
254
- />
255
- </svg>
256
- </button>
257
- </div>
258
- <div
259
- class="hidden w-full items-center justify-between md:order-1 md:flex md:w-auto"
260
- id="navbar-language"
261
- >
262
- <ul
263
- class="mt-4 flex flex-col rounded-lg border border-gray-100 bg-gray-50 p-4 font-medium md:mt-0 md:flex-row md:space-x-8 md:border-0 md:bg-white md:p-0 rtl:space-x-reverse dark:border-gray-700 dark:bg-gray-800 md:dark:bg-gray-900"
806
+ Settings
807
+ </a>
808
+ </li>
809
+ <li>
810
+ <a
811
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
812
+ href="javascript:void(0)"
813
+ >
814
+ Earnings
815
+ </a>
816
+ </li>
817
+ </ul>
818
+ <div class="py-1">
819
+ <a
820
+ class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white"
821
+ href="javascript:void(0)"
264
822
  >
265
- <li>
266
- <a
267
- class="block rounded bg-blue-700 px-3 py-2 text-white md:bg-transparent md:p-0 md:text-blue-700 md:dark:text-blue-500"
268
- href="javascript:void(0)"
269
- aria-current="page"
270
- >
271
- Home
272
- </a>
273
- </li>
274
- <li>
275
- <a
276
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
277
- href="javascript:void(0)"
278
- >
279
- About
280
- </a>
281
- </li>
282
- <li>
283
- <a
284
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
285
- href="javascript:void(0)"
286
- >
287
- Services
288
- </a>
289
- </li>
290
- <li>
291
- <a
292
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
293
- href="javascript:void(0)"
294
- >
295
- Pricing
296
- </a>
297
- </li>
298
- <li>
299
- <a
300
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
301
- href="javascript:void(0)"
302
- >
303
- Contact
304
- </a>
305
- </li>
306
- </ul>
823
+ Sign out
824
+ </a>
307
825
  </div>
308
826
  </div>
309
- </nav>
827
+ </li>
310
828
  `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
311
829
  }
312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavbarComponent, decorators: [{
830
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: NavItemDropdownComponent, decorators: [{
313
831
  type: Component,
314
- args: [{ selector: 'lib-navbar', standalone: true, imports: [CommonModule], template: `
315
- <nav class="border-gray-200 bg-white dark:bg-gray-900">
316
- <div class="mx-auto flex max-w-screen-xl flex-wrap items-center justify-between p-4">
317
- <a class="flex items-center space-x-3 rtl:space-x-reverse" href="https://flowbite.com/">
318
- <img class="h-8" src="https://flowbite.com/docs/images/logo.svg" alt="Flowbite Logo" />
319
- <span class="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">
320
- Flowbite
321
- </span>
322
- </a>
323
- <div class="flex items-center space-x-1 md:order-2 md:space-x-0 rtl:space-x-reverse">
324
- <button
325
- class="inline-flex cursor-pointer items-center justify-center rounded-lg px-4 py-2 text-sm font-medium text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white"
326
- type="button"
327
- data-dropdown-toggle="language-dropdown-menu"
328
- >
329
- <svg
330
- class="me-3 h-5 w-5 rounded-full"
331
- aria-hidden="true"
332
- xmlns="http://www.w3.org/2000/svg"
333
- xmlns:xlink="http://www.w3.org/1999/xlink"
334
- viewBox="0 0 3900 3900"
832
+ args: [{ selector: 'sc-nav-item-dropdown', standalone: true, imports: [CommonModule], template: `
833
+ <li>
834
+ <button
835
+ class="flex w-full items-center justify-between rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:w-auto md:border-0 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:focus:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
836
+ id="dropdownNavbarLink"
837
+ data-dropdown-toggle="dropdownNavbar"
838
+ >
839
+ Dropdown
840
+ <svg
841
+ class="ms-2.5 size-2.5"
842
+ aria-hidden="true"
843
+ xmlns="http://www.w3.org/2000/svg"
844
+ fill="none"
845
+ viewBox="0 0 10 6"
846
+ >
847
+ <path
848
+ stroke="currentColor"
849
+ stroke-linecap="round"
850
+ stroke-linejoin="round"
851
+ stroke-width="2"
852
+ d="m1 1 4 4 4-4"
853
+ />
854
+ </svg>
855
+ </button>
856
+ <!-- Dropdown menu -->
857
+ <div
858
+ class="z-10 hidden w-44 divide-y divide-gray-100 rounded-lg bg-white font-normal shadow dark:divide-gray-600 dark:bg-gray-700"
859
+ id="dropdownNavbar"
860
+ >
861
+ <ul
862
+ class="py-2 text-sm text-gray-700 dark:text-gray-400"
863
+ aria-labelledby="dropdownLargeButton"
864
+ >
865
+ <li>
866
+ <a
867
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
868
+ href="javascript:void(0)"
335
869
  >
336
- <path fill="#b22234" d="M0 0h7410v3900H0z" />
337
- <path
338
- d="M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0"
339
- stroke="#fff"
340
- stroke-width="300"
341
- />
342
- <path fill="#3c3b6e" d="M0 0h2964v2100H0z" />
343
- <g fill="#fff">
344
- <g id="d">
345
- <g id="c">
346
- <g id="e">
347
- <g id="b">
348
- <path
349
- id="a"
350
- d="M247 90l70.534 217.082-184.66-134.164h228.253L176.466 307.082z"
351
- />
352
- <use xlink:href="#a" y="420" />
353
- <use xlink:href="#a" y="840" />
354
- <use xlink:href="#a" y="1260" />
355
- </g>
356
- <use xlink:href="#a" y="1680" />
357
- </g>
358
- <use xlink:href="#b" x="247" y="210" />
359
- </g>
360
- <use xlink:href="#c" x="494" />
361
- </g>
362
- <use xlink:href="#d" x="988" />
363
- <use xlink:href="#c" x="1976" />
364
- <use xlink:href="#e" x="2470" />
365
- </g>
366
- </svg>
367
- English (US)
368
- </button>
369
- <!-- Dropdown -->
370
- <div
371
- class="z-50 my-4 hidden list-none divide-y divide-gray-100 rounded-lg bg-white text-base shadow dark:bg-gray-700"
372
- id="language-dropdown-menu"
373
- >
374
- <ul class="py-2 font-medium" role="none">
375
- <li>
376
- <a
377
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
378
- href="javascript:void(0)"
379
- role="menuitem"
380
- >
381
- <div class="inline-flex items-center">
382
- <svg
383
- class="me-2 h-3.5 w-3.5 rounded-full"
384
- id="flag-icon-css-us"
385
- aria-hidden="true"
386
- xmlns="http://www.w3.org/2000/svg"
387
- viewBox="0 0 512 512"
388
- >
389
- <g fill-rule="evenodd">
390
- <g stroke-width="1pt">
391
- <path
392
- fill="#bd3d44"
393
- d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z"
394
- transform="scale(3.9385)"
395
- />
396
- <path
397
- fill="#fff"
398
- d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z"
399
- transform="scale(3.9385)"
400
- />
401
- </g>
402
- <path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)" />
403
- <path
404
- fill="#fff"
405
- d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1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.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z"
406
- transform="scale(3.9385)"
407
- />
408
- </g>
409
- </svg>
410
- English (US)
411
- </div>
412
- </a>
413
- </li>
414
- <li>
415
- <a
416
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
417
- href="javascript:void(0)"
418
- role="menuitem"
419
- >
420
- <div class="inline-flex items-center">
421
- <svg
422
- class="me-2 h-3.5 w-3.5 rounded-full"
423
- id="flag-icon-css-de"
424
- aria-hidden="true"
425
- xmlns="http://www.w3.org/2000/svg"
426
- viewBox="0 0 512 512"
427
- >
428
- <path fill="#ffce00" d="M0 341.3h512V512H0z" />
429
- <path d="M0 0h512v170.7H0z" />
430
- <path fill="#d00" d="M0 170.7h512v170.6H0z" />
431
- </svg>
432
- Deutsch
433
- </div>
434
- </a>
435
- </li>
436
- <li>
437
- <a
438
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
439
- href="javascript:void(0)"
440
- role="menuitem"
441
- >
442
- <div class="inline-flex items-center">
443
- <svg
444
- class="me-2 h-3.5 w-3.5 rounded-full"
445
- id="flag-icon-css-it"
446
- aria-hidden="true"
447
- xmlns="http://www.w3.org/2000/svg"
448
- viewBox="0 0 512 512"
449
- >
450
- <g fill-rule="evenodd" stroke-width="1pt">
451
- <path fill="#fff" d="M0 0h512v512H0z" />
452
- <path fill="#009246" d="M0 0h170.7v512H0z" />
453
- <path fill="#ce2b37" d="M341.3 0H512v512H341.3z" />
454
- </g>
455
- </svg>
456
- Italiano
457
- </div>
458
- </a>
459
- </li>
460
- <li>
461
- <a
462
- class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
463
- href="javascript:void(0)"
464
- role="menuitem"
465
- >
466
- <div class="inline-flex items-center">
467
- <svg
468
- class="me-2 h-3.5 w-3.5 rounded-full"
469
- id="flag-icon-css-cn"
470
- aria-hidden="true"
471
- xmlns="http://www.w3.org/2000/svg"
472
- xmlns:xlink="http://www.w3.org/1999/xlink"
473
- viewBox="0 0 512 512"
474
- >
475
- <defs><path id="a" fill="#ffde00" d="M1-.3L-.7.8 0-1 .6.8-1-.3z" /></defs>
476
- <path fill="#de2910" d="M0 0h512v512H0z" />
477
- <use
478
- width="30"
479
- height="20"
480
- transform="matrix(76.8 0 0 76.8 128 128)"
481
- xlink:href="#a"
482
- />
483
- <use
484
- width="30"
485
- height="20"
486
- transform="rotate(-121 142.6 -47) scale(25.5827)"
487
- xlink:href="#a"
488
- />
489
- <use
490
- width="30"
491
- height="20"
492
- transform="rotate(-98.1 198 -82) scale(25.6)"
493
- xlink:href="#a"
494
- />
495
- <use
496
- width="30"
497
- height="20"
498
- transform="rotate(-74 272.4 -114) scale(25.6137)"
499
- xlink:href="#a"
500
- />
501
- <use
502
- width="30"
503
- height="20"
504
- transform="matrix(16 -19.968 19.968 16 256 230.4)"
505
- xlink:href="#a"
506
- />
507
- </svg>
508
- 中文 (繁體)
509
- </div>
510
- </a>
511
- </li>
512
- </ul>
513
- </div>
514
- <button
515
- class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
516
- data-collapse-toggle="navbar-language"
517
- type="button"
518
- aria-controls="navbar-language"
519
- aria-expanded="false"
520
- >
521
- <span class="sr-only">Open main menu</span>
522
- <svg
523
- class="h-5 w-5"
524
- aria-hidden="true"
525
- xmlns="http://www.w3.org/2000/svg"
526
- fill="none"
527
- viewBox="0 0 17 14"
870
+ Dashboard
871
+ </a>
872
+ </li>
873
+ <li>
874
+ <a
875
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
876
+ href="javascript:void(0)"
528
877
  >
529
- <path
530
- stroke="currentColor"
531
- stroke-linecap="round"
532
- stroke-linejoin="round"
533
- stroke-width="2"
534
- d="M1 1h15M1 7h15M1 13h15"
535
- />
536
- </svg>
537
- </button>
538
- </div>
539
- <div
540
- class="hidden w-full items-center justify-between md:order-1 md:flex md:w-auto"
541
- id="navbar-language"
542
- >
543
- <ul
544
- class="mt-4 flex flex-col rounded-lg border border-gray-100 bg-gray-50 p-4 font-medium md:mt-0 md:flex-row md:space-x-8 md:border-0 md:bg-white md:p-0 rtl:space-x-reverse dark:border-gray-700 dark:bg-gray-800 md:dark:bg-gray-900"
878
+ Settings
879
+ </a>
880
+ </li>
881
+ <li>
882
+ <a
883
+ class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
884
+ href="javascript:void(0)"
885
+ >
886
+ Earnings
887
+ </a>
888
+ </li>
889
+ </ul>
890
+ <div class="py-1">
891
+ <a
892
+ class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white"
893
+ href="javascript:void(0)"
545
894
  >
546
- <li>
547
- <a
548
- class="block rounded bg-blue-700 px-3 py-2 text-white md:bg-transparent md:p-0 md:text-blue-700 md:dark:text-blue-500"
549
- href="javascript:void(0)"
550
- aria-current="page"
551
- >
552
- Home
553
- </a>
554
- </li>
555
- <li>
556
- <a
557
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
558
- href="javascript:void(0)"
559
- >
560
- About
561
- </a>
562
- </li>
563
- <li>
564
- <a
565
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
566
- href="javascript:void(0)"
567
- >
568
- Services
569
- </a>
570
- </li>
571
- <li>
572
- <a
573
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
574
- href="javascript:void(0)"
575
- >
576
- Pricing
577
- </a>
578
- </li>
579
- <li>
580
- <a
581
- class="block rounded px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent md:dark:hover:text-blue-500"
582
- href="javascript:void(0)"
583
- >
584
- Contact
585
- </a>
586
- </li>
587
- </ul>
895
+ Sign out
896
+ </a>
588
897
  </div>
589
898
  </div>
590
- </nav>
899
+ </li>
591
900
  `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
592
901
  }] });
593
902
 
594
903
  class TooltipComponent {
595
904
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
596
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: TooltipComponent, isStandalone: true, selector: "lib-tooltip", ngImport: i0, template: `
905
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: TooltipComponent, isStandalone: true, selector: "sc-tooltip", ngImport: i0, template: `
597
906
  <p>tooltip works!</p>
598
907
  `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
599
908
  }
600
909
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: TooltipComponent, decorators: [{
601
910
  type: Component,
602
- args: [{ selector: 'lib-tooltip', standalone: true, imports: [CommonModule], template: `
911
+ args: [{ selector: 'sc-tooltip', standalone: true, imports: [CommonModule], template: `
603
912
  <p>tooltip works!</p>
604
913
  `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
605
914
  }] });
606
915
 
916
+ class SelectOptionComponent {
917
+ value;
918
+ disabled = false;
919
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
920
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: SelectOptionComponent, isStandalone: true, selector: "sc-select-option", inputs: { value: "value", disabled: "disabled" }, host: { attributes: { "role": "listbox" }, properties: { "attr.aria-label": "value", "class.disabled": "this.disabled" } }, ngImport: i0, template: `
921
+ <ng-content></ng-content>
922
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
923
+ }
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: SelectOptionComponent, decorators: [{
925
+ type: Component,
926
+ args: [{ selector: 'sc-select-option', standalone: true, imports: [CommonModule], template: `
927
+ <ng-content></ng-content>
928
+ `, host: {
929
+ role: 'listbox',
930
+ '[attr.aria-label]': 'value',
931
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
932
+ }], propDecorators: { value: [{
933
+ type: Input
934
+ }], disabled: [{
935
+ type: HostBinding,
936
+ args: ['class.disabled']
937
+ }, {
938
+ type: Input
939
+ }] } });
940
+
941
+ class SelectComponent {
942
+ cd;
943
+ domSanitizer;
944
+ overlay;
945
+ // eslint-disable-next-line @angular-eslint/no-input-rename
946
+ inputId = '';
947
+ label = '';
948
+ placeholder = '';
949
+ required = false;
950
+ disabled = false;
951
+ error = false;
952
+ multiple = false;
953
+ search = false;
954
+ ariaLabel = '';
955
+ ariaLabelledby = '';
956
+ // eslint-disable-next-line @angular-eslint/no-output-native
957
+ change = new EventEmitter();
958
+ select;
959
+ contentTemplate;
960
+ options;
961
+ displayText;
962
+ displayX = false;
963
+ //private readonly selectedOption: SelectOptionComponent;
964
+ showing = false;
965
+ showPlaceholder = true;
966
+ overlayRef;
967
+ constructor(cd, domSanitizer, overlay) {
968
+ this.cd = cd;
969
+ this.domSanitizer = domSanitizer;
970
+ this.overlay = overlay;
971
+ }
972
+ onChangeFn = (_) => noop();
973
+ onTouchedFn = () => noop();
974
+ registerOnChange(fn) {
975
+ this.onChangeFn = fn;
976
+ }
977
+ registerOnTouched(fn) {
978
+ this.onTouchedFn = fn;
979
+ }
980
+ validate(control) {
981
+ return null;
982
+ }
983
+ ngOnInit() {
984
+ if (!this.displayText) {
985
+ this.displayText = this.domSanitizer.bypassSecurityTrustHtml(this.placeholder);
986
+ }
987
+ }
988
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
989
+ writeValue(obj) { }
990
+ onTouched() {
991
+ this.onTouchedFn();
992
+ }
993
+ mainSelectClasses() {
994
+ return {
995
+ mainSelect: true,
996
+ error: this.error,
997
+ disabled: this.disabled,
998
+ placeholder: this.showPlaceholder,
999
+ };
1000
+ }
1001
+ onDropMenuIconClick(event) {
1002
+ if (!this.disabled) {
1003
+ event.stopPropagation();
1004
+ this.select.nativeElement.focus();
1005
+ this.select.nativeElement.click();
1006
+ }
1007
+ }
1008
+ onKeyDown(event) {
1009
+ console.log('onKeyDown');
1010
+ }
1011
+ showDropdown() {
1012
+ this.overlayRef = this.overlay.create(this.getOverlayConfig());
1013
+ this.overlayRef.attach(this.contentTemplate);
1014
+ this.syncWidth();
1015
+ this.overlayRef.backdropClick().subscribe(() => this.hide());
1016
+ this.showing = true;
1017
+ }
1018
+ hide() {
1019
+ this.overlayRef.detach();
1020
+ this.showing = false;
1021
+ }
1022
+ syncWidth() {
1023
+ if (!this.overlayRef) {
1024
+ return;
1025
+ }
1026
+ const refRectWidth = this.select.nativeElement.getBoundingClientRect().width;
1027
+ this.overlayRef.updateSize({ width: refRectWidth });
1028
+ }
1029
+ getOverlayConfig() {
1030
+ const positionStrategy = this.overlay
1031
+ .position()
1032
+ .flexibleConnectedTo(this.select.nativeElement)
1033
+ .withPush(true)
1034
+ .withPositions([
1035
+ {
1036
+ originX: 'start',
1037
+ originY: 'bottom',
1038
+ overlayX: 'start',
1039
+ overlayY: 'top',
1040
+ offsetY: 4,
1041
+ },
1042
+ {
1043
+ originX: 'start',
1044
+ originY: 'top',
1045
+ overlayX: 'start',
1046
+ overlayY: 'bottom',
1047
+ offsetY: -4,
1048
+ },
1049
+ ]);
1050
+ const scrollStrategy = this.overlay.scrollStrategies.reposition();
1051
+ return new OverlayConfig({
1052
+ positionStrategy: positionStrategy,
1053
+ scrollStrategy: scrollStrategy,
1054
+ hasBackdrop: true,
1055
+ backdropClass: 'cdk-overlay-transparent-backdrop',
1056
+ });
1057
+ }
1058
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: SelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.DomSanitizer }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
1059
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: SelectComponent, isStandalone: true, selector: "sc-select", inputs: { inputId: ["id", "inputId"], label: "label", placeholder: "placeholder", required: "required", disabled: "disabled", error: "error", multiple: "multiple", search: "search", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { change: "change" }, providers: [
1060
+ {
1061
+ provide: NG_VALUE_ACCESSOR,
1062
+ useExisting: forwardRef(() => SelectComponent),
1063
+ multi: true,
1064
+ },
1065
+ {
1066
+ provide: NG_VALIDATORS,
1067
+ multi: true,
1068
+ useExisting: SelectComponent,
1069
+ },
1070
+ ], queries: [{ propertyName: "options", predicate: SelectOptionComponent }], viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true }, { propertyName: "contentTemplate", first: true, predicate: CdkPortal, descendants: true }], ngImport: i0, template: `
1071
+ <div class="" [class.required]="required">
1072
+ @if (label.length > 0) {
1073
+ <p class="" [class.error]="error">{{ label }}</p>
1074
+ }
1075
+
1076
+ <div
1077
+ #select
1078
+ [ngClass]="mainSelectClasses()"
1079
+ [attr.id]="inputId"
1080
+ [attr.aria-label]="ariaLabel || null"
1081
+ [attr.aria-labelledby]="ariaLabelledby || null"
1082
+ [attr.aria-multiselectable]="false"
1083
+ [innerHTML]="displayText"
1084
+ (click)="showDropdown()"
1085
+ (keydown)="onKeyDown($event)"
1086
+ (blur)="onTouched()"
1087
+ role="listbox"
1088
+ tabindex="{{ this.disabled ? -1 : 0 }}"
1089
+ ></div>
1090
+ <button class="" (click)="onDropMenuIconClick($event)">test</button>
1091
+ <ng-template class="dropdown" #overlayTemplate="cdkPortal" cdk-portal>
1092
+ <div class="">
1093
+ <button class="" (keydown)="onKeyDown($event)">
1094
+ <ng-content />
1095
+ </button>
1096
+ </div>
1097
+ </ng-template>
1098
+ </div>
1099
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4.TemplatePortalDirective, selector: "[cdk-portal], [portal]", exportAs: ["cdkPortal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1100
+ }
1101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: SelectComponent, decorators: [{
1102
+ type: Component,
1103
+ args: [{ selector: 'sc-select', standalone: true, imports: [CommonModule, PortalModule], template: `
1104
+ <div class="" [class.required]="required">
1105
+ @if (label.length > 0) {
1106
+ <p class="" [class.error]="error">{{ label }}</p>
1107
+ }
1108
+
1109
+ <div
1110
+ #select
1111
+ [ngClass]="mainSelectClasses()"
1112
+ [attr.id]="inputId"
1113
+ [attr.aria-label]="ariaLabel || null"
1114
+ [attr.aria-labelledby]="ariaLabelledby || null"
1115
+ [attr.aria-multiselectable]="false"
1116
+ [innerHTML]="displayText"
1117
+ (click)="showDropdown()"
1118
+ (keydown)="onKeyDown($event)"
1119
+ (blur)="onTouched()"
1120
+ role="listbox"
1121
+ tabindex="{{ this.disabled ? -1 : 0 }}"
1122
+ ></div>
1123
+ <button class="" (click)="onDropMenuIconClick($event)">test</button>
1124
+ <ng-template class="dropdown" #overlayTemplate="cdkPortal" cdk-portal>
1125
+ <div class="">
1126
+ <button class="" (keydown)="onKeyDown($event)">
1127
+ <ng-content />
1128
+ </button>
1129
+ </div>
1130
+ </ng-template>
1131
+ </div>
1132
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1133
+ {
1134
+ provide: NG_VALUE_ACCESSOR,
1135
+ useExisting: forwardRef(() => SelectComponent),
1136
+ multi: true,
1137
+ },
1138
+ {
1139
+ provide: NG_VALIDATORS,
1140
+ multi: true,
1141
+ useExisting: SelectComponent,
1142
+ },
1143
+ ] }]
1144
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.DomSanitizer }, { type: i2.Overlay }], propDecorators: { inputId: [{
1145
+ type: Input,
1146
+ args: ['id']
1147
+ }], label: [{
1148
+ type: Input
1149
+ }], placeholder: [{
1150
+ type: Input
1151
+ }], required: [{
1152
+ type: Input
1153
+ }], disabled: [{
1154
+ type: Input
1155
+ }], error: [{
1156
+ type: Input
1157
+ }], multiple: [{
1158
+ type: Input
1159
+ }], search: [{
1160
+ type: Input
1161
+ }], ariaLabel: [{
1162
+ type: Input,
1163
+ args: ['aria-label']
1164
+ }], ariaLabelledby: [{
1165
+ type: Input,
1166
+ args: ['aria-labelledby']
1167
+ }], change: [{
1168
+ type: Output
1169
+ }], select: [{
1170
+ type: ViewChild,
1171
+ args: ['select']
1172
+ }], contentTemplate: [{
1173
+ type: ViewChild,
1174
+ args: [CdkPortal]
1175
+ }], options: [{
1176
+ type: ContentChildren,
1177
+ args: [SelectOptionComponent]
1178
+ }] } });
1179
+
607
1180
  /**
608
1181
  * Generated bundle index. Do not edit.
609
1182
  */
610
1183
 
611
- export { DatePickerComponent, EditorComponent, NavbarComponent, TooltipComponent };
1184
+ export { DatePickerComponent, DropdownComponent, DropdownDividerComponent, DropdownItemComponent, EditorComponent, InlineDatePickerComponent, NavComponent, NavItemComponent, NavItemDropdownComponent, SelectComponent, SelectOptionComponent, TooltipComponent };
612
1185
  //# sourceMappingURL=semantic-components-ui.mjs.map