@svar-ui/svelte-calendar 2.6.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 (82) hide show
  1. package/dist/Demo.svelte +7 -0
  2. package/dist/Demo.svelte.d.ts +26 -0
  3. package/dist/components/AddEventButton.svelte +12 -0
  4. package/dist/components/AddEventButton.svelte.d.ts +18 -0
  5. package/dist/components/Calendar.svelte +110 -0
  6. package/dist/components/Calendar.svelte.d.ts +153 -0
  7. package/dist/components/CalendarPanel.svelte +147 -0
  8. package/dist/components/CalendarPanel.svelte.d.ts +18 -0
  9. package/dist/components/ContextMenu.svelte +87 -0
  10. package/dist/components/ContextMenu.svelte.d.ts +17 -0
  11. package/dist/components/DateLabel.svelte +13 -0
  12. package/dist/components/DateLabel.svelte.d.ts +18 -0
  13. package/dist/components/DateNav.svelte +31 -0
  14. package/dist/components/DateNav.svelte.d.ts +18 -0
  15. package/dist/components/DateTimePicker.svelte +30 -0
  16. package/dist/components/DateTimePicker.svelte.d.ts +8 -0
  17. package/dist/components/Editor.svelte +123 -0
  18. package/dist/components/Editor.svelte.d.ts +10 -0
  19. package/dist/components/Layout.svelte +76 -0
  20. package/dist/components/Layout.svelte.d.ts +21 -0
  21. package/dist/components/MenuButton.svelte +9 -0
  22. package/dist/components/MenuButton.svelte.d.ts +18 -0
  23. package/dist/components/Navigation.svelte +59 -0
  24. package/dist/components/Navigation.svelte.d.ts +12 -0
  25. package/dist/components/Render/BarSection.svelte +89 -0
  26. package/dist/components/Render/BarSection.svelte.d.ts +13 -0
  27. package/dist/components/Render/BoxSection.svelte +94 -0
  28. package/dist/components/Render/BoxSection.svelte.d.ts +15 -0
  29. package/dist/components/Render/Grid.svelte +16 -0
  30. package/dist/components/Render/Grid.svelte.d.ts +14 -0
  31. package/dist/components/Render/GridCells.svelte +98 -0
  32. package/dist/components/Render/GridCells.svelte.d.ts +14 -0
  33. package/dist/components/Render/GridLines.svelte +45 -0
  34. package/dist/components/Render/GridLines.svelte.d.ts +10 -0
  35. package/dist/components/Render/GridSection.svelte +348 -0
  36. package/dist/components/Render/GridSection.svelte.d.ts +16 -0
  37. package/dist/components/Render/Headers.svelte +86 -0
  38. package/dist/components/Render/Headers.svelte.d.ts +8 -0
  39. package/dist/components/Render/ListSection.svelte +110 -0
  40. package/dist/components/Render/ListSection.svelte.d.ts +8 -0
  41. package/dist/components/Render/NowLine.svelte +68 -0
  42. package/dist/components/Render/NowLine.svelte.d.ts +8 -0
  43. package/dist/components/Render/ScrollableSection.svelte +207 -0
  44. package/dist/components/Render/ScrollableSection.svelte.d.ts +14 -0
  45. package/dist/components/Render/SectionContent.svelte +83 -0
  46. package/dist/components/Render/SectionContent.svelte.d.ts +17 -0
  47. package/dist/components/Render/Sections.svelte +340 -0
  48. package/dist/components/Render/Sections.svelte.d.ts +14 -0
  49. package/dist/components/Render/YearSection.svelte +265 -0
  50. package/dist/components/Render/YearSection.svelte.d.ts +9 -0
  51. package/dist/components/Render/useEventOverlay.svelte.d.ts +21 -0
  52. package/dist/components/Render/useEventOverlay.svelte.js +60 -0
  53. package/dist/components/TodayButton.svelte +11 -0
  54. package/dist/components/TodayButton.svelte.d.ts +18 -0
  55. package/dist/components/editorItems.d.ts +15 -0
  56. package/dist/components/editorItems.js +20 -0
  57. package/dist/components/types.d.ts +29 -0
  58. package/dist/components/types.js +1 -0
  59. package/dist/directives/clickdate.d.ts +8 -0
  60. package/dist/directives/clickdate.js +45 -0
  61. package/dist/directives/clickevent.d.ts +15 -0
  62. package/dist/directives/clickevent.js +54 -0
  63. package/dist/directives/drag.d.ts +19 -0
  64. package/dist/directives/drag.js +494 -0
  65. package/dist/directives/dragresize.d.ts +10 -0
  66. package/dist/directives/dragresize.js +58 -0
  67. package/dist/directives/resize.d.ts +5 -0
  68. package/dist/directives/resize.js +11 -0
  69. package/dist/dom.d.ts +1 -0
  70. package/dist/dom.js +12 -0
  71. package/dist/env.d.ts +9 -0
  72. package/dist/index.d.ts +14 -0
  73. package/dist/index.js +12 -0
  74. package/dist/init.d.ts +1 -0
  75. package/dist/init.js +5 -0
  76. package/dist/themes/Willow.svelte +16 -0
  77. package/dist/themes/Willow.svelte.d.ts +7 -0
  78. package/dist/themes/WillowDark.svelte +16 -0
  79. package/dist/themes/WillowDark.svelte.d.ts +7 -0
  80. package/license.txt +21 -0
  81. package/package.json +60 -0
  82. package/readme.md +107 -0
