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.
@@ -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 hideNavigation}
109
- <div class="text-xxs @min-[15em]:text-sm @min-[35em]:text-lg @min-[45em]:text-xl text-center">
110
- {DateFormatAny('MMMM YYYY', baseDate) ?? ''}
111
- </div>
110
+ {#if navigator}
111
+ {@render navigator()}
112
112
  {:else}
113
- <div class="grid grid-cols-[1fr_3fr_2fr_1fr] gap-1 [&_*]:text-xxs [&_*]:@min-[15em]:text-sm [&_*]:@min-[35em]:text-lg [&_*]:@min-[45em]:text-xl">
114
- <button
115
- class="btnLink"
116
- onclick={() => setDate(DateOnly(baseDate, selectRange === 'Week' ? {weeks: -1} : {months: -1}), false)}>
117
- &#9664;
118
- </button>
119
- <select
120
- class="border-none !p-0 w-full !bg-transparent dark:text-slate-100 text-center appearance-none"
121
- style="background: none;"
122
- onchange={e => setDate(DateOnly(baseDate, {months: CleanSubtractNumbers(0, e.target?.value, currentMonth)}), false)}>
123
- {#each MonthNames as month, idx (month)}
124
- <option value={idx + 1} selected={currentMonth === idx + 1}>{month}</option>
125
- {/each}
126
- </select>
127
- <select
128
- class="border-none !p-0 w-full !bg-transparent dark:text-slate-100 text-center appearance-none"
129
- style="background: none;"
130
- onchange={e => setDate(DateOnly(baseDate, {years: CleanSubtractNumbers(0, e.target?.value, currentYear)}), false)}>
131
- {#each years as year (year)}
132
- <option value={year} selected={currentYear === year}>{year}</option>
133
- {/each}
134
- </select>
135
- <button
136
- class="btnLink"
137
- onclick={() => setDate(DateOnly(baseDate, selectRange === 'Week' ? {weeks: 1} : {months: 1}), false)}>
138
- &#9654;
139
- </button>
140
- </div>
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
+ &#9664;
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
+ &#9654;
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>
@@ -12,6 +12,7 @@ type $$ComponentProps = {
12
12
  fyMonthsAdjust?: number | null;
13
13
  class?: string;
14
14
  dayBlock?: Snippet<[IWeek['days'][number], IWeek]>;
15
+ navigator?: Snippet;
15
16
  hideNavigation?: boolean;
16
17
  disabled?: boolean;
17
18
  };
@@ -83,7 +83,7 @@
83
83
 
84
84
  </script>
85
85
 
86
- <div class="relative">
86
+ <div class="relative h-fit">
87
87
 
88
88
  {#if !noMagnifyingGlass}
89
89
  <div class="absolute left-1 top-1/2 -translate-y-1/2 text-slate-300 pointer-events-none">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.3.62",
3
+ "version": "0.3.64",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",