accomadesc 0.0.13 → 0.1.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 (69) hide show
  1. package/dist/AccoCard.svelte +1 -1
  2. package/dist/AccoCard.svelte.d.ts +3 -2
  3. package/dist/AccoDescription.svelte +1 -1
  4. package/dist/AccoDescription.svelte.d.ts +3 -2
  5. package/dist/AmenitiesCore.svelte +3 -3
  6. package/dist/AmenitiesCore.svelte.d.ts +3 -2
  7. package/dist/BookingRequest.svelte +272 -0
  8. package/dist/BookingRequest.svelte.d.ts +5 -0
  9. package/dist/Calendar.svelte +26 -13
  10. package/dist/Calendar.svelte.d.ts +3 -2
  11. package/dist/CalendarAvailable.svelte +12 -19
  12. package/dist/CalendarAvailable.svelte.d.ts +3 -2
  13. package/dist/CalendarGrid.svelte +22 -0
  14. package/dist/CalendarGrid.svelte.d.ts +5 -0
  15. package/dist/CalendarRows.svelte +22 -0
  16. package/dist/CalendarRows.svelte.d.ts +5 -0
  17. package/dist/ContactForm.svelte +180 -0
  18. package/dist/ContactForm.svelte.d.ts +5 -0
  19. package/dist/LeafletMap.svelte +1 -1
  20. package/dist/LeafletMap.svelte.d.ts +1 -1
  21. package/dist/Photo.svelte +1 -1
  22. package/dist/Photo.svelte.d.ts +3 -2
  23. package/dist/PhotoGallery.svelte +89 -35
  24. package/dist/PhotoGallery.svelte.d.ts +3 -2
  25. package/dist/Pricing.svelte +1 -1
  26. package/dist/Pricing.svelte.d.ts +3 -2
  27. package/dist/PricingShort.svelte +1 -1
  28. package/dist/PricingShort.svelte.d.ts +3 -2
  29. package/dist/Section.svelte +1 -1
  30. package/dist/Section.svelte.d.ts +3 -2
  31. package/dist/Text.svelte +1 -1
  32. package/dist/Text.svelte.d.ts +3 -2
  33. package/dist/Weather.svelte +2 -3
  34. package/dist/Weather.svelte.d.ts +3 -2
  35. package/dist/basic/Avatar.svelte.d.ts +3 -2
  36. package/dist/basic/Button.svelte +6 -3
  37. package/dist/basic/Button.svelte.d.ts +4 -3
  38. package/dist/basic/Icon.svelte.d.ts +3 -2
  39. package/dist/basic/Notes.svelte +83 -0
  40. package/dist/basic/Notes.svelte.d.ts +7 -0
  41. package/dist/basic/Spinner.svelte.d.ts +3 -2
  42. package/dist/basic/TextInput.svelte.d.ts +3 -2
  43. package/dist/helpers/debounce.d.ts +7 -0
  44. package/dist/helpers/debounce.js +49 -0
  45. package/dist/helpers/iCSEventExample.ics +14 -0
  46. package/dist/helpers/normalizeDate.d.ts +2 -0
  47. package/dist/helpers/normalizeDate.js +53 -0
  48. package/dist/helpers/readICS.d.ts +7 -0
  49. package/dist/helpers/readICS.js +94 -0
  50. package/dist/index.d.ts +2 -2
  51. package/dist/index.js +1 -1
  52. package/dist/names/gen.js +3 -3
  53. package/dist/occuplan/OccuPlanAvailableInfo.svelte +38 -0
  54. package/dist/occuplan/OccuPlanAvailableInfo.svelte.d.ts +12 -0
  55. package/dist/occuplan/OccuPlanGrid.svelte +356 -0
  56. package/dist/occuplan/OccuPlanGrid.svelte.d.ts +13 -0
  57. package/dist/occuplan/OccuPlanPicker.svelte +559 -0
  58. package/dist/occuplan/OccuPlanPicker.svelte.d.ts +16 -0
  59. package/dist/occuplan/OccuPlanRows.svelte +360 -0
  60. package/dist/occuplan/OccuPlanRows.svelte.d.ts +13 -0
  61. package/dist/occuplan/OccuPlanWrapper.svelte +113 -0
  62. package/dist/occuplan/OccuPlanWrapper.svelte.d.ts +5 -0
  63. package/dist/occuplan/state.svelte.d.ts +90 -0
  64. package/dist/occuplan/state.svelte.js +383 -0
  65. package/dist/svg/ExtLinkSVG.svelte.d.ts +3 -2
  66. package/dist/svg/LinkSVG.svelte.d.ts +3 -2
  67. package/dist/types.d.ts +75 -4
  68. package/dist/types.js +20 -0
  69. package/package.json +64 -61