@@ -0,0 +1,16 @@
1
+ <script lang="ts">import { WillowDark } from "@svar-ui/svelte-core";
2
+ let { fonts = true, children } = $props();
3
+ </script>
4
+
5
+ {#if children}
6
+ <WillowDark {fonts}>{@render children()}</WillowDark>
7
+ {:else}
8
+ <WillowDark {fonts} />
9
+ {/if}
10
+
11
+ <style>
12
+ :global(.wx-willow-dark-theme) {
13
+ --wx-calendar-grid-color: #384047;
14
+ --wx-calendar-weekend-background: #201d25;
15
+ }
16
+ </style>
@@ -0,0 +1,7 @@
1
+ import { WillowDark } from "@svar-ui/svelte-core";
2
+ declare const WillowDark: import("svelte").Component<{
3
+ fonts?: boolean;
4
+ children: any;
5
+ }, {}, "">;
6
+ type WillowDark = ReturnType<typeof WillowDark>;
7
+ export default WillowDark;
package/license.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 XB Software Sp. z o.o.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@svar-ui/svelte-calendar",
3
+ "version": "2.6.0",
4
+ "description": "SVAR UI Event Calendar widget",
5
+ "homepage": "https://svar.dev/svelte/calendar/",
6
+ "bugs": {
7
+ "url": "https://forum.svar.dev"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/svar-widgets/calendar.git"
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "readme.md",
17
+ "license.txt"
18
+ ],
19
+ "type": "module",
20
+ "types": "./dist/index.d.ts",
21
+ "svelte": "./dist/index.js",
22
+ "exports": {
23
+ ".": {
24
+ "svelte": "./dist/index.js",
25
+ "types": "./dist/index.d.ts"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "dependencies": {
30
+ "@svar-ui/core-locales": "2.5.0",
31
+ "@svar-ui/lib-dom": "0.12.1",
32
+ "@svar-ui/lib-state": "1.9.6",
33
+ "@svar-ui/svelte-core": "2.5.3",
34
+ "@svar-ui/svelte-editor": "2.5.3",
35
+ "@svar-ui/svelte-layout": "2.5.0",
36
+ "@svar-ui/svelte-menu": "2.5.3",
37
+ "@svar-ui/svelte-toolbar": "2.5.3",
38
+ "svelte-check": "^4.4.6",
39
+ "@svar-ui/calendar-locales": "2.6.0",
40
+ "@svar-ui/calendar-provider": "2.6.0",
41
+ "@svar-ui/calendar-store": "2.6.0",
42
+ "@svar-ui/calendar-ical": "2.6.0"
43
+ },
44
+ "devDependencies": {
45
+ "@sveltejs/package": "^2.5.7",
46
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
47
+ "svelte": "^5.54.0"
48
+ },
49
+ "peerDependencies": {
50
+ "svelte": "^5.54.0"
51
+ },
52
+ "productTag": "calendar",
53
+ "scripts": {
54
+ "check": "svelte-check --tsconfig ./tsconfig.json",
55
+ "build": "svelte-package -i ./src",
56
+ "lint": "vp lint ./demos ./src",
57
+ "start": "vp dev --open",
58
+ "watch": "svelte-package -i ./src --watch"
59
+ }
60
+ }
package/readme.md ADDED
@@ -0,0 +1,107 @@
1
+ <div align="center">
2
+
3
+ # SVAR Svelte Calendar
4
+
5
+ </div>
6
+
7
+ <div align="center">
8
+
9
+ [Homepage](https://svar.dev/svelte/calendar/) • [Getting Started](https://docs.svar.dev/svelte/calendar/getting-started/quick-start/) • [Demos](https://docs.svar.dev/svelte/calendar/samples/)
10
+
11
+ </div>
12
+
13
+ <div align="center">
14
+
15
+ [![npm](https://img.shields.io/npm/v/@svar-ui/svelte-calendar.svg)](https://www.npmjs.com/package/@svar-ui/svelte-calendar)
16
+ [![License](https://img.shields.io/github/license/svar-widgets/calendar)](https://github.com/svar-widgets/calendar/blob/main/license.txt)
17
+ [![npm downloads](https://img.shields.io/npm/dm/@svar-ui/svelte-calendar.svg)](https://www.npmjs.com/package/@svar-ui/svelte-calendar)
18
+
19
+ </div>
20
+
21
+ [SVAR Svelte Calendar](https://svar.dev/svelte/calendar/) is an interactive event calendar and scheduler component for Svelte and SvelteKit apps. It supports Day, Week, and Month views, drag-and-drop event editing, a ready-to-use event edit form, and rich customization options.
22
+
23
+ The calendar comes with full TypeScript support, extensible API, and flexible CSS styling. The PRO Edition offers additional views (Year, Agenda, Timeline, Resources) and recurring event support.
24
+
25
+ <div align="center">
26
+ <img src="https://svar.dev/images/github/github-calendar.gif" alt="SVAR Svelte Calendar Preview">
27
+ </div>
28
+
29
+ ### ✨ Key Features
30
+
31
+ - Multiple built-in views: Day, Week, Month
32
+ - Drag-and-drop to move, resize, and create events
33
+ - Customizable event editor form
34
+ - Context menu and toolbar
35
+ - Tooltips and custom event cards
36
+ - Custom HTML in event markup
37
+ - Multiple calendars with toggleable visibility
38
+ - Event filtering
39
+ - iCal import/export
40
+ - Localization
41
+ - Light and dark themes
42
+ - Full TypeScript support
43
+ - REST data provider for backend integration
44
+
45
+ ### 🚀 PRO Edition
46
+
47
+ SVAR Svelte Calendar is available in open-source and [PRO Editions](https://svar.dev/svelte/calendar/#pro). The PRO Edition offers four more scheduling views and automation features:
48
+
49
+ - Year view
50
+ - Agenda view
51
+ - Timeline view (horizontal timeline with resource rows)
52
+ - Resources view (single day with resource columns)
53
+ - Recurring events (RRULE-based)
54
+
55
+ Visit the [pricing page](https://svar.dev/svelte/calendar/pricing/) for full feature comparison, licensing details, and **free trial**.
56
+
57
+ Or [see the live demo](https://svar.dev/demos/calendar/).
58
+
59
+ ### 🛠️ How to Use
60
+
61
+ To use the calendar widget, simply import the package and include the component in your Svelte file:
62
+
63
+ ```svelte
64
+ <script>
65
+ import { Calendar } from "@svar-ui/svelte-calendar";
66
+
67
+ const events = [
68
+ {
69
+ id: 1,
70
+ start: new Date(2026, 4, 5, 10, 0),
71
+ end: new Date(2026, 4, 5, 11, 30),
72
+ text: "Project kickoff",
73
+ details: "Outline the project's scope and resources.",
74
+ },
75
+ ];
76
+ const date = new Date(2026, 4, 5);
77
+ </script>
78
+
79
+ <Calendar {events} {date} view="week" />
80
+ ```
81
+
82
+ For further instructions, follow the detailed [quick start guide](https://docs.svar.dev/svelte/calendar/getting-started/quick-start/).
83
+
84
+ ### How to Modify
85
+
86
+ Typically, you don't need to modify the code. However, if you wish to do so, follow these steps:
87
+
88
+ 1. Install [vite-plus](https://vite.plus) (`curl -fsSL https://vite.plus | bash` on Mac/Linux, `irm https://vite.plus/ps1 | iex` on Windows). The project uses `pnpm` workspaces under the hood, so plain `npm` will not work.
89
+ 2. Run `vp i` from the project root to install dependencies.
90
+ 3. Run `vp run build` to build all packages.
91
+ 4. Start the demo app in development mode with `vp run start`.
92
+
93
+ ### Run Tests
94
+
95
+ To run the tests:
96
+
97
+ ```sh
98
+ vp test
99
+ ```
100
+
101
+ ### ⭐ Show Your Support
102
+
103
+ If SVAR Svelte Calendar helps your project, [give us a star](https://github.com/svar-widgets/calendar/)! It helps us reach more developers and keeps us motivated to add new features.
104
+
105
+ ### :speech_balloon: Need Help?
106
+
107
+ [Post an Issue](https://github.com/svar-widgets/calendar/issues/) or use our [community forum](https://forum.svar.dev).