intelliwaketssveltekitv25 0.3.62 → 0.3.64
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.
- package/dist/Calendar.svelte +39 -32
- package/dist/Calendar.svelte.d.ts +1 -0
- package/dist/Search.svelte +1 -1
- package/package.json +1 -1
package/dist/Calendar.svelte
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
class: clazz = '',
|
|
33
33
|
dayBlock,
|
|
34
34
|
hideNavigation,
|
|
35
|
+
navigator,
|
|
35
36
|
disabled
|
|
36
37
|
}: {
|
|
37
38
|
baseDate?: string
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
fyMonthsAdjust?: number | null,
|
|
46
47
|
class?: string,
|
|
47
48
|
dayBlock?: Snippet<[IWeek['days'][number], IWeek]>,
|
|
49
|
+
navigator?: Snippet,
|
|
48
50
|
hideNavigation?: boolean,
|
|
49
51
|
disabled?: boolean
|
|
50
52
|
} = $props()
|
|
@@ -105,39 +107,44 @@
|
|
|
105
107
|
style="container-type: size; {!maxWidth ? undefined : `max-width: ${maxWidth} !important; aspect-ratio: 3/2;`}">
|
|
106
108
|
<div
|
|
107
109
|
class="@container grid grid-rows-[auto_auto_1fr] aspect-[3/2] h-auto max-w-full max-h-full min-w-0 min-h-0 w-[min(100cqw,calc(1.5*100cqh))] text-xs {clazz}">
|
|
108
|
-
{#if
|
|
109
|
-
|
|
110
|
-
{DateFormatAny('MMMM YYYY', baseDate) ?? ''}
|
|
111
|
-
</div>
|
|
110
|
+
{#if navigator}
|
|
111
|
+
{@render navigator()}
|
|
112
112
|
{:else}
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
113
|
+
{#if hideNavigation}
|
|
114
|
+
<div class="text-xxs @min-[15em]:text-sm @min-[35em]:text-lg @min-[45em]:text-xl text-center">
|
|
115
|
+
{DateFormatAny('MMMM YYYY', baseDate) ?? ''}
|
|
116
|
+
</div>
|
|
117
|
+
{:else}
|
|
118
|
+
<div
|
|
119
|
+
class="grid grid-cols-[1fr_3fr_2fr_1fr] gap-1 [&_*]:text-xxs [&_*]:@min-[15em]:text-sm [&_*]:@min-[35em]:text-lg [&_*]:@min-[45em]:text-xl">
|
|
120
|
+
<button
|
|
121
|
+
class="btnLink"
|
|
122
|
+
onclick={() => setDate(DateOnly(baseDate, selectRange === 'Week' ? {weeks: -1} : {months: -1}), false)}>
|
|
123
|
+
◀
|
|
124
|
+
</button>
|
|
125
|
+
<select
|
|
126
|
+
class="border-none !p-0 w-full !bg-transparent dark:text-slate-100 text-center appearance-none"
|
|
127
|
+
style="background: none;"
|
|
128
|
+
onchange={e => setDate(DateOnly(baseDate, {months: CleanSubtractNumbers(0, e.target?.value, currentMonth)}), false)}>
|
|
129
|
+
{#each MonthNames as month, idx (month)}
|
|
130
|
+
<option value={idx + 1} selected={currentMonth === idx + 1}>{month}</option>
|
|
131
|
+
{/each}
|
|
132
|
+
</select>
|
|
133
|
+
<select
|
|
134
|
+
class="border-none !p-0 w-full !bg-transparent dark:text-slate-100 text-center appearance-none"
|
|
135
|
+
style="background: none;"
|
|
136
|
+
onchange={e => setDate(DateOnly(baseDate, {years: CleanSubtractNumbers(0, e.target?.value, currentYear)}), false)}>
|
|
137
|
+
{#each years as year (year)}
|
|
138
|
+
<option value={year} selected={currentYear === year}>{year}</option>
|
|
139
|
+
{/each}
|
|
140
|
+
</select>
|
|
141
|
+
<button
|
|
142
|
+
class="btnLink"
|
|
143
|
+
onclick={() => setDate(DateOnly(baseDate, selectRange === 'Week' ? {weeks: 1} : {months: 1}), false)}>
|
|
144
|
+
▶
|
|
145
|
+
</button>
|
|
146
|
+
</div>
|
|
147
|
+
{/if}
|
|
141
148
|
{/if}
|
|
142
149
|
<div class="grid grid-cols-7 border text-center text-xs @min-[25em]:text-md @min-[35em]:text-lg py-1">
|
|
143
150
|
<div>S</div>
|
package/dist/Search.svelte
CHANGED