@@ -0,0 +1,180 @@
1
+ <script lang="ts">
2
+ import Spinner from './basic/Spinner.svelte';
3
+ import Button from './basic/Button.svelte';
4
+ import TextInput from './basic/TextInput.svelte';
5
+ import Notes from './basic/Notes.svelte';
6
+ import type { ContactFormContent, I18nFacade } from './types.js';
7
+
8
+ const {
9
+ userID,
10
+ endpoint,
11
+ explainer,
12
+ emailLabel,
13
+ nameLabel,
14
+ questionLabel,
15
+ submitText,
16
+ successfullySentText,
17
+ sentErroredText,
18
+ maxCharsAllowed = 300,
19
+ translateFunc,
20
+ }: ContactFormContent & I18nFacade = $props();
21
+
22
+ let name = $state('');
23
+ let email = $state('');
24
+ let question = $state('');
25
+ let successfullySent = $state(false);
26
+ let sending = $state(false);
27
+ let errored = $state(false);
28
+
29
+ const questionChanged = (value: string) => {
30
+ question = value;
31
+ };
32
+
33
+ let currentCharsCount = $derived(question.length);
34
+ let showMaxCharsMessage = $derived(currentCharsCount > maxCharsAllowed - 50);
35
+ let canSubmit: boolean = $derived(
36
+ name.length > 0 &&
37
+ email.length > 0 &&
38
+ question.length > 0 &&
39
+ question.length <= maxCharsAllowed,
40
+ );
41
+
42
+ const submitMessage = async (e: Event) => {
43
+ sending = true;
44
+ e.preventDefault();
45
+
46
+ try {
47
+ const response = await fetch(endpoint, {
48
+ method: 'POST',
49
+ headers: {
50
+ 'Content-Type': 'application/json',
51
+ },
52
+ body: JSON.stringify({
53
+ userID: userID,
54
+ email: email,
55
+ name: name,
56
+ question: question,
57
+ }),
58
+ });
59
+ if (response.status != 201) {
60
+ errored = true;
61
+ console.log('Error sending mail', response.status, response.statusText);
62
+ } else {
63
+ successfullySent = true;
64
+ }
65
+ } catch (e) {
66
+ console.log('An error occurred:', e);
67
+ errored = true;
68
+ }
69
+ sending = false;
70
+
71
+ setTimeout(() => {
72
+ errored = false;
73
+ successfullySent = false;
74
+ }, 15000);
75
+ };
76
+
77
+ let disabled = $derived(errored || successfullySent);
78
+ </script>
79
+
80
+ <div class="wrapper">
81
+ {#if explainer}
82
+ <div class="explainer">{@html translateFunc ? translateFunc(explainer) : ''}</div>
83
+ {/if}
84
+ <form onsubmit={submitMessage}>
85
+ <input type="hidden" value={userID} />
86
+ <label class:disabled>
87
+ {@html translateFunc ? translateFunc(nameLabel) : 'Name'}:
88
+ <TextInput type="text" marginForMessage={false} bind:value={name} enabled={!disabled} />
89
+ </label>
90
+ <label class:disabled>
91
+ {@html translateFunc ? translateFunc(emailLabel) : 'Email'}:
92
+ <TextInput type="email" marginForMessage={false} bind:value={email} enabled={!disabled} />
93
+ </label>
94
+ <label class="row-label"
95
+ ><div class:disabled>
96
+ {@html translateFunc
97
+ ? translateFunc(questionLabel)
98
+ : 'Your Message'}{#if showMaxCharsMessage}<span class="max-chars-message"
99
+ >&nbsp;({currentCharsCount}/{maxCharsAllowed})</span
100
+ >{/if}:
101
+ </div>
102
+
103
+ <Notes {disabled} changed={questionChanged} />
104
+ </label>
105
+ {#if successfullySent}
106
+ <div class="success">
107
+ {translateFunc ? translateFunc(successfullySentText) : 'Successfully Sent Email'}
108
+ </div>
109
+ {/if}
110
+ {#if errored}
111
+ <div class="error">
112
+ {translateFunc ? translateFunc(sentErroredText) : 'Error Occurred Sending Email'}
113
+ </div>
114
+ {/if}
115
+ <div class="button-wrapper">
116
+ <Button
117
+ enabled={canSubmit && !disabled}
118
+ text={translateFunc ? translateFunc(submitText) : 'Submit'}
119
+ type="submit"
120
+ />
121
+ </div>
122
+ </form>
123
+ {#if sending}
124
+ <Spinner />
125
+ {/if}
126
+ </div>
127
+
128
+ <style>
129
+ .wrapper {
130
+ background-color: var(--main-bg-color);
131
+ color: var(--main-font-color);
132
+
133
+ width: 100%;
134
+ display: flex;
135
+
136
+ padding: 1rem;
137
+ margin: 1rem;
138
+ :global(*) {
139
+ color: var(--main-font-color);
140
+ }
141
+ }
142
+
143
+ form {
144
+ width: 100%;
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: 0.5rem;
148
+ }
149
+
150
+ label {
151
+ display: flex;
152
+ gap: 1rem;
153
+ align-items: center;
154
+ justify-content: space-between;
155
+ }
156
+
157
+ .row-label {
158
+ flex-direction: column;
159
+ gap: 0.2rem;
160
+ }
161
+
162
+ .max-chars-message {
163
+ font-weight: bolder;
164
+ color: var(--alert-font-color);
165
+ }
166
+
167
+ .success {
168
+ color: var(--accept-font-color);
169
+ font-weight: bolder;
170
+ }
171
+
172
+ .error {
173
+ color: var(--alert-font-color);
174
+ font-weight: bolder;
175
+ }
176
+
177
+ .disabled {
178
+ color: var(--font-disabled-color);
179
+ }
180
+ </style>
@@ -0,0 +1,5 @@
1
+ import type { ContactFormContent, I18nFacade } from './types.js';
2
+ type $$ComponentProps = ContactFormContent & I18nFacade;
3
+ declare const ContactForm: import("svelte").Component<$$ComponentProps, {}, "">;
4
+ type ContactForm = ReturnType<typeof ContactForm>;
5
+ export default ContactForm;
@@ -5,7 +5,7 @@
5
5
  import 'leaflet/dist/images/marker-icon.png';
6
6
 
7
7
  import { onMount, onDestroy } from 'svelte';
8
- import type { LeafletMapContent } from './types.ts';
8
+ import type { LeafletMapContent } from './types.js';
9
9
 
10
10
  let { lat, long, zoom, address = 'Achterstr. 4, 17459 Koserow' }: LeafletMapContent = $props();
11
11
 
@@ -1,7 +1,7 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
2
  import 'leaflet/dist/images/marker-shadow.png';
3
3
  import 'leaflet/dist/images/marker-icon.png';
4
- import type { LeafletMapContent } from './types.ts';
4
+ import type { LeafletMapContent } from './types.js';
5
5
  declare const LeafletMap: import("svelte").Component<LeafletMapContent, {}, "">;
6
6
  type LeafletMap = ReturnType<typeof LeafletMap>;
7
7
  export default LeafletMap;
package/dist/Photo.svelte CHANGED
@@ -2,7 +2,7 @@
2
2
  import LinkSvg from './svg/LinkSVG.svelte';
3
3
  import ExtLinkSvg from './svg/ExtLinkSVG.svelte';
4
4
  import { TwicImg } from '@twicpics/components/svelte5';
5
- import type { PhotoContent, I18nFacade } from './types.ts';
5
+ import type { PhotoContent, I18nFacade } from './types.js';
6
6
 
7
7
  let {
8
8
  alt,
@@ -1,4 +1,5 @@
1
- import type { PhotoContent, I18nFacade } from './types.ts';
2
- declare const Photo: import("svelte").Component<PhotoContent & I18nFacade, {}, "">;
1
+ import type { PhotoContent, I18nFacade } from './types.js';
2
+ type $$ComponentProps = PhotoContent & I18nFacade;
3
+ declare const Photo: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type Photo = ReturnType<typeof Photo>;
4
5
  export default Photo;
@@ -1,7 +1,9 @@
1
1
  <script lang="ts">
2
+ import Button from './basic/Button.svelte';
2
3
  import PhotoComponent from './Photo.svelte';
3
- import type { I18nFacade, Photo, PhotoGalleryContent, GridPhoto } from './types.ts';
4
+ import type { I18nFacade, Photo, PhotoGalleryContent } from './types.js';
4
5
  import { browser } from '$app/environment';
6
+ import { slide } from 'svelte/transition';
5
7
 
6
8
  let { photos, gridPhotoWidth = 300, translateFunc }: PhotoGalleryContent & I18nFacade = $props();
7
9
 
@@ -13,42 +15,48 @@
13
15
  };
14
16
  }
15
17
  let ratio = $derived(landscape ? '16/9' : '9/16');
16
-
17
18
  let galleryContainer: HTMLDivElement | undefined = $state();
18
19
 
19
- let gridPhotos: GridPhoto[] = $state(
20
- photos.map((p: Photo): GridPhoto => {
21
- return {
22
- photo: p,
23
- zoomed: false,
24
- id: crypto.randomUUID(),
25
- };
26
- }),
27
- );
28
-
29
20
  let width = $state(1000);
30
21
  let numberOfCols = $derived(
31
22
  Math.floor(width / (gridPhotoWidth && Number.isInteger(gridPhotoWidth) ? gridPhotoWidth : 300)),
32
23
  );
33
24
 
34
- const zoom = (z: GridPhoto, i: number) => {
35
- let unzoom = false;
36
- if (z.zoomed) {
37
- unzoom = true;
38
- }
25
+ let zoomed: number | null = $state(0);
26
+ let zoomedPhoto: Photo | null = $derived(zoomed != null ? photos[zoomed] : null);
39
27
 
40
- gridPhotos.forEach((p: GridPhoto) => (p.zoomed = false));
41
- gridPhotos.splice(i, 1);
42
-
43
- if (!unzoom) {
44
- z.zoomed = true;
45
- }
46
- gridPhotos = [z, ...gridPhotos];
28
+ const zoom = (i: number) => {
29
+ zoomed = i;
30
+ setTimeout(() => {
31
+ galleryContainer?.scrollIntoView({ behavior: 'smooth' });
32
+ }, 100);
33
+ };
47
34
 
35
+ const unzoom = () => {
36
+ zoomed = null;
48
37
  setTimeout(() => {
49
- galleryContainer?.scrollIntoView();
38
+ galleryContainer?.scrollIntoView({ behavior: 'smooth' });
50
39
  }, 100);
51
40
  };
41
+
42
+ const zoomNext = () => {
43
+ if (zoomed != null) {
44
+ if (zoomed == photos.length - 1) {
45
+ zoomed = 0;
46
+ } else {
47
+ zoomed = zoomed + 1;
48
+ }
49
+ }
50
+ };
51
+ const zoomPrev = () => {
52
+ if (zoomed != null) {
53
+ if (zoomed == 0) {
54
+ zoomed = photos.length - 1;
55
+ } else {
56
+ zoomed = zoomed - 1;
57
+ }
58
+ }
59
+ };
52
60
  </script>
53
61
 
54
62
  <div
@@ -59,27 +67,72 @@
59
67
  class="grid-container"
60
68
  bind:clientWidth={width}
61
69
  >
62
- {#each gridPhotos as p, i (p.id)}
70
+ {#if zoomed != null && zoomedPhoto != null}
63
71
  <div
64
- class:complete-row={p.zoomed}
72
+ transition:slide
65
73
  aria-label="resize"
66
74
  role="button"
67
75
  tabindex="-1"
68
- onclick={() => zoom(p, i)}
69
- onkeyup={() => zoom(p, i)}
76
+ onclick={() => unzoom()}
77
+ onkeyup={() => unzoom()}
78
+ class="photo-container complete-row"
79
+ >
80
+ <PhotoComponent {...zoomedPhoto.content} frame={true} {ratio} {translateFunc} />
81
+
82
+ <div class="next-wrapper" style="">
83
+ <Button
84
+ text=">"
85
+ size={3.3}
86
+ fontSize="3rem"
87
+ clicked={() => zoomNext()}
88
+ stopPropagation={true}
89
+ />
90
+ </div>
91
+ <div class="prev-wrapper">
92
+ <Button
93
+ text="<"
94
+ size={3.3}
95
+ fontSize="3rem"
96
+ clicked={() => zoomPrev()}
97
+ stopPropagation={true}
98
+ />
99
+ </div>
100
+ </div>
101
+ {/if}
102
+
103
+ {#each photos as p, i (p.id)}
104
+ <div
105
+ aria-label="resize"
106
+ role="button"
107
+ tabindex="-1"
108
+ onclick={() => zoom(i)}
109
+ onkeyup={() => zoom(i)}
70
110
  class="photo-container"
71
111
  >
72
- <PhotoComponent
73
- {...p.photo.content}
74
- frame={true}
75
- ratio={p.zoomed ? ratio : '1'}
76
- {translateFunc}
77
- />
112
+ <PhotoComponent {...p.content} frame={true} ratio="1" {translateFunc} />
78
113
  </div>
79
114
  {/each}
80
115
  </div>
81
116
 
82
117
  <style>
118
+ .next-wrapper {
119
+ position: absolute;
120
+ right: 1rem;
121
+ top: calc(50% - 1.65rem);
122
+
123
+ --bg-button-prim-color: rgba(242, 242, 242, 0.3);
124
+ --main-font-color: rgba(15, 14, 15, 0.6);
125
+ }
126
+
127
+ .prev-wrapper {
128
+ position: absolute;
129
+ left: 1rem;
130
+ top: calc(50% - 1.65rem);
131
+
132
+ --bg-button-prim-color: rgba(242, 242, 242, 0.3);
133
+ --main-font-color: rgba(15, 14, 15, 0.6);
134
+ }
135
+
83
136
  .complete-row {
84
137
  grid-column-start: firstLine;
85
138
  grid-column-end: lastLine;
@@ -91,6 +144,7 @@
91
144
  cursor: pointer;
92
145
  width: 100%;
93
146
  height: 100%;
147
+ position: relative;
94
148
  }
95
149
 
96
150
  .grid-container {
@@ -1,4 +1,5 @@
1
- import type { I18nFacade, PhotoGalleryContent } from './types.ts';
2
- declare const PhotoGallery: import("svelte").Component<PhotoGalleryContent & I18nFacade, {}, "">;
1
+ import type { I18nFacade, PhotoGalleryContent } from './types.js';
2
+ type $$ComponentProps = PhotoGalleryContent & I18nFacade;
3
+ declare const PhotoGallery: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type PhotoGallery = ReturnType<typeof PhotoGallery>;
4
5
  export default PhotoGallery;
@@ -7,7 +7,7 @@
7
7
  StaticPricingRange,
8
8
  PricingEntry,
9
9
  PricingColumn,
10
- } from './types.ts';
10
+ } from './types.js';
11
11
  import type { Dinero, DineroSnapshot } from 'dinero.js';
12
12
 
13
13
  let filteredRanges: PricingRange[] = $state([]);
@@ -1,4 +1,5 @@
1
- import type { PricingContent, I18nFacade } from './types.ts';
2
- declare const Pricing: import("svelte").Component<PricingContent & I18nFacade, {}, "">;
1
+ import type { PricingContent, I18nFacade } from './types.js';
2
+ type $$ComponentProps = PricingContent & I18nFacade;
3
+ declare const Pricing: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type Pricing = ReturnType<typeof Pricing>;
4
5
  export default Pricing;
@@ -2,7 +2,7 @@
2
2
  import { DateTime } from 'luxon';
3
3
  import { add, allocate, dinero, multiply, greaterThan, lessThan, type Dinero } from 'dinero.js';
4
4
  import { EUR } from '@dinero.js/currencies';
5
- import type { I18nFacade, PricingShortContent, PricingEntry } from './types.ts';
5
+ import type { I18nFacade, PricingShortContent, PricingEntry } from './types.js';
6
6
 
7
7
  let {
8
8
  global = undefined,
@@ -1,4 +1,5 @@
1
- import type { I18nFacade, PricingShortContent } from './types.ts';
2
- declare const PricingShort: import("svelte").Component<PricingShortContent & I18nFacade, {}, "">;
1
+ import type { I18nFacade, PricingShortContent } from './types.js';
2
+ type $$ComponentProps = PricingShortContent & I18nFacade;
3
+ declare const PricingShort: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type PricingShort = ReturnType<typeof PricingShort>;
4
5
  export default PricingShort;
@@ -27,7 +27,7 @@
27
27
  isPricingShort,
28
28
  isAccoDescription,
29
29
  isAccoCard,
30
- } from './types.ts';
30
+ } from './types.js';
31
31
 
32
32
  let {
33
33
  header = undefined,
@@ -1,4 +1,5 @@
1
- import { type Section as SectionI, type I18nFacade } from './types.ts';
2
- declare const Section: import("svelte").Component<SectionI & I18nFacade, {}, "padding">;
1
+ import { type Section as SectionI, type I18nFacade } from './types.js';
2
+ type $$ComponentProps = SectionI & I18nFacade;
3
+ declare const Section: import("svelte").Component<$$ComponentProps, {}, "padding">;
3
4
  type Section = ReturnType<typeof Section>;
4
5
  export default Section;
package/dist/Text.svelte CHANGED
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { TextContent, I18nFacade } from './types.ts';
2
+ import type { TextContent, I18nFacade } from './types.js';
3
3
 
4
4
  let {
5
5
  ref,
@@ -1,4 +1,5 @@
1
- import type { TextContent, I18nFacade } from './types.ts';
2
- declare const Text: import("svelte").Component<TextContent & I18nFacade, {}, "">;
1
+ import type { TextContent, I18nFacade } from './types.js';
2
+ type $$ComponentProps = TextContent & I18nFacade;
3
+ declare const Text: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type Text = ReturnType<typeof Text>;
4
5
  export default Text;
@@ -1,15 +1,14 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
3
  import { browser } from '$app/environment';
4
- import type { I18nFacade, WeatherContent } from './types.ts';
4
+ import type { I18nFacade, WeatherContent } from './types.js';
5
5
 
6
6
  let { header1, header2, location, translateFunc, currentLang }: WeatherContent & I18nFacade =
7
7
  $props();
8
8
 
9
9
  const callback = () => {
10
10
  //TODO maybe do something here
11
- // probably build something custom, not using weatherwidget.io, yes maptiler might be good option
12
- //
11
+ // probably build something custom, not using weatherwidget.io
13
12
  //console.log("weather script loaded")
14
13
  initialLoadDone = true;
15
14
  };
@@ -1,4 +1,5 @@
1
- import type { I18nFacade, WeatherContent } from './types.ts';
2
- declare const Weather: import("svelte").Component<WeatherContent & I18nFacade, {}, "">;
1
+ import type { I18nFacade, WeatherContent } from './types.js';
2
+ type $$ComponentProps = WeatherContent & I18nFacade;
3
+ declare const Weather: import("svelte").Component<$$ComponentProps, {}, "">;
3
4
  type Weather = ReturnType<typeof Weather>;
4
5
  export default Weather;
@@ -1,7 +1,8 @@
1
- declare const Avatar: import("svelte").Component<{
1
+ type $$ComponentProps = {
2
2
  email: string;
3
3
  size?: number;
4
4
  imageUrl?: string;
5
- }, {}, "imageUrl">;
5
+ };
6
+ declare const Avatar: import("svelte").Component<$$ComponentProps, {}, "imageUrl">;
6
7
  type Avatar = ReturnType<typeof Avatar>;
7
8
  export default Avatar;
@@ -41,7 +41,7 @@
41
41
  clicked?: (event: Event) => void;
42
42
  } = $props();
43
43
 
44
- const disabled = $derived(!enabled);
44
+ let disabled = $derived(!enabled);
45
45
 
46
46
  const onClick = (event: Event) => {
47
47
  if (stopPropagation) {
@@ -50,7 +50,7 @@
50
50
  if (enabled) onclicked(event);
51
51
  };
52
52
 
53
- let focussed = false;
53
+ let focussed = $state(false);
54
54
  const focussing = (event: Event) => {
55
55
  if (stopPropagation) {
56
56
  event.stopPropagation();
@@ -277,7 +277,7 @@
277
277
  align-items: center;
278
278
 
279
279
  background-color: var(--bg-button-prim-color);
280
- color: var(--font-prim-color);
280
+ color: var(--main-font-color);
281
281
 
282
282
  cursor: pointer;
283
283
  overflow: hidden;
@@ -288,6 +288,7 @@
288
288
  }
289
289
  .button:focus {
290
290
  outline-style: none;
291
+ filter: drop-shadow(0 0 0.75rem var(--focussed-border-color));
291
292
  }
292
293
 
293
294
  .button.danger {
@@ -310,6 +311,8 @@
310
311
  vertical-align: middle;
311
312
  font-variant: small-caps;
312
313
 
314
+ color: var(--main-font-color);
315
+
313
316
  margin-left: 0.4rem;
314
317
  margin-right: 0.4rem;
315
318
  }
@@ -1,9 +1,9 @@
1
- declare const Button: import("svelte").Component<{
1
+ type $$ComponentProps = {
2
2
  text?: string | null;
3
3
  iconName?: string;
4
4
  ariaLabel?: string;
5
5
  form?: string | null;
6
- type?: "button" | "submit" | "reset";
6
+ type?: 'button' | 'submit' | 'reset';
7
7
  stopPropagation?: boolean;
8
8
  pressed?: boolean;
9
9
  fontSize?: string;
@@ -15,6 +15,7 @@ declare const Button: import("svelte").Component<{
15
15
  onUp?: boolean;
16
16
  preventDefault?: boolean;
17
17
  clicked?: (event: Event) => void;
18
- }, {}, "enabled">;
18
+ };
19
+ declare const Button: import("svelte").Component<$$ComponentProps, {}, "enabled">;
19
20
  type Button = ReturnType<typeof Button>;
20
21
  export default Button;
@@ -1,8 +1,9 @@
1
- declare const Icon: import("svelte").Component<{
1
+ type $$ComponentProps = {
2
2
  color?: string;
3
3
  iconName: string;
4
4
  width?: string;
5
5
  height?: string;
6
- }, {}, "">;
6
+ };
7
+ declare const Icon: import("svelte").Component<$$ComponentProps, {}, "">;
7
8
  type Icon = ReturnType<typeof Icon>;
8
9
  export default Icon;