behnoo-calendar 1.0.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.
- package/README.md +302 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +198 -0
- package/dist/index.js +1731 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/style.css +2 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# @dopedev/vue-calendar
|
|
2
|
+
|
|
3
|
+
A multi-calendar Vue 3 component supporting Gregorian, Jalaali (Persian), and Islamic calendar systems with full RTL support.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Three calendar systems: Gregorian, Jalaali (Persian), Islamic (Umm al-Qura)
|
|
8
|
+
- Three view modes: monthly, weekly, daily
|
|
9
|
+
- RTL layout support
|
|
10
|
+
- Fully customizable header via slot
|
|
11
|
+
- Event display with color, duration, and full-day support
|
|
12
|
+
- Dark mode via CSS custom properties
|
|
13
|
+
- TypeScript support
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @dopedev/vue-calendar
|
|
19
|
+
# or
|
|
20
|
+
pnpm add @dopedev/vue-calendar
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Setup
|
|
24
|
+
|
|
25
|
+
Import the stylesheet once in your app entry point:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import "@dopedev/vue-calendar/style.css";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Nuxt:**
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
// nuxt.config.ts
|
|
35
|
+
export default defineNuxtConfig({
|
|
36
|
+
css: ["@dopedev/vue-calendar/style.css"],
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Basic Usage
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import { ref } from "vue";
|
|
45
|
+
import { VueCalendar } from "@dopedev/vue-calendar";
|
|
46
|
+
import type { CalendarEvent } from "@dopedev/vue-calendar";
|
|
47
|
+
|
|
48
|
+
const events = ref<CalendarEvent[]>([
|
|
49
|
+
{
|
|
50
|
+
id: 1,
|
|
51
|
+
title: "Team Meeting",
|
|
52
|
+
date: new Date(),
|
|
53
|
+
time: "10:00",
|
|
54
|
+
duration: 60,
|
|
55
|
+
color: "#3b82f6",
|
|
56
|
+
},
|
|
57
|
+
]);
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<div style="height: 600px">
|
|
62
|
+
<VueCalendar :events="events" />
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> The component fills its container — give the parent a fixed height.
|
|
68
|
+
|
|
69
|
+
## Props
|
|
70
|
+
|
|
71
|
+
| Prop | Type | Default | Description |
|
|
72
|
+
| -------------- | -------------------------------- | ----------------------- | ---------------------------------------------------------- |
|
|
73
|
+
| `events` | `CalendarEvent[]` | `[]` | Events to display |
|
|
74
|
+
| `mode` | `CalendarMode` | `'monthly'` | View mode: `'monthly'`, `'weekly'`, `'daily'` |
|
|
75
|
+
| `locale` | `string` | `'en-US'` | BCP 47 locale tag used for day/month names |
|
|
76
|
+
| `calendarType` | `CalendarType` | `'gregory'` | Calendar system: `'gregory'`, `'persian'`, `'islamic-uma'` |
|
|
77
|
+
| `startOfWeek` | `number` | `0` | First day of week: `0` = Sunday … `6` = Saturday |
|
|
78
|
+
| `hours` | `{ start: number; end: number }` | `{ start: 0, end: 24 }` | Visible hour range in weekly/daily view |
|
|
79
|
+
| `initialDate` | `Date` | `new Date()` | Date the calendar opens on |
|
|
80
|
+
|
|
81
|
+
### v-model
|
|
82
|
+
|
|
83
|
+
`mode` supports two-way binding:
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<VueCalendar v-model:mode="mode" />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Events
|
|
90
|
+
|
|
91
|
+
| Event | Payload | Description |
|
|
92
|
+
| -------------- | ---------------------------- | ----------------------------------------------------- |
|
|
93
|
+
| `update:mode` | `CalendarMode` | Fired when the mode changes |
|
|
94
|
+
| `range-change` | `{ start: Date; end: Date }` | Fired on mount and whenever the visible range changes |
|
|
95
|
+
| `event-click` | `CalendarEvent` | Fired when an event is clicked |
|
|
96
|
+
|
|
97
|
+
## Header Slot
|
|
98
|
+
|
|
99
|
+
Replace the default header entirely with the `#header` slot. All navigation and mode control is exposed through slot props:
|
|
100
|
+
|
|
101
|
+
```vue
|
|
102
|
+
<VueCalendar :events="events" v-model:mode="mode">
|
|
103
|
+
<template #header="{ mode, range, next, prev, setMode }">
|
|
104
|
+
<div class="flex items-center gap-2 p-3 border-b">
|
|
105
|
+
<button @click="prev">←</button>
|
|
106
|
+
<button @click="next">→</button>
|
|
107
|
+
<span>{{ range.start.toLocaleDateString() }}</span>
|
|
108
|
+
<div class="ml-auto flex gap-1">
|
|
109
|
+
<button
|
|
110
|
+
v-for="m in ['monthly', 'weekly', 'daily'] as const"
|
|
111
|
+
:key="m"
|
|
112
|
+
@click="setMode(m)"
|
|
113
|
+
:class="mode === m ? 'font-bold' : ''"
|
|
114
|
+
>
|
|
115
|
+
{{ m }}
|
|
116
|
+
</button>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
</VueCalendar>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Slot props
|
|
124
|
+
|
|
125
|
+
| Prop | Type | Description |
|
|
126
|
+
| --------- | ------------------------------ | ------------------------------- |
|
|
127
|
+
| `mode` | `CalendarMode` | Current view mode |
|
|
128
|
+
| `range` | `{ start: Date; end: Date }` | Currently visible date range |
|
|
129
|
+
| `next` | `() => void` | Navigate to the next period |
|
|
130
|
+
| `prev` | `() => void` | Navigate to the previous period |
|
|
131
|
+
| `setMode` | `(mode: CalendarMode) => void` | Switch view mode |
|
|
132
|
+
|
|
133
|
+
## Calendar Systems
|
|
134
|
+
|
|
135
|
+
### Gregorian (English)
|
|
136
|
+
|
|
137
|
+
```vue
|
|
138
|
+
<VueCalendar calendar-type="gregory" locale="en-US" :start-of-week="1" />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Jalaali / Persian (RTL)
|
|
142
|
+
|
|
143
|
+
Wrap the component in `dir="rtl"` to get correct RTL layout. Note that `next` and `prev` in the header slot remain semantically correct — swap their visual arrow directions instead.
|
|
144
|
+
|
|
145
|
+
```vue
|
|
146
|
+
<div dir="rtl">
|
|
147
|
+
<VueCalendar
|
|
148
|
+
calendar-type="persian"
|
|
149
|
+
locale="fa-IR"
|
|
150
|
+
:start-of-week="6"
|
|
151
|
+
/>
|
|
152
|
+
</div>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Islamic / Umm al-Qura (RTL)
|
|
156
|
+
|
|
157
|
+
```vue
|
|
158
|
+
<div dir="rtl">
|
|
159
|
+
<VueCalendar
|
|
160
|
+
calendar-type="islamic-uma"
|
|
161
|
+
locale="ar-SA"
|
|
162
|
+
:start-of-week="0"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Customizing Event Display
|
|
168
|
+
|
|
169
|
+
You can override how events are rendered in the time‑grid (weekly/daily) and in the mobile monthly list.
|
|
170
|
+
|
|
171
|
+
- Desktop time‑grid: use the `#event` slot.
|
|
172
|
+
- Mobile event list: use the `#event-mobile` slot.
|
|
173
|
+
|
|
174
|
+
```vue
|
|
175
|
+
<VueCalendar :events="events">
|
|
176
|
+
<!-- Custom desktop event -->
|
|
177
|
+
<template #event="{ event }">
|
|
178
|
+
<div :style="{ background: event.color || '#3b82f6', padding: '4px', borderRadius: '6px' }">
|
|
179
|
+
{{ event.title }}
|
|
180
|
+
</div>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<!-- Custom mobile list event -->
|
|
184
|
+
<template #event-mobile="{ event }">
|
|
185
|
+
<div class="flex items-center gap-2">
|
|
186
|
+
<span class="font-bold">{{ event.title }}</span>
|
|
187
|
+
<span class="text-sm text-gray-500">{{ event.time }}</span>
|
|
188
|
+
</div>
|
|
189
|
+
</template>
|
|
190
|
+
</VueCalendar>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## CalendarEvent
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
interface CalendarEvent {
|
|
197
|
+
id: number | string;
|
|
198
|
+
date: Date | string; // date of the event
|
|
199
|
+
time: string; // 'HH:mm' format
|
|
200
|
+
title: string;
|
|
201
|
+
duration?: number; // minutes (used in weekly/daily view)
|
|
202
|
+
color?: string; // hex or CSS value; defaults to --cal-primary
|
|
203
|
+
isFullDay?: boolean;
|
|
204
|
+
raw?: any; // attach your original API payload here
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Theming
|
|
209
|
+
|
|
210
|
+
The calendar exposes a set of CSS custom properties for colours. You can override them on `:root` for the light theme and inside a `.dark` selector for the dark theme.
|
|
211
|
+
|
|
212
|
+
| CSS Variable | Description | Light default | Dark default |
|
|
213
|
+
| ------------------------- | ------------------------------------------ | ------------- | ------------ |
|
|
214
|
+
| `--color-surface` | Main background | `#ffffff` | `#151823` |
|
|
215
|
+
| `--color-surface-variant` | Card / cell secondary background | `#f8f8fa` | `#242836` |
|
|
216
|
+
| `--color-on-surface` | Primary text colour | `#2c2c2e` | `#ffffff` |
|
|
217
|
+
| `--color-primary` | Accent colour, event background fallback | `#1a9d90` | `#40b8ac` |
|
|
218
|
+
| `--color-error` | Error colour (weekends, holidays, pointer) | `#e52b16` | `#ea5545` |
|
|
219
|
+
| `--color-outline` | Standard border colour | `#d1d0d2` | `#605f63` |
|
|
220
|
+
| `--color-outline-variant` | Light border colour | `#f0f0f0` | `#3a393c` |
|
|
221
|
+
|
|
222
|
+
**Today badge gradient**
|
|
223
|
+
You can change the gradient used for the “today” circle:
|
|
224
|
+
|
|
225
|
+
| Variable | Light default | Dark default |
|
|
226
|
+
| ---------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
|
227
|
+
| `--cal-today-bg-light` | `radial-gradient(circle at 70% 0%, #10121b, #393e4d)` | – |
|
|
228
|
+
| `--cal-today-bg-dark` | – | `radial-gradient(circle at 70% 0%, #d1d0d2, #9b9a9d)` |
|
|
229
|
+
|
|
230
|
+
Example customisation:
|
|
231
|
+
|
|
232
|
+
```css
|
|
233
|
+
:root {
|
|
234
|
+
--color-surface: #ffffff;
|
|
235
|
+
--color-primary: #ff6b6b;
|
|
236
|
+
--cal-today-bg-light: radial-gradient(circle at 70% 0%, #4a00e0, #8e2de2);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.dark {
|
|
240
|
+
--color-surface: #111827;
|
|
241
|
+
--color-primary: #ff8787;
|
|
242
|
+
--cal-today-bg-dark: radial-gradient(circle at 70% 0%, #ffd700, #ff8c00);
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Exposed Methods
|
|
247
|
+
|
|
248
|
+
When using a template ref, the component exposes:
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
const cal = ref<InstanceType<typeof VueCalendar>>();
|
|
252
|
+
|
|
253
|
+
cal.value?.goNext(); // navigate forward
|
|
254
|
+
cal.value?.goPrev(); // navigate backward
|
|
255
|
+
cal.value?.setMode("weekly"); // change view mode
|
|
256
|
+
cal.value?.currentRange; // { start: Date, end: Date }
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## TypeScript
|
|
260
|
+
|
|
261
|
+
All public types are exported from the package root:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import type {
|
|
265
|
+
CalendarEvent,
|
|
266
|
+
CalendarMode,
|
|
267
|
+
CalendarType,
|
|
268
|
+
CalendarDay,
|
|
269
|
+
CalendarDateRange,
|
|
270
|
+
CalendarTimeRange,
|
|
271
|
+
} from "@dopedev/vue-calendar";
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Development
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
pnpm install
|
|
278
|
+
pnpm dev # dev sandbox at http://localhost:5173
|
|
279
|
+
pnpm type-check # TypeScript check
|
|
280
|
+
pnpm build:lib # build the distributable package
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Run the Nuxt example
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
pnpm build:lib
|
|
287
|
+
|
|
288
|
+
cd examples/nuxt-example
|
|
289
|
+
pnpm install
|
|
290
|
+
pnpm dev # http://localhost:3000
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Publishing
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npm login # log in with the @dopedev org account
|
|
297
|
+
npm publish # prepublishOnly runs build:lib automatically
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## License
|
|
301
|
+
|
|
302
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("vue");var t=()=>{let t=(0,e.ref)(typeof window<`u`?window.innerWidth:1024),n=(0,e.ref)(typeof window<`u`?window.innerHeight:768),r=()=>{t.value=window.innerWidth,n.value=window.innerHeight};return(0,e.onMounted)(()=>window.addEventListener(`resize`,r)),(0,e.onUnmounted)(()=>window.removeEventListener(`resize`,r)),{width:t,height:n}},n=e=>(typeof e==`object`&&e&&`value`in e?String(e.value):String(e||`fa-IR`)).replace(/[^a-zA-Z-]/g,`-`).split(`-`)[0]||`fa`,r=()=>{let t=(0,e.inject)(`calendarConfig`,(0,e.ref)({locale:`en`,calendar:`gregory`,startOfWeek:`sunday`,showHolidays:!1}));return{t:(e,n)=>{let r=t.value.locale.startsWith(`fa`);return{"calendar.dayTimes.morning":r?`صبح`:`Morning`,"calendar.dayTimes.noon":r?`ظهر`:`Noon`,"calendar.dayTimes.afternoon":r?`عصر`:`Afternoon`,"calendar.dayTimes.night":r?`شب`:`Night`,"calendar.moreItems":r?`${n?.count} مورد دیگر`:`${n?.count} More Items`,"calendar.noEvents":r?`رویدادی وجود ندارد`:`No events`,"calendar.allDay":r?`تمام روز`:`All day`,"calendar.agenda":r?`برنامه`:`Agenda`}[e]||e},config:t}},i=t=>{let r=(0,e.inject)(`calendarConfig`,(0,e.ref)({locale:`fa-IR`,calendar:`jalaali`,startOfWeek:`saturday`,showHolidays:!0})),i=t||r,a=(0,e.inject)(`calendarHolidays`,(0,e.ref)({})),o=(0,e.computed)(()=>{let e=i.value.calendar;return e===`jalaali`?`persian`:e===`islamic`?`islamic-uma`:`gregory`}),s=e=>({sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6})[e.toLowerCase()]??0,c=e=>{let t=new Date(e);t.setHours(12,0,0,0);let n=o.value;n===`islamic-uma`&&(n=`islamic-civil`,t.setDate(t.getDate()-1));let r=new Intl.DateTimeFormat(`en-u-ca-${n}`,{year:`numeric`,month:`numeric`,day:`numeric`}).formatToParts(t),i=e=>parseInt(r.find(t=>t.type===e)?.value||`0`);return{year:i(`year`),month:i(`month`),day:i(`day`)}},l=(0,e.computed)(()=>i.value.calendar===`gregory`?1:6),u=e=>String(e),d=e=>{let t=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`];return String(e).replace(/\d/g,e=>t[parseInt(e)]??e)},f=e=>{let t=n(i.value.locale),r=new Date(e);r.setDate(r.getDate()+-1);let s=(t,n=e)=>{let r=new Intl.DateTimeFormat(`en-u-ca-${t}`,{year:`numeric`,month:`numeric`,day:`numeric`}).formatToParts(n);return parseInt(r.find(e=>e.type===`day`)?.value||`0`)},c=s(`gregory`),l=s(`persian`),f=s(`islamic-civil`,r),p=t===`fa`||t===`ar`,m=u(c),h=p?d(l):u(l),g=p?d(f):u(f),_=i.value.calendar,v,y,b;_===`jalaali`?(v=h,y=m,b=g):_===`islamic`?(v=g,y=h,b=m):(v=m,y=h,b=g);let x=new Date,S=e.getDate()===x.getDate()&&e.getMonth()===x.getMonth()&&e.getFullYear()===x.getFullYear(),C=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,w=a.value[C],T=w?.isHoliday||!1,E=w?.titles?.join(` - `)||null,D=e.getDay(),O=i.value.showHolidays?_===`jalaali`||_===`islamic`?D===5:D===0:!1,k=i.value.showHolidays?O||T:!1,A=o.value,j=new Intl.DateTimeFormat(`${t}-u-ca-${A}`,{weekday:`long`}).format(e),M=new Intl.DateTimeFormat(`${t}-u-ca-${A}`,{weekday:`short`}).format(e);return{date:new Date(e),primary:v,secondary:y,tertiary:b,jalaali:l,gregorian:c,ghamari:f,isToday:S,isWeekend:O,isHoliday:k,holidayTitle:E,name:j,shortName:M,dayOfWeek:D}},p=(e,t)=>{if(!e)return[];let n=[];if(t===`monthly`){let t=new Date(e.start);t.setHours(12,0,0,0);let r=c(t),a=r.month,o=r.year,l=new Date(t);for(;c(l).day!==1;)l.setDate(l.getDate()-1);let u=new Date(l);for(;;){u.setDate(u.getDate()+1);let e=c(u);if(e.month!==a||e.year!==o){u.setDate(u.getDate()-1);break}}let d=s(i.value.calendar===`gregory`?`monday`:`saturday`),p=l.getDay()-d;p<0&&(p+=7);let m=new Date(l);m.setDate(m.getDate()-p);let h=((d+6)%7-u.getDay()+7)%7,g=new Date(u);g.setDate(g.getDate()+h);let _=new Date(m);for(;_<=g;){let e=f(new Date(_)),t=c(_);n.push({...e,otherMonth:t.month!==a||t.year!==o}),_.setDate(_.getDate()+1)}}else if(t===`agenda`){let t=new Date(e.start);t.setHours(12,0,0,0);let r=c(t),i=r.month,a=r.year,o=new Date(t);for(;c(o).day!==1;)o.setDate(o.getDate()-1);let s=new Date(o);for(;;){s.setDate(s.getDate()+1);let e=c(s);if(e.month!==i||e.year!==a){s.setDate(s.getDate()-1);break}}let l=new Date(o);for(;l<=s;){let e=f(new Date(l));n.push({...e,otherMonth:!1}),l.setDate(l.getDate()+1)}}else if(t===`weekly`){let t=s(i.value.calendar===`gregory`?`monday`:`saturday`),r=new Date(e.start),a=r.getDay()-t;a<0&&(a+=7),r.setDate(r.getDate()-a);for(let e=0;e<7;e++){let t=new Date(r);t.setDate(r.getDate()+e),n.push({...f(t),otherMonth:!1})}}else if(t===`3days`)for(let t=0;t<3;t++){let r=new Date(e.start);r.setDate(r.getDate()+t),n.push({...f(r),otherMonth:!1})}else n.push({...f(new Date(e.start)),otherMonth:!1});return n},m=(0,e.computed)(()=>{let e=n(i.value.locale),t=o.value,r=l.value,a=new Date(2025,0,12+r),s=new Intl.DateTimeFormat(`${e}-u-ca-${t}`,{weekday:`narrow`}),c=new Intl.DateTimeFormat(`${e}-u-ca-${t}`,{weekday:`long`});return Array.from({length:7},(e,t)=>{let n=new Date(a);return n.setDate(a.getDate()+t),{dayOfWeek:n.getDay(),label:s.format(n),fullName:c.format(n)}})}),h=e=>{let t=n(i.value.locale),r=o.value;return{sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6}[new Intl.DateTimeFormat(`${t}-u-ca-${r}`,{weekday:`long`}).format(e).toLowerCase()]??0},g=()=>{let e=new Date,t=c(e),n=new Date(e);for(n.setHours(0,0,0,0);c(n).day!==t.day||c(n).month!==t.month||c(n).year!==t.year;)n.setDate(n.getDate()-1);return n},_=e=>{let t=new Date(e);t.setHours(12,0,0,0);let n=c(t),r=n.month,i=n.year;for(;n.day!==1;)t.setDate(t.getDate()-1),n=c(t);let a=new Date(t);for(;;){a.setDate(a.getDate()+1);let e=c(a);if(e.month!==r||e.year!==i){a.setDate(a.getDate()-1);break}}return a.setHours(23,59,59,999),{start:t,end:a}},v=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t.setMilliseconds(0),t},y=()=>i.value.calendar===`gregory`?1:6,b=e=>{let t=g();if(e===`daily`||e===`3days`)return v(t);if(e===`weekly`){let e=y(),n=t.getDay()-e;n<0&&(n+=7);let r=new Date(t);return r.setDate(r.getDate()-n),v(r)}c(t);let n=v(t);for(n.setHours(12,0,0,0);c(n).day!==1;)n.setDate(n.getDate()-1);return v(n)},x=(e,t)=>{let r=n(e),i=t===`jalaali`?`persian`:t===`islamic`?`islamic-civil`:`gregory`,a=c(new Date).year,o=C(1,a),s=[];for(let e=1;e<=12;e++){let t=C(e,a,o);o=new Date(t);let n=new Intl.DateTimeFormat(`${r}-u-ca-${i}`,{month:`long`}).format(t);s.push({value:e,label:n,shortLabel:n})}return s},S=(e=new Date)=>{let t=c(e);return{month:t.month,year:t.year}},C=(e,t,n)=>{let r=n?new Date(n):new Date;r.setHours(12,0,0,0);let i=c(r),a=1e3,o=0;for(;(i.year!==t||i.month!==e)&&o<a;)i.year<t||i.year===t&&i.month<e?r.setDate(r.getDate()+1):r.setDate(r.getDate()-1),i=c(r),o++;for(;i.day!==1&&o<a;)r.setDate(r.getDate()-1),i=c(r),o++;return r.setHours(0,0,0,0),r};return{getCalendarHeaders:p,getDayDetails:f,offsetPeriod:(e,t,n)=>{let r=new Date(e);if(t===`daily`)r.setDate(r.getDate()+n);else if(t===`3days`)r.setDate(r.getDate()+n*3);else if(t===`weekly`)r.setDate(r.getDate()+n*7);else{let e=c(r),t=e.month+n,i=e.year;return t<1&&(t+=12,i--),t>12&&(t-=12,i++),v(C(t,i))}return v(r)},getMonthBounds:_,getWeekDayNames:m,getParts:c,resetToToday:b,getTodayInActiveCalendar:g,getCurrentPeriodStart:e=>b(e),getCurrentMonthYear:S,getDayOfWeekIndex:h,getMonthNames:x,getFirstDayOfMonthInActiveCalendar:C}},a=(0,e.defineComponent)({name:`CalendarDayBadge`,props:{day:{type:Object,required:!0}},setup(t){return{getDayItemColor:(0,e.computed)(()=>{let e=t.day,n=`border-outline-variant bg-surface`,r=`text-on-surface/50`;return e.isToday&&(n=`bg-today border-outline-variant/0`,r=`text-surface`),(e.isWeekend||e.isHoliday)&&(r=`text-error`),{fill:n,text:r}}),getFont:(e,t)=>{if(String(t.gregorian)===t[e])return`font-latin`}}}}),o=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},s={class:`flex flex-col items-center`};function c(t,n,r,i,a,o){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,s,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`w-7 h-7 sm:w-8 sm:h-8 md:w-9 md:h-9 select-none border flex flex-col justify-center items-center rounded-full`,[t.getDayItemColor.fill,t.getDayItemColor.text]])},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([[t.getFont(`tertiary`,t.day)],`leading-none opacity-70 text-[6px] sm:text-[7px] md:text-[8px]`])},(0,e.toDisplayString)(t.day.tertiary),3),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([[t.getFont(`primary`,t.day)],`leading-tight text-[11px] sm:text-xs md:text-label-md font-medium`])},(0,e.toDisplayString)(t.day.primary),3),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([[t.getFont(`secondary`,t.day)],`leading-none opacity-70 text-[6px] sm:text-[7px] md:text-[8px]`])},(0,e.toDisplayString)(t.day.secondary),3)],2)])}var l=o(a,[[`render`,c]]),u=(0,e.defineComponent)({name:`CalendarHeaderItem`,components:{CalendarDayBadge:l},props:{days:{type:Array,default:()=>[]},mode:{type:String,default:`monthly`},todayColumnIndex:{type:Number,default:-1}},setup(t){return{itemWidths:(0,e.computed)(()=>`${100/(t.days.length+(t.mode===`monthly`?0:1))}%`)}}}),d={class:`w-full items-stretch flex justify-between`},f={key:0,class:`border shrink-0 w-8 sm:w-9 md:w-25 min-w-8 sm:min-w-9 md:min-w-25 max-w-8 sm:max-w-9 md:max-w-25 border-outline-variant`},p={class:`select-none text-on-surface/50 text-[9px] sm:text-[10px] md:text-label-md truncate max-w-full text-center px-0.5`},m={class:`sm:hidden`},h={class:`hidden sm:inline`};function g(t,n,r,i,a,o){let s=(0,e.resolveComponent)(`CalendarDayBadge`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,d,[t.mode===`monthly`?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,f)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.days,(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`border-y rtl:border-l ltr:border-r border-outline-variant py-1.5 sm:py-2 md:py-4 flex-col flex-1 min-w-0 gap-y-1 sm:gap-y-1.5 md:gap-y-2.5 flex items-center justify-center transition-colors`,{"bg-today-column":r===t.todayColumnIndex}]),key:n.name+r},[t.mode===`monthly`?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createBlock)(s,{key:0,day:n},null,8,[`day`])),(0,e.createElementVNode)(`div`,p,[(0,e.createElementVNode)(`span`,m,(0,e.toDisplayString)(n.shortName||n.name),1),(0,e.createElementVNode)(`span`,h,(0,e.toDisplayString)(n.name),1)])],2))),128))])}var _=o(u,[[`render`,g],[`__scopeId`,`data-v-683574e2`]]),v=(0,e.defineComponent)({name:`CalendarSideItem`,props:{range:{type:Object,required:!0}},setup(n){let{t:i,config:a}=r(),{width:o}=t(),s=(0,e.computed)(()=>o.value<768),c=(0,e.computed)(()=>new Intl.NumberFormat(a.value.locale.startsWith(`fa`)?`fa-IR`:`en-US`)),l=(0,e.computed)(()=>`${100/u.value.length}%`),u=(0,e.computed)(()=>{let e=[],{start:t,end:r}=n.range;for(let n=t;n<r;n++)if(s.value)e.push({raw:n,label:c.value.format(n)});else{let t=``;t=n>=1&&n<=11?`morning`:n===12?`noon`:n>=13&&n<19?`afternoon`:`night`;let r=n;n>12&&(r=n-12),n===0&&(r=12),e.push({raw:n,label:`${c.value.format(r)} ${i(`calendar.dayTimes.${t}`)}`})}return e});return{hoursList:u,itemHeights:l}}}),y={class:`w-8 sm:w-9 md:w-25 min-h-full flex flex-col ltr:border-r ltr:border-r-outline-variant rtl:border-l border-l-outline-variant`};function b(t,n,r,i,a,o){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,y,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.hoursList,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n.raw,style:(0,e.normalizeStyle)({height:t.itemHeights}),class:`flex items-center text-center justify-center text-[10px] sm:text-xs md:text-label-md text-on-surface/50 border-b min-h-20 border-b-outline-variant select-none`},(0,e.toDisplayString)(n.label),5))),128))])}var x=o(v,[[`render`,b]]),S=(0,e.defineComponent)({name:`CalendarPattern`,setup(){return{getX:e=>-50+(e-1)*25}}}),C={width:`100%`,height:`120%`,viewBox:`0 0 440 221`,preserveAspectRatio:`xMidYMid slice`,class:`text-surface-variant`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},w=[`x`,`transform`];function T(t,n,r,i,a,o){return(0,e.openBlock)(),(0,e.createElementBlock)(`svg`,C,[((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(25,n=>(0,e.createElementVNode)(`rect`,{key:n,x:t.getX(n),y:`220.895`,width:`300`,height:`12`,transform:`rotate(-115 ${t.getX(n)} 220.895)`,fill:`currentColor`},null,8,w)),64))])}var E=o(S,[[`render`,T]]),D={"--cal-primary":{light:{r:26,g:157,b:144},dark:{r:64,g:184,b:172}},"--color-primary":{light:{r:26,g:157,b:144},dark:{r:64,g:184,b:172}},"--cal-surface":{light:{r:255,g:255,b:255},dark:{r:21,g:24,b:35}},"--color-surface":{light:{r:255,g:255,b:255},dark:{r:21,g:24,b:35}},"--cal-on-surface":{light:{r:44,g:44,b:46},dark:{r:255,g:255,b:255}},"--color-on-surface":{light:{r:44,g:44,b:46},dark:{r:255,g:255,b:255}},"--cal-error":{light:{r:229,g:43,b:22},dark:{r:234,g:85,b:69}},"--color-error":{light:{r:229,g:43,b:22},dark:{r:234,g:85,b:69}}};function O(e){if(!e||typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(t.startsWith(`var(`)){let e=t.match(/var\(\s*([^,\s)]+)/),n=e?e[1]:``;if(typeof document<`u`&&n)try{let e=getComputedStyle(document.documentElement).getPropertyValue(n).trim();if(e){let t=O(e);if(t)return t}}catch{}let r=t.match(/var\([^,]+,\s*([^)]+)\)/);if(r&&r[1]){let e=O(r[1].trim());if(e)return e}return n&&D[n]?typeof document<`u`&&document.documentElement.classList.contains(`dark`)?D[n].dark:D[n].light:{r:26,g:157,b:144}}if(t.startsWith(`#`)){let e=t.slice(1);if(e.length===3||e.length===4){let t=e[0]||`0`,n=e[1]||`0`,r=e[2]||`0`,i=parseInt(t+t,16),a=parseInt(n+n,16),o=parseInt(r+r,16);if(!Number.isNaN(i)&&!Number.isNaN(a)&&!Number.isNaN(o))return{r:i,g:a,b:o}}else if(e.length===6||e.length===8){let t=parseInt(e.slice(0,2),16),n=parseInt(e.slice(2,4),16),r=parseInt(e.slice(4,6),16);if(!Number.isNaN(t)&&!Number.isNaN(n)&&!Number.isNaN(r))return{r:t,g:n,b:r}}return null}if(t.startsWith(`rgb`)){let e=t.match(/\(([^)]+)\)/);if(e&&e[1]){let t=e[1].split(/[\s,/]+/).filter(Boolean),n=t[0],r=t[1],i=t[2];if(n!==void 0&&r!==void 0&&i!==void 0){let e=n.endsWith(`%`)?parseFloat(n)/100*255:parseFloat(n),t=r.endsWith(`%`)?parseFloat(r)/100*255:parseFloat(r),a=i.endsWith(`%`)?parseFloat(i)/100*255:parseFloat(i);if(!Number.isNaN(e)&&!Number.isNaN(t)&&!Number.isNaN(a))return{r:Math.min(255,Math.max(0,Math.round(e))),g:Math.min(255,Math.max(0,Math.round(t))),b:Math.min(255,Math.max(0,Math.round(a)))}}}return null}if(t.startsWith(`hsl`)){let e=t.match(/\(([^)]+)\)/);if(e&&e[1]){let t=e[1].split(/[\s,/]+/).filter(Boolean),n=t[0],r=t[1],i=t[2];if(n!==void 0&&r!==void 0&&i!==void 0){let e=parseFloat(n),t=parseFloat(r)/100,a=parseFloat(i)/100;if(!Number.isNaN(e)&&!Number.isNaN(t)&&!Number.isNaN(a))return k(e,t,a)}}return null}let n={white:{r:255,g:255,b:255},black:{r:0,g:0,b:0},transparent:{r:255,g:255,b:255},red:{r:255,g:0,b:0},green:{r:0,g:128,b:0},blue:{r:0,g:0,b:255},yellow:{r:255,g:255,b:0},orange:{r:255,g:165,b:0},purple:{r:128,g:0,b:128},teal:{r:0,g:128,b:128},gray:{r:128,g:128,b:128},grey:{r:128,g:128,b:128}};return n[t]?n[t]:null}function k(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i/2,s=0,c=0,l=0;return r>=0&&r<60?(s=i,c=a):r>=60&&r<120?(s=a,c=i):r>=120&&r<180?(c=i,l=a):r>=180&&r<240?(c=a,l=i):r>=240&&r<300?(s=a,l=i):(s=i,l=a),{r:Math.round((s+o)*255),g:Math.round((c+o)*255),b:Math.round((l+o)*255)}}function A(e,t,n){let r=e=>{let t=Math.max(0,Math.min(255,e))/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},i=r(e),a=r(t),o=r(n);return .2126*i+.7152*a+.0722*o}function j(e,t){let n=typeof e==`string`?O(e)??{r:0,g:0,b:0}:e,r=typeof t==`string`?O(t)??{r:255,g:255,b:255}:t,i=A(n.r,n.g,n.b),a=A(r.r,r.g,r.b),o=Math.max(i,a),s=Math.min(i,a);return(o+.05)/(s+.05)}function M(e,t){let n=t?.darkColor??`#0f172a`,r=t?.lightColor??`#ffffff`;if(!e)return r;let i=O(e)??{r:26,g:157,b:144},a=O(n)??{r:15,g:23,b:42},o=O(r)??{r:255,g:255,b:255},s=A(i.r,i.g,i.b),c=A(a.r,a.g,a.b),l=A(o.r,o.g,o.b),u=(Math.max(s,c)+.05)/(Math.min(s,c)+.05);return(Math.max(s,l)+.05)/(Math.min(s,l)+.05)>=u?r:n}var N=(0,e.defineComponent)({__name:`CalendarItemDisplay`,props:{event:{},mode:{},headers:{},hours:{},position:{},isMobile:{type:Boolean},overlapIndex:{},overlapCount:{}},emits:[`event-click`],setup(t){let n=t,r=(0,e.computed)(()=>n.event.color||`var(--cal-primary)`),i=(0,e.computed)(()=>M(r.value)),a=(0,e.computed)(()=>{if(n.mode===`monthly`)return{zIndex:10,position:`relative`};if(n.position===`static`)return{width:`100%`,height:`36px`,position:`relative`};if(!n.headers?.length||!n.hours)return{display:`none`};let e=new Date(n.event.date).toLocaleDateString(`en-CA`),t=n.headers.findIndex(t=>new Date(t.date).toLocaleDateString(`en-CA`)===e);if(t===-1||n.hours.end-n.hours.start<=0)return{display:`none`};let r=n.event.time.split(`:`).map(Number),i=(r[0]??0)+(r[1]??0)/60,a=(i-n.hours.start)*80,o=100/n.headers.length,s=n.overlapCount??1,c=n.overlapIndex??0,l=o/s,u,d;if(n.event.duration&&n.event.duration>0){let e=Math.min(i+n.event.duration/60,n.hours.end);u=`${Math.max(0,e-i)*80}px`,d=`20px`}else u=n.isMobile&&n.mode===`weekly`?`16px`:`36px`;return{top:`${a}px`,insetInlineStart:`${t*o+c*l}%`,width:`${l}%`,height:u,minHeight:d,zIndex:10,boxSizing:`border-box`}}),o=(0,e.computed)(()=>({backgroundColor:r.value,color:i.value})),s=(0,e.computed)(()=>{let e=r.value,t=i.value;return n.mode===`monthly`?{backgroundColor:e,color:t,opacity:.9,borderLeft:`4px solid ${e}`}:{backgroundColor:e,color:t}});return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{id:`event-display`,style:(0,e.normalizeStyle)(a.value),class:(0,e.normalizeClass)([t.position===`static`?``:`absolute`,t.mode===`monthly`?``:t.isMobile&&t.mode===`weekly`?`px-0.5`:`px-1 sm:px-2`]),onClick:r[0]||=(0,e.withModifiers)(e=>n.$emit(`event-click`,t.event,e),[`stop`])},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`flex whitespace-normal items-center rounded cursor-pointer transition-transform text-[10px] sm:text-[11px] leading-tight overflow-hidden`,t.mode===`monthly`?`px-2 relative mb-1 h-6 shrink-0 whitespace-nowrap text-ellipsis w-[calc(100%-16px)]`:t.isMobile&&t.mode===`weekly`?`absolute px-1 h-full w-[calc(100%-4px)] text-[9px] leading-none`:`absolute px-2 sm:px-4 h-full w-[calc(100%-8px)] sm:w-[calc(100%-16px)] sm:rounded-md`]),style:(0,e.normalizeStyle)(s.value)},[(0,e.renderSlot)(n.$slots,`event`,{event:t.event,mode:t.mode},()=>[(0,e.createElementVNode)(`div`,{style:(0,e.normalizeStyle)(o.value),class:`w-full h-full relative z-10 flex items-center gap-x-1 truncate font-medium`},(0,e.toDisplayString)(t.event.title),5)])],6)],6))}}),ee=(0,e.defineComponent)({name:`CalendarDayHolder`,props:{day:{type:Object,required:!0},otherMonth:{type:Boolean,default:!1},events:{type:Array,default:()=>[]}},components:{CalendarDayBadge:l,CalendarPattern:E,CalendarItemDisplay:N},emits:[`open-day`,`event-click`],setup(t,{emit:n}){let{t:i}=r();return{t:i,displayedEvents:(0,e.computed)(()=>t.events.slice(0,2)),openDay:()=>{n(`open-day`,t.day)},remainingCount:(0,e.computed)(()=>t.events.length-2)}}}),te={class:`relative top-0 left-0 w-full h-full p-4 flex flex-col`},ne={key:0,class:`shrink-0`},P={id:`holder`,class:`w-full flex-1 relative flex flex-col gap-y-1.5 mt-2`},F={class:`w-full h-full pointer-events-none absolute top-0 left-0`};function I(t,n,r,i,a,o){let s=(0,e.resolveComponent)(`CalendarDayBadge`),c=(0,e.resolveComponent)(`CalendarItemDisplay`),l=(0,e.resolveComponent)(`CalendarPattern`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`border border-outline-variant/50 w-full relative h-full transition-colors`,[t.otherMonth?`overflow-hidden`:`overflow-visible`,t.day.isToday&&!t.otherMonth?`bg-today-column`:``]])},[(0,e.createElementVNode)(`div`,te,[t.otherMonth?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ne,[(0,e.createVNode)(s,{day:t.day},null,8,[`day`])])),(0,e.createElementVNode)(`div`,P,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.displayedEvents,r=>((0,e.openBlock)(),(0,e.createBlock)(c,{key:r.id,position:`static`,event:r,onEventClick:n[0]||=e=>t.$emit(`event-click`,e)},{event:(0,e.withCtx)(n=>[(0,e.renderSlot)(t.$slots,`event`,(0,e.mergeProps)({ref_for:!0},n))]),_:3},8,[`event`]))),128)),t.remainingCount>0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,onClick:n[1]||=(...e)=>t.openDay&&t.openDay(...e),class:`w-full relative z-0 h-9 px-2 flex cursor-pointer items-center rounded-lg bg-surface-variant text-label-sm text-on-surface select-none`},(0,e.toDisplayString)(t.t(`calendar.moreItems`,{count:t.remainingCount})),1)):(0,e.createCommentVNode)(``,!0)])]),(0,e.createElementVNode)(`div`,F,[t.otherMonth?((0,e.openBlock)(),(0,e.createBlock)(l,{key:0,class:`absolute inset-0 z-0 pointer-events-none`})):(0,e.createCommentVNode)(``,!0)])],2)}var L=o(ee,[[`render`,I]]),R=(0,e.defineComponent)({name:`CalendarPointer`,props:{mode:{type:String,required:!0},hours:{type:Object,required:!0},headers:{type:Array,required:!0}},setup(t){let n=(0,e.ref)(new Date),r;(0,e.onMounted)(()=>{r=setInterval(()=>{n.value=new Date},6e4)}),(0,e.onUnmounted)(()=>{r&&clearInterval(r)});let i=(0,e.computed)(()=>{if(!t.headers||t.headers.length===0)return{display:`none`};let e=t.headers.findIndex(e=>e.isToday);if(e===-1)return{display:`none`};let r=n.value,i=r.getHours()+r.getMinutes()/60;if(t.mode===`monthly`){let n=Math.ceil(t.headers.length/7),r=Math.floor(e/7),a=e%7,o=100/n,s=i/24*o;return{width:`${100/7}%`,top:`${r*o+s}%`,insetInlineStart:`${a/7*100}%`,transition:``}}if(i<t.hours.start||i>t.hours.end)return{display:`none`};let a=t.headers.length,o=t.hours.end-t.hours.start;return{width:`${100/a}%`,top:`${(i-t.hours.start)/o*100}%`,insetInlineStart:`${e/a*100}%`,transition:``}});return{pointerStyle:i,isVisible:(0,e.computed)(()=>i.value.display!==`none`)}}});function z(t,n,r,i,a,o){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`absolute z-20 pointer-events-none -translate-y-1/2 flex items-center`,style:(0,e.normalizeStyle)(t.pointerStyle)},[...n[0]||=[(0,e.createElementVNode)(`div`,{class:`w-2.5 aspect-square rounded-full bg-error shrink-0`},null,-1),(0,e.createElementVNode)(`div`,{class:`h-0.5 flex-1 bg-error`},null,-1)]],4)),[[e.vShow,t.isVisible]])}var B=o(R,[[`render`,z]]),V=(0,e.defineComponent)({name:`MobileDayHolder`,props:{day:{type:Object,required:!0},isSelected:{type:Boolean,default:!1},events:{type:Array,default:()=>[]},expandProgress:{type:Number,default:0},isDragging:{type:Boolean,default:!1}},emits:[`select`],setup(t,{emit:n}){return{canSelect:(0,e.computed)(()=>t.events.length>0),displayedEvents:(0,e.computed)(()=>t.events.slice(0,4)),selectDay:()=>{n(`select`,t.day)},styles:(0,e.computed)(()=>t.isSelected?{border:`border-transparent`,bg:`opacity-100`,text:`text-surface`}:t.day.isToday?{border:`border-primary`,bg:`opacity-0`,text:`text-primary`}:{border:`border-transparent`,bg:`opacity-0`,text:`text-on-surface/50`})}}}),H={class:`w-full h-full absolute inset-0 left-0 top-0 flex items-center justify-center`},U={class:`w-full flex-1 relative flex justify-center`};function W(t,n,r,i,a,o){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,{onClick:n[0]||=(...e)=>t.selectDay&&t.selectDay(...e),class:(0,e.normalizeClass)([`flex flex-col items-center justify-start gap-y-0.5 w-full overflow-hidden hw-accel-height`,[t.canSelect?`cursor-pointer`:`cursor-default`,t.isDragging?``:`transition-all duration-300 ease-out`]]),style:(0,e.normalizeStyle)({height:`${40+t.expandProgress*16}px`})},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`relative w-8 h-8 shrink-0 rounded-full transition-all duration-200 ease-in-out aspect-square border`,t.styles.border])},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`rounded-full w-full h-full transition-all duration-200 ease-in-out bg-on-surface`,t.styles.bg])},null,2),(0,e.createElementVNode)(`div`,H,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`select-none text-label-md transition-all duration-200 ease-in-out`,t.styles.text])},(0,e.toDisplayString)(t.day.primary),3)])],2),(0,e.createElementVNode)(`div`,U,[t.canSelect?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`rounded-full aspect-square w-1.5 bg-error absolute hw-accel`,[t.isDragging?``:`transition-all duration-300 ease-out`]]),style:(0,e.normalizeStyle)({opacity:Math.max(0,1-t.expandProgress*2),transform:`scale(${Math.max(0,1-t.expandProgress*2)})`})},null,6)):(0,e.createCommentVNode)(``,!0),t.canSelect?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:1,class:(0,e.normalizeClass)([`w-full flex flex-col gap-y-px absolute top-0 px-0.5 hw-accel`,[t.isDragging?``:`transition-all duration-300 ease-out`]]),style:(0,e.normalizeStyle)({opacity:t.expandProgress,transform:`translateY(${(1-t.expandProgress)*6}px)`})},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.displayedEvents,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id,class:`w-full rounded-full shrink-0 min-h-1`,style:(0,e.normalizeStyle)({backgroundColor:t.color||`var(--cal-primary)`})},null,4))),128))],6)):(0,e.createCommentVNode)(``,!0)])],6)}var G=o(V,[[`render`,W],[`__scopeId`,`data-v-d90e616f`]]),K={class:`flex flex-col gap-y-1 p-3 flex-1`},q={class:`text-label-md font-semibold text-on-surface`},J={class:`text-body-sm text-on-surface/60`},Y=(0,e.defineComponent)({__name:`MobileEventListItem`,props:{event:{}},emits:[`event-click`],setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`bg-surface-variant flex flex-col rounded-lg border cursor-pointer`,onClick:r[0]||=(0,e.withModifiers)(e=>n.$emit(`event-click`,t.event,e),[`stop`])},[(0,e.createElementVNode)(`div`,K,[(0,e.renderSlot)(n.$slots,`event`,{event:t.event},()=>[(0,e.createElementVNode)(`div`,q,(0,e.toDisplayString)(t.event.title),1),(0,e.createElementVNode)(`div`,J,(0,e.toDisplayString)(t.event.time),1)])]),(0,e.createElementVNode)(`div`,{class:`w-full h-1 shrink-0 rounded-b-full rounded-t-none`,style:(0,e.normalizeStyle)({backgroundColor:t.event.color||`#3b82f6`})},null,4)]))}}),X=(0,e.defineComponent)({name:`MobileCalendarGrid`,components:{MobileDayHolder:G,MobileEventListItem:Y},props:{days:{type:Array,default:()=>[]},eventsByDay:{type:Object,required:!0},loading:{type:Boolean,default:!1}},emits:[`event-click`],setup(t){let{getWeekDayNames:n}=i(),r=(0,e.computed)(()=>n.value),a=(0,e.ref)(!1),o=(0,e.ref)([]),s=(0,e.ref)(``),c=e=>{let n=new Date(e.date).toDateString();s.value=n;let r=t.eventsByDay.get(n);r&&r.length>0?(o.value=[...r],a.value=!0):a.value=!1};(0,e.onMounted)(()=>{let e=new Date().toDateString();s.value=e;let n=t.eventsByDay.get(e);n&&n.length>0&&(o.value=[...n],a.value=!0)});let l=e=>s.value===new Date(e.date).toDateString(),u=(0,e.ref)(0),d=(0,e.ref)(!1),f=0,p=0,m=!1;function h(e){f=e,p=u.value,d.value=!0}function g(e){if(!d.value)return;let t=e-f;m||=(requestAnimationFrame(()=>{let e=p+t/120;u.value=Math.max(0,Math.min(1,e)),m=!1}),!0)}function _(){d.value=!1,u.value>.25&&p===0?u.value=1:u.value<.75&&p===1?u.value=0:u.value=p}let v=e=>{h(e.touches[0]?.clientY??0)},y=e=>{let t=e.touches[0];t&&g(t.clientY)},b=()=>{_()},x=e=>{h(e.clientY),document.addEventListener(`mousemove`,S),document.addEventListener(`mouseup`,C)},S=e=>{g(e.clientY)},C=()=>{_(),document.removeEventListener(`mousemove`,S),document.removeEventListener(`mouseup`,C)};return{isDaySelected:l,weekDays:r,selectDay:c,handleMouseDown:x,handleMouseLeave:()=>{d.value&&(_(),document.removeEventListener(`mousemove`,S),document.removeEventListener(`mouseup`,C))},selectedDate:s,showEventsList:a,progress:u,isDragging:d,handleTouchStart:v,handleTouchMove:y,handleTouchEnd:b,eventsList:o}}}),Z={class:`w-full pt-6 px-4 relative flex flex-col flex-1 overflow-y-auto`},re={class:`select-none text-[10px] text-on-surface/50 w-full flex items-center justify-between`},ie={class:`font-medium`},ae={class:`w-full mt-4 grid grid-cols-7 gap-x-5 gap-y-4`},oe={key:0,class:`transition-all duration-200 ease-in-out overflow-hidden w-full mt-4 flex-1 overflow-y-auto`},se={class:`py-2 text-on-surface text-title-sm font-bold select-none border-b border-outline-variant mb-2`},ce={class:`w-full flex flex-col gap-y-2`};function le(t,n,r,i,a,o){let s=(0,e.resolveComponent)(`MobileDayHolder`),c=(0,e.resolveComponent)(`MobileEventListItem`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,Z,[n[6]||=(0,e.createElementVNode)(`div`,{class:`w-full fixed right-0 -translate-y-6 pointer-events-none z-50 h-6 bg-gradient-to-b from-surface to-transparent`},null,-1),(0,e.createElementVNode)(`div`,{id:`mobile-grid`,class:`w-full shrink-0 select-none`,style:{"touch-action":`pan-x`,"user-select":`none`},onTouchstart:n[0]||=(0,e.withModifiers)((...e)=>t.handleTouchStart&&t.handleTouchStart(...e),[`prevent`]),onTouchmove:n[1]||=(0,e.withModifiers)((...e)=>t.handleTouchMove&&t.handleTouchMove(...e),[`prevent`]),onTouchend:n[2]||=(...e)=>t.handleTouchEnd&&t.handleTouchEnd(...e),onMousedown:n[3]||=(0,e.withModifiers)((...e)=>t.handleMouseDown&&t.handleMouseDown(...e),[`prevent`]),onMouseleave:n[4]||=(...e)=>t.handleMouseLeave&&t.handleMouseLeave(...e)},[(0,e.createElementVNode)(`div`,re,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.weekDays,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`aspect-square w-8 shrink-0 flex items-center justify-center`,key:t.dayOfWeek},[(0,e.createElementVNode)(`div`,ie,(0,e.toDisplayString)(t.label),1)]))),128))]),(0,e.createElementVNode)(`div`,ae,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.days,(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r,class:(0,e.normalizeClass)([`transition-all duration-200 rounded-lg`,n.otherMonth?`opacity-0 pointer-events-none`:`opacity-100`,n.isToday&&!n.otherMonth?`bg-today-column`:``])},[(0,e.createVNode)(s,{"is-selected":t.isDaySelected(n),"expand-progress":t.progress,"is-dragging":t.isDragging,onSelect:t.selectDay,day:n,events:t.eventsByDay.get(new Date(n.date).toDateString())||[]},null,8,[`is-selected`,`expand-progress`,`is-dragging`,`onSelect`,`day`,`events`])],2))),128))])],32),t.showEventsList?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,oe,[(0,e.createElementVNode)(`div`,se,(0,e.toDisplayString)(t.selectedDate),1),(0,e.createElementVNode)(`div`,ce,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.eventsList,r=>((0,e.openBlock)(),(0,e.createBlock)(c,{key:r.id,event:r,onEventClick:n[5]||=(e,n)=>t.$emit(`event-click`,e,n)},{event:(0,e.withCtx)(({event:n})=>[(0,e.renderSlot)(t.$slots,`event-mobile`,{event:n})]),_:2},1032,[`event`]))),128))])])):(0,e.createCommentVNode)(``,!0)])}var ue=o(X,[[`render`,le]]),de={class:`detail-wrapper-stub`},fe=(0,e.defineComponent)({__name:`CalendarEventDetailWrapper`,emits:[`lock-scroll`],setup(t){return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,de))}}),pe=(0,e.defineComponent)({components:{MobileCalendarGrid:ue,CalendarHeaderItem:_,CalendarSideItem:x,CalendarDayHolder:L,CalendarPointer:B,CalendarItemDisplay:N,CalendarEventDetailWrapper:fe},props:{range:{type:Object,required:!0},mode:{type:String,default:`monthly`},hours:{type:Object,default:()=>({start:0,end:24})},events:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},dir:{type:String,default:``}},emits:[`update:mode`,`update:range`,`event-click`],setup(n,{emit:r}){let a=(0,e.computed)(()=>n.loading),{width:o}=t(),s=(0,e.computed)(()=>o.value<768),{getCalendarHeaders:c}=i(),l=(0,e.useTemplateRef)(`scrollContainer`),u=(0,e.computed)(()=>c(n.range,n.mode)),d=(0,e.computed)(()=>u.value),f=(0,e.computed)(()=>n.mode===`monthly`?d.value.slice(0,7):d.value),p=(0,e.computed)(()=>n.mode===`daily`||n.mode===`monthly`?-1:d.value.findIndex(e=>e.isToday)),m=(0,e.computed)(()=>{let e=new Map;return n.events.forEach(t=>{let n=new Date(t.date).toDateString();e.has(n)||e.set(n,[]),e.get(n)?.push(t)}),e}),h=(0,e.computed)(()=>{let e=new Map,t=u.value.filter(e=>!e.otherMonth),r=new Set(t.map(e=>new Date(e.date).toDateString()));return n.events.forEach(t=>{let n=new Date(t.date).toDateString();r.has(n)&&(e.has(n)||e.set(n,[]),e.get(n)?.push(t))}),e});function g(e){if(!e.duration||e.duration<=0)return[e];let t=e.time.split(`:`).map(Number),n=(t[0]??0)+(t[1]??0)/60;if(n+e.duration/60<=24)return[e];let r=[],i=new Date(e.date),a=0,o=n,s=e.duration;for(;s>0;){let t=Math.min(s,(24-o)*60),n=Math.floor(o),c=Math.round((o-n)*60);r.push({...e,id:`${e.id}_d${a}`,date:new Date(i.getTime()+a*864e5),time:`${String(n).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`,duration:Math.round(t)}),s-=t,o=0,a++}return r}let _=(0,e.computed)(()=>{if(n.mode===`monthly`)return[];let e=new Set(d.value.map(e=>new Date(e.date).toLocaleDateString(`en-CA`)));return n.events.flatMap(g).filter(t=>{let n=new Date(t.date).toLocaleDateString(`en-CA`);return e.has(n)})}),v=(0,e.computed)(()=>{let e=[],t=[],r=new Map;for(let e of d.value)r.set(new Date(e.date).toLocaleDateString(`en-CA`),[]);for(let e of _.value)r.get(new Date(e.date).toLocaleDateString(`en-CA`))?.push(e);for(let[i,a]of r.entries()){if(!a.length)continue;let r=d.value.findIndex(e=>new Date(e.date).toLocaleDateString(`en-CA`)===i),o=a.map(e=>{let t=e.time.split(`:`).map(Number),n=(t[0]??0)+(t[1]??0)/60;return{event:e,start:n,end:e.duration?n+e.duration/60:n+.5,col:0}}).sort((e,t)=>e.start-t.start||t.end-e.end),s=[];for(let e of o){let t=s.findIndex(t=>t<=e.start);e.col=t===-1?s.length:t,s[e.col]=e.end}if(n.mode===`daily`)for(let t of o){let n=t.col;for(let e of o)e!==t&&e.start<t.end&&e.end>t.start&&(n=Math.max(n,e.col));e.push({event:t.event,overlapIndex:t.col,overlapCount:n+1})}else{for(let t of o){if(t.col>=2)continue;let n=t.col;for(let e of o)e!==t&&e.col<2&&e.start<t.end&&e.end>t.start&&(n=Math.max(n,e.col));e.push({event:t.event,overlapIndex:t.col,overlapCount:n+1})}let n=o.filter(e=>e.col>=2).sort((e,t)=>e.start-t.start),i=[];for(let e of n){let t=i[i.length-1];!t||e.start>=t.end?i.push({start:e.start,end:e.end,count:1}):(t.end=Math.max(t.end,e.end),t.count++)}for(let e of i){let n=o.filter(t=>t.col<2&&t.start<e.end&&t.end>e.start).reduce((e,t)=>Math.max(e,t.end),e.start);t.push({dayIndex:r,endDecimal:n,count:e.count})}}}return{events:e,overflows:t}}),y=(0,e.computed)(()=>v.value.events),b=(0,e.computed)(()=>v.value.overflows),x=(0,e.computed)(()=>{if(n.mode===`monthly`||_.value.length===0)return n.hours;let e=n.hours.start,t=n.hours.end;for(let n of _.value){let r=n.time.split(`:`).map(Number),i=(r[0]??0)+(r[1]??0)/60,a=n.duration?i+n.duration/60:i;e=Math.min(e,Math.floor(i)),t=Math.max(t,Math.ceil(a))}return{start:Math.max(0,e),end:Math.min(24,t)}}),S=(0,e.ref)(!1),C=e=>{S.value=e},w=e=>{let t=new Date(e.date);r(`update:range`,{start:new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0),end:new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59,999)}),r(`update:mode`,`daily`,t)},T=(0,e.ref)(!0);(0,e.watch)([s,()=>n.mode],()=>{T.value=s.value?n.mode!==`monthly`:!0},{immediate:!0});let E=(0,e.computed)(()=>{let e=[];for(let t=x.value.start;t<x.value.end;t++)e.push({raw:t});return e});return(0,e.watch)(()=>n.events,async()=>{if(n.mode===`monthly`||!l.value)return;await(0,e.nextTick)();let t=l.value,r=_.value.map(e=>parseInt(e.time.split(`:`)[0],10));if(r.length===0)return;r.sort((e,t)=>e-t);let i=((r[Math.floor(r.length/2)]??x.value.start)-x.value.start)*80-t.clientHeight/2+80/2;t.scrollTo({top:Math.max(0,i),behavior:`smooth`})},{deep:!0}),{isLoading:a,hoursList:E,effectiveHours:x,scrollContainer:l,headers:d,allHeaders:u,isMobile:s,displayedHeader:f,todayColumnIndex:p,monthlyEventsByDay:h,eventsByDay:m,gridEvents:y,overflowIndicators:b,scrollLocked:S,showMonthly:T,setLockScroll:C,openSpecificDay:w}}}),me=[`dir`],he={ref:`scrollContainer`,class:`flex-1 w-full flex overflow-y-auto cal-scrollbar`},ge={class:`flex-1 relative`},_e={class:`absolute inset-0 w-full flex flex-col pointer-events-none`},ve={class:`absolute inset-0 w-full flex pointer-events-none`},ye={class:`relative min-h-full w-full`},be=[`onClick`],xe={key:2,class:`w-full`};function Se(t,n,r,i,a,o){let s=(0,e.resolveComponent)(`CalendarEventDetailWrapper`),c=(0,e.resolveComponent)(`CalendarHeaderItem`),l=(0,e.resolveComponent)(`CalendarSideItem`),u=(0,e.resolveComponent)(`CalendarPointer`),d=(0,e.resolveComponent)(`CalendarItemDisplay`),f=(0,e.resolveComponent)(`CalendarDayHolder`),p=(0,e.resolveComponent)(`MobileCalendarGrid`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`w-full h-full flex flex-col bg-surface whitespace-normal`,dir:t.dir},[(0,e.createVNode)(s,{onLockScroll:t.setLockScroll},null,8,[`onLockScroll`]),t.showMonthly?((0,e.openBlock)(),(0,e.createBlock)(c,{key:0,class:`shrink-0 border-b border-surface-variant`,mode:t.mode,days:t.displayedHeader,"today-column-index":t.todayColumnIndex},null,8,[`mode`,`days`,`today-column-index`])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,he,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`shrink-0 transition-all duration-300`,[t.mode===`monthly`?`w-0 opacity-0 overflow-hidden`:`w-8 sm:w-9 md:w-25 opacity-100 h-full`]])},[(0,e.createVNode)(l,{class:`w-8 sm:w-9 md:w-25 min-h-full`,range:t.effectiveHours},null,8,[`range`])],2),(0,e.createElementVNode)(`div`,ge,[(0,e.createVNode)(e.Transition,{name:`calendar-view`,mode:`out-in`},{default:(0,e.withCtx)(()=>[t.mode===`monthly`?t.isMobile?t.mode===`monthly`&&t.isMobile?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,xe,[(0,e.createVNode)(p,{loading:t.isLoading,days:t.headers,mode:t.mode,"events-by-day":t.monthlyEventsByDay,"is-other-month-func":e=>t.headers.find(t=>new Date(t.date).toDateString()===new Date(e).toDateString())?.otherMonth||!1,onEventClick:n[2]||=e=>t.$emit(`event-click`,e)},(0,e.createSlots)({_:2},[t.$slots[`event-mobile`]?{name:`event-mobile`,fn:(0,e.withCtx)(({event:n})=>[(0,e.renderSlot)(t.$slots,`event-mobile`,{event:n,mode:`monthly-mobile`},void 0,!0)]),key:`0`}:void 0]),1032,[`loading`,`days`,`mode`,`events-by-day`,`is-other-month-func`])])):(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:`month-${t.range?.start?.getTime()}`,class:`w-full grid grid-cols-7 auto-rows-[186px] overflow-hidden`},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.allHeaders,(r,i)=>((0,e.openBlock)(),(0,e.createBlock)(f,{key:i,day:r,"other-month":!!r.otherMonth,events:t.monthlyEventsByDay.get(new Date(r.date).toDateString())||[],onOpenDay:e=>t.openSpecificDay(r),onEventClick:n[1]||=e=>t.$emit(`event-click`,e)},(0,e.createSlots)({_:2},[t.$slots.event?{name:`event`,fn:(0,e.withCtx)(n=>[(0,e.renderSlot)(t.$slots,`event`,(0,e.mergeProps)({ref_for:!0},n),void 0,!0)]),key:`0`}:void 0]),1032,[`day`,`other-month`,`events`,`onOpenDay`]))),128))])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:`time-${t.mode}-${t.range?.start?.getTime()}`,class:`w-full relative`,style:(0,e.normalizeStyle)({height:`${t.hoursList.length*80}px`})},[(0,e.createVNode)(u,{mode:t.mode,hours:t.effectiveHours,headers:t.headers},null,8,[`mode`,`hours`,`headers`]),(0,e.createElementVNode)(`div`,_e,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.effectiveHours.end-t.effectiveHours.start,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t,class:`w-full border-b border-surface-variant box-border h-20`}))),128))]),(0,e.createElementVNode)(`div`,ve,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.headers,(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`h-full border-r border-surface-variant flex-1 transition-colors`,{"bg-today-column":r===t.todayColumnIndex}]),key:`v`+r},null,2))),128))]),(0,e.createElementVNode)(`div`,ye,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.gridEvents,r=>((0,e.openBlock)(),(0,e.createBlock)(d,{key:r.event.id,event:r.event,mode:t.mode,headers:t.headers,hours:t.effectiveHours,isMobile:t.isMobile,"overlap-index":r.overlapIndex,"overlap-count":r.overlapCount,onEventClick:n[0]||=e=>t.$emit(`event-click`,e)},(0,e.createSlots)({_:2},[t.$slots.event?{name:`event`,fn:(0,e.withCtx)(n=>[(0,e.renderSlot)(t.$slots,`event`,(0,e.mergeProps)({ref_for:!0},n),void 0,!0)]),key:`0`}:void 0]),1032,[`event`,`mode`,`headers`,`hours`,`isMobile`,`overlap-index`,`overlap-count`]))),128)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.overflowIndicators,(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:`of-${r}`,class:`absolute px-0.5 sm:px-1 z-20 pointer-events-auto`,style:(0,e.normalizeStyle)({top:`${(Math.min(n.endDecimal,t.effectiveHours.end)-t.effectiveHours.start)*80}px`,insetInlineStart:`${n.dayIndex*(100/t.headers.length)}%`,width:`${100/t.headers.length}%`})},[(0,e.createElementVNode)(`button`,{class:`w-full text-[8px] sm:text-[10px] leading-none rounded bg-surface-variant hover:bg-surface-variant/80 text-on-surface/70 px-1 sm:px-2 py-0.5 sm:py-1 truncate transition-colors`,onClick:e=>t.openSpecificDay(t.headers[n.dayIndex])},` +`+(0,e.toDisplayString)(n.count)+` more `,9,be)],4))),128))])],4))]),_:3})])],512)],8,me)}var Ce=o(pe,[[`render`,Se],[`__scopeId`,`data-v-66575d8b`]]),we=[`dir`],Te={ref:`scrollContainer`,class:`flex-1 w-full overflow-y-auto cal-scrollbar px-2 sm:px-4 md:px-6 py-3 sm:py-5`},Ee={class:`max-w-4xl mx-auto flex flex-col gap-6`},De={class:`agenda-section-header sticky top-0 z-10 py-1.5 flex items-center gap-3 bg-surface/95 backdrop-blur-xs`},Oe={class:`rounded-full bg-surface-variant px-3 py-0.5 text-xs font-semibold text-on-surface/70 border border-outline-variant shadow-xs select-none`},ke={class:`flex flex-col gap-3`},Ae={class:`agenda-date-col shrink-0 flex flex-col items-start w-24 sm:w-32 md:w-36 pt-0.5 select-none`},je={class:`sm:hidden`},Me={class:`hidden sm:inline`},Ne={class:`mt-1 flex items-center gap-1.5 sm:gap-2`},Pe={class:`flex flex-col text-[10px] sm:text-xs leading-none text-on-surface/50 gap-0.5`},Fe={key:0,class:`opacity-70`},Q={key:0,class:`mt-1 text-[10px] font-medium text-error truncate max-w-full`},Ie={class:`agenda-events-col flex-1 min-w-0 flex flex-col gap-2`},Le=[`onClick`],Re={class:`min-w-0 flex-1 font-semibold text-xs sm:text-sm md:text-base leading-snug truncate`},ze={key:0,class:`shrink-0 text-[11px] sm:text-xs md:text-sm font-medium opacity-90 flex items-center gap-1.5 whitespace-nowrap`},Be={key:1,class:`agenda-no-events flex items-center text-xs text-on-surface/40 italic py-2 px-3 rounded-lg border border-dashed border-outline-variant select-none`},$=o((0,e.defineComponent)({__name:`CalendarAgenda`,props:{range:{},events:{default:()=>[]},dir:{default:``}},emits:[`event-click`],setup(t){let n=t,a=(0,e.inject)(`calendarConfig`,(0,e.ref)({locale:`fa-IR`,calendar:`jalaali`,startOfWeek:`saturday`,showHolidays:!1})),{t:o}=r(),{getCalendarHeaders:s}=i(),c=(0,e.computed)(()=>{let e=String(a.value.locale||``).toLowerCase();return e.startsWith(`fa`)||e.startsWith(`ar`)}),l=(0,e.computed)(()=>n.dir?n.dir:c.value?`rtl`:`ltr`);function u(e){if(!e||typeof e!=`string`)return 0;let t=e.split(`:`).map(Number),n=t[0]??0,r=t[1]??0;return Number.isNaN(n)||Number.isNaN(r)?0:n*60+r}let d=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`];function f(e){return c.value?e.replace(/\d/g,e=>d[parseInt(e,10)]??e):e}function p(e){if(e.isFullDay)return o(`calendar.allDay`)||(c.value?`تمام روز`:`All day`);if(!e.time)return``;if(!e.duration||e.duration<=0)return f(e.time);let t=u(e.time)+e.duration,n=Math.floor(t%1440/60),r=t%60,i=`${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`,a=f(e.time),s=f(i);return c.value?`${a} تا ${s}`:`${a} – ${s}`}function m(e){let t=e.color||`var(--cal-primary, #1a9d90)`;return{backgroundColor:t,color:M(t)}}let h=(0,e.computed)(()=>s(n.range,`agenda`));function g(e,t){if(!e.date)return!1;let n=new Date(t.date),r=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0).getTime(),i=new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59,999).getTime(),a=new Date(e.date),o=u(e.time),s=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0).getTime()+o*60*1e3,c=s;return e.duration&&e.duration>0?c=s+e.duration*60*1e3:e.isFullDay&&(c=new Date(a.getFullYear(),a.getMonth(),a.getDate(),23,59,59,999).getTime()),s<=i&&c>=r}function _(e){return n.events.filter(t=>g(t,e)).sort((e,t)=>{if(e.isFullDay&&!t.isFullDay)return-1;if(!e.isFullDay&&t.isFullDay)return 1;let n=u(e.time),r=u(t.time);return n===r?String(e.title||``).localeCompare(String(t.title||``)):n-r})}function v(e,t){let n=c.value,r=n?`fa-IR`:`en-US`,i=a.value.calendar===`jalaali`?`persian`:a.value.calendar===`islamic`?`islamic-civil`:`gregory`,o=new Intl.DateTimeFormat(`${r}-u-ca-${i}`,{day:`numeric`,month:`short`,year:`numeric`}).formatToParts(e),s=new Intl.DateTimeFormat(`${r}-u-ca-${i}`,{day:`numeric`,month:`short`,year:`numeric`}).formatToParts(t),l=o.find(e=>e.type===`day`)?.value||``,u=o.find(e=>e.type===`month`)?.value||``,d=o.find(e=>e.type===`year`)?.value||``,f=s.find(e=>e.type===`day`)?.value||``,p=s.find(e=>e.type===`month`)?.value||``,m=s.find(e=>e.type===`year`)?.value||``;return d===m&&u===p?n?`${l} – ${f} ${u}`:`${u} ${l} – ${f}`:d===m?n?`${l} ${u} – ${f} ${p}`:`${u} ${l} – ${p} ${f}`:n?`${l} ${u} ${d} – ${f} ${p} ${m}`:`${u} ${l}, ${d} – ${p} ${f}, ${d}`}let y=(0,e.computed)(()=>{let e=h.value;if(!e.length)return[];let t=[];for(let n=0;n<e.length;n+=7){let r=e.slice(n,n+7),i=r[0]?.date||new Date,a=r[r.length-1]?.date||i;t.push({id:`section-${i.getTime()}-${a.getTime()}`,rangeLabel:v(i,a),days:r.map(e=>({day:e,events:_(e)}))})}return t});return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`calendar-agenda w-full h-full flex flex-col bg-surface overflow-hidden`,dir:l.value},[(0,e.createElementVNode)(`div`,Te,[(0,e.createElementVNode)(`div`,Ee,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(y.value,r=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r.id,class:`agenda-section flex flex-col gap-3`},[(0,e.createElementVNode)(`div`,De,[n[0]||=(0,e.createElementVNode)(`div`,{class:`h-px flex-1 bg-outline-variant`},null,-1),(0,e.createElementVNode)(`span`,Oe,(0,e.toDisplayString)(r.rangeLabel),1),n[1]||=(0,e.createElementVNode)(`div`,{class:`h-px flex-1 bg-outline-variant`},null,-1)]),(0,e.createElementVNode)(`div`,ke,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.days,r=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r.day.name+r.day.date.getTime(),class:(0,e.normalizeClass)([`agenda-day-row flex flex-row items-start gap-3 sm:gap-5 p-2.5 sm:p-3.5 rounded-xl border border-outline-variant/60 transition-colors`,{"bg-today-column ring-1 ring-primary/30 border-primary/40":r.day.isToday,"bg-surface":!r.day.isToday}])},[(0,e.createElementVNode)(`div`,Ae,[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`text-xs sm:text-sm font-semibold truncate max-w-full`,r.day.isToday?`text-primary font-bold`:`text-on-surface/80`])},[(0,e.createElementVNode)(`span`,je,(0,e.toDisplayString)(r.day.shortName||r.day.name),1),(0,e.createElementVNode)(`span`,Me,(0,e.toDisplayString)(r.day.name),1)],2),(0,e.createElementVNode)(`div`,Ne,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`flex size-7 sm:size-8 items-center justify-center rounded-full text-xs sm:text-sm font-bold shadow-xs shrink-0`,[r.day.isToday?`bg-primary text-surface font-extrabold ring-2 ring-primary/30`:r.day.isWeekend||r.day.isHoliday?`bg-surface-variant text-error border border-outline-variant`:`bg-surface-variant text-on-surface border border-outline-variant`]])},(0,e.toDisplayString)(r.day.primary),3),(0,e.createElementVNode)(`div`,Pe,[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)({"text-error":r.day.isWeekend||r.day.isHoliday})},(0,e.toDisplayString)(r.day.secondary),3),r.day.tertiary?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Fe,(0,e.toDisplayString)(r.day.tertiary),1)):(0,e.createCommentVNode)(``,!0)])]),r.day.holidayTitle?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Q,(0,e.toDisplayString)(r.day.holidayTitle),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`div`,Ie,[r.events.length>0?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(r.events,r=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r.id,class:`agenda-event-card group flex items-center justify-between gap-3 rounded-lg sm:rounded-xl p-2.5 sm:px-4 sm:py-3 shadow-xs cursor-pointer transition-all hover:scale-[1.006] hover:shadow-md active:scale-[0.995]`,style:(0,e.normalizeStyle)(m(r)),onClick:e=>t.$emit(`event-click`,r)},[(0,e.renderSlot)(t.$slots,`event`,{event:r,mode:`agenda`},()=>[(0,e.createElementVNode)(`div`,Re,(0,e.toDisplayString)(r.title),1),r.time||r.isFullDay?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ze,[n[2]||=(0,e.createElementVNode)(`svg`,{class:`size-3 sm:size-3.5 opacity-80`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[(0,e.createElementVNode)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.createElementVNode)(`polyline`,{points:`12 6 12 12 16 14`})],-1),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(p(r)),1)])):(0,e.createCommentVNode)(``,!0)],!0)],12,Le))),128)):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Be,(0,e.toDisplayString)((0,e.unref)(o)(`calendar.noEvents`)||`No events`),1))])],2))),128))])]))),128))])],512)],8,we))}}),[[`__scopeId`,`data-v-d9fbe1f4`]]),Ve={key:0,class:`w-full h-full flex flex-col font-sans`,style:{color:`var(--cal-on-surface)`,background:`var(--cal-surface)`}},He={class:`w-full flex-1 overflow-hidden relative`},Ue=(0,e.defineComponent)({__name:`VueCalendar`,props:{events:{default:()=>[]},mode:{default:`monthly`},locale:{default:`en-US`},calendarType:{default:`gregory`},startOfWeek:{},hours:{default:()=>({start:0,end:24})},initialDate:{default:()=>new Date}},emits:[`update:mode`,`range-change`,`event-click`],setup(t,{expose:n,emit:r}){let a=t,o=r,s=(0,e.ref)(!1),c=(0,e.ref)(new Date(a.initialDate)),l={gregory:`gregory`,persian:`jalaali`,"islamic-uma":`islamic`},u=[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`],d=(0,e.computed)(()=>a.startOfWeek!==void 0&&a.startOfWeek>=0&&a.startOfWeek<=6?a.startOfWeek:a.calendarType===`gregory`?1:6),f=(0,e.computed)(()=>({locale:a.locale,calendar:l[a.calendarType],startOfWeek:u[d.value]??`sunday`,showHolidays:!1}));(0,e.provide)(`calendarConfig`,f),(0,e.provide)(`calendarHolidays`,(0,e.ref)({}));let{getMonthBounds:p,offsetPeriod:m}=i(f),h=(0,e.computed)(()=>{let e=new Date(c.value),t=new Date(c.value);if(a.mode===`daily`)return e.setHours(0,0,0,0),t.setHours(23,59,59,999),{start:e,end:t};if(a.mode===`3days`)return e.setHours(0,0,0,0),t.setTime(e.getTime()),t.setDate(e.getDate()+2),t.setHours(23,59,59,999),{start:e,end:t};if(a.mode===`weekly`){let n=d.value,r=e.getDay(),i=(r<n?7:0)+r-n;return e.setDate(e.getDate()-i),e.setHours(0,0,0,0),t.setTime(e.getTime()),t.setDate(e.getDate()+6),t.setHours(23,59,59,999),{start:e,end:t}}else return p(c.value)}),g=()=>{c.value=m(c.value,a.mode,1),o(`range-change`,h.value)},_=()=>{c.value=m(c.value,a.mode,-1),o(`range-change`,h.value)},v=(e,t)=>{t&&(c.value=new Date(t)),o(`update:mode`,e,t)},y=(e,t)=>{t&&(c.value=new Date(t)),o(`update:mode`,e,t)};return(0,e.watch)(()=>a.initialDate,e=>{e&&(c.value=new Date(e),o(`range-change`,h.value))}),(0,e.watch)(h,e=>{s.value&&o(`range-change`,e)}),(0,e.onMounted)(()=>{s.value=!0,o(`range-change`,h.value)}),n({goNext:g,goPrev:_,setMode:y,currentRange:h,handleModeUpdate:v}),(n,r)=>s.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ve,[(0,e.renderSlot)(n.$slots,`header`,{mode:t.mode,range:h.value,next:g,prev:_,setMode:y}),(0,e.createElementVNode)(`div`,He,[t.mode===`agenda`?((0,e.openBlock)(),(0,e.createBlock)($,{key:0,range:h.value,events:t.events,onEventClick:r[0]||=e=>n.$emit(`event-click`,e)},(0,e.createSlots)({_:2},[n.$slots.event?{name:`event`,fn:(0,e.withCtx)(t=>[(0,e.renderSlot)(n.$slots,`event`,(0,e.normalizeProps)((0,e.guardReactiveProps)(t)))]),key:`0`}:void 0]),1032,[`range`,`events`])):((0,e.openBlock)(),(0,e.createBlock)(Ce,{key:1,range:h.value,mode:t.mode,events:t.events,hours:t.hours,"onUpdate:mode":r[1]||=(e,t)=>v(e,t),onEventClick:r[2]||=e=>n.$emit(`event-click`,e),"onUpdate:range":r[3]||=e=>n.$emit(`range-change`,e)},(0,e.createSlots)({_:2},[n.$slots.event?{name:`event`,fn:(0,e.withCtx)(t=>[(0,e.renderSlot)(n.$slots,`event`,(0,e.normalizeProps)((0,e.guardReactiveProps)(t)))]),key:`0`}:void 0,n.$slots[`event-mobile`]?{name:`event-mobile`,fn:(0,e.withCtx)(t=>[(0,e.renderSlot)(n.$slots,`event-mobile`,(0,e.normalizeProps)((0,e.guardReactiveProps)(t)))]),key:`1`}:void 0]),1032,[`range`,`mode`,`events`,`hours`]))])])):(0,e.createCommentVNode)(``,!0)}});exports.CalendarAgenda=$,exports.VueCalendar=Ue,exports.getAccessibleTextColor=M,exports.getContrastRatio=j,exports.getRelativeLuminance=A,exports.parseColorToRgb=O;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { DefineComponent } from 'vue';
|
|
5
|
+
import { getAccessibleTextColor } from './utils/color';
|
|
6
|
+
import { getContrastRatio } from './utils/color';
|
|
7
|
+
import { getRelativeLuminance } from './utils/color';
|
|
8
|
+
import { parseColorToRgb } from './utils/color';
|
|
9
|
+
import { PublicProps } from 'vue';
|
|
10
|
+
import { RgbColor } from './utils/color';
|
|
11
|
+
|
|
12
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {
|
|
13
|
+
goNext: () => void;
|
|
14
|
+
goPrev: () => void;
|
|
15
|
+
setMode: (newMode: CalendarMode, date?: Date) => void;
|
|
16
|
+
currentRange: ComputedRef< {
|
|
17
|
+
start: Date;
|
|
18
|
+
end: Date;
|
|
19
|
+
}>;
|
|
20
|
+
handleModeUpdate: (newMode: CalendarMode, date?: Date) => void;
|
|
21
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
22
|
+
"event-click": (payload: CalendarEvent) => any;
|
|
23
|
+
"update:mode": (mode: CalendarMode, date?: Date | undefined) => any;
|
|
24
|
+
"range-change": (range: {
|
|
25
|
+
start: Date;
|
|
26
|
+
end: Date;
|
|
27
|
+
}) => any;
|
|
28
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
"onEvent-click"?: ((payload: CalendarEvent) => any) | undefined;
|
|
30
|
+
"onUpdate:mode"?: ((mode: CalendarMode, date?: Date | undefined) => any) | undefined;
|
|
31
|
+
"onRange-change"?: ((range: {
|
|
32
|
+
start: Date;
|
|
33
|
+
end: Date;
|
|
34
|
+
}) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
locale: string;
|
|
37
|
+
mode: CalendarMode;
|
|
38
|
+
hours: {
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
};
|
|
42
|
+
events: CalendarEvent[];
|
|
43
|
+
calendarType: CalendarType;
|
|
44
|
+
initialDate: Date;
|
|
45
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
|
|
47
|
+
declare const __VLS_component_2: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
48
|
+
"event-click": (payload: CalendarEvent) => any;
|
|
49
|
+
}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{
|
|
50
|
+
"onEvent-click"?: ((payload: CalendarEvent) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
events: CalendarEventPayload[];
|
|
53
|
+
dir: "ltr" | "rtl" | "";
|
|
54
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
55
|
+
scrollContainer: HTMLDivElement;
|
|
56
|
+
}, HTMLDivElement>;
|
|
57
|
+
|
|
58
|
+
declare type __VLS_Props = {
|
|
59
|
+
events?: CalendarEvent[];
|
|
60
|
+
mode?: CalendarMode;
|
|
61
|
+
locale?: string;
|
|
62
|
+
calendarType?: CalendarType;
|
|
63
|
+
startOfWeek?: number;
|
|
64
|
+
hours?: {
|
|
65
|
+
start: number;
|
|
66
|
+
end: number;
|
|
67
|
+
};
|
|
68
|
+
initialDate?: Date;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare type __VLS_Props_2 = {
|
|
72
|
+
range: CalendarDateRange | null;
|
|
73
|
+
events?: CalendarEventPayload[];
|
|
74
|
+
dir?: 'ltr' | 'rtl' | '';
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare function __VLS_template(): {
|
|
78
|
+
attrs: Partial<{}>;
|
|
79
|
+
slots: {
|
|
80
|
+
header?(_: {
|
|
81
|
+
mode: CalendarMode;
|
|
82
|
+
range: {
|
|
83
|
+
start: Date;
|
|
84
|
+
end: Date;
|
|
85
|
+
};
|
|
86
|
+
next: () => void;
|
|
87
|
+
prev: () => void;
|
|
88
|
+
setMode: (newMode: CalendarMode, date?: Date) => void;
|
|
89
|
+
}): any;
|
|
90
|
+
event?(_: {
|
|
91
|
+
event: CalendarEvent;
|
|
92
|
+
mode: string;
|
|
93
|
+
}): any;
|
|
94
|
+
event?(_: any): any;
|
|
95
|
+
'event-mobile'?(_: any): any;
|
|
96
|
+
};
|
|
97
|
+
refs: {};
|
|
98
|
+
rootEl: any;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
declare function __VLS_template_2(): {
|
|
102
|
+
attrs: Partial<{}>;
|
|
103
|
+
slots: {
|
|
104
|
+
event?(_: {
|
|
105
|
+
event: CalendarEvent;
|
|
106
|
+
mode: string;
|
|
107
|
+
}): any;
|
|
108
|
+
};
|
|
109
|
+
refs: {
|
|
110
|
+
scrollContainer: HTMLDivElement;
|
|
111
|
+
};
|
|
112
|
+
rootEl: HTMLDivElement;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
116
|
+
|
|
117
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
118
|
+
|
|
119
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
120
|
+
new (): {
|
|
121
|
+
$slots: S;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
126
|
+
new (): {
|
|
127
|
+
$slots: S;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export declare const CalendarAgenda: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
132
|
+
|
|
133
|
+
export declare interface CalendarDateRange {
|
|
134
|
+
start: Date;
|
|
135
|
+
end: Date;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare interface CalendarDay {
|
|
139
|
+
date: Date;
|
|
140
|
+
primary: string;
|
|
141
|
+
secondary: string;
|
|
142
|
+
tertiary: string;
|
|
143
|
+
jalaali: number;
|
|
144
|
+
gregorian: number;
|
|
145
|
+
ghamari: number;
|
|
146
|
+
otherMonth: boolean;
|
|
147
|
+
isToday: boolean;
|
|
148
|
+
isWeekend: boolean;
|
|
149
|
+
isHoliday: boolean;
|
|
150
|
+
holidayTitle?: string | null;
|
|
151
|
+
name: string;
|
|
152
|
+
shortName: string;
|
|
153
|
+
dayOfWeek: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export declare interface CalendarEvent {
|
|
157
|
+
id: number | string;
|
|
158
|
+
date: Date | string;
|
|
159
|
+
time: string;
|
|
160
|
+
duration?: number;
|
|
161
|
+
title: string;
|
|
162
|
+
color?: string;
|
|
163
|
+
isFullDay?: boolean;
|
|
164
|
+
raw?: any;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare type CalendarEventPayload = CalendarEvent;
|
|
168
|
+
|
|
169
|
+
export declare type CalendarMode = "daily" | "3days" | "weekly" | "monthly" | "agenda";
|
|
170
|
+
|
|
171
|
+
export declare interface CalendarTimeRange {
|
|
172
|
+
start: number;
|
|
173
|
+
end: number;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export declare type CalendarType = "gregory" | "persian" | "islamic-uma";
|
|
177
|
+
|
|
178
|
+
export { getAccessibleTextColor }
|
|
179
|
+
|
|
180
|
+
export { getContrastRatio }
|
|
181
|
+
|
|
182
|
+
export { getRelativeLuminance }
|
|
183
|
+
|
|
184
|
+
export declare interface I18nTranslations {
|
|
185
|
+
moreItems: string;
|
|
186
|
+
morning: string;
|
|
187
|
+
noon: string;
|
|
188
|
+
afternoon: string;
|
|
189
|
+
night: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { parseColorToRgb }
|
|
193
|
+
|
|
194
|
+
export { RgbColor }
|
|
195
|
+
|
|
196
|
+
export declare const VueCalendar: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
197
|
+
|
|
198
|
+
export { }
|