calendar-events 0.1.5 → 0.1.7
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 +84 -15
- package/bin/init.js +25 -51
- package/dist/calendar-events.cjs +10 -10
- package/dist/calendar-events.cjs.map +1 -1
- package/dist/calendar-events.js +356 -353
- package/dist/calendar-events.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# calendar-events
|
|
2
2
|
|
|
3
|
-
A lightweight, customizable React calendar component with event support. Built with TypeScript and
|
|
3
|
+
A lightweight, customizable React calendar component with event support. Built with TypeScript and native CSS, featuring generic typed events, render props for full control over event display, a loading state with an animated SVG icon, and seamless dark mode via CSS variables.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -8,13 +8,16 @@ A lightweight, customizable React calendar component with event support. Built w
|
|
|
8
8
|
- **Render props** — fully control how each event is rendered inside a day cell
|
|
9
9
|
- **Loading state** — built-in animated calendar icon overlay while fetching data
|
|
10
10
|
- **Dark mode** — works out of the box with a `.dark` class using CSS custom properties
|
|
11
|
-
- **
|
|
11
|
+
- **No framework dependencies** — uses native CSS with `--ce-*` prefixed variables, compatible with any design system
|
|
12
12
|
- **Modular** — all sub-components are exported individually so you can compose your own layout
|
|
13
|
+
- **Per-month loading** — `onDateChange` callback lets you fetch only the events for the visible month
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
18
|
npm install calendar-events
|
|
19
|
+
# or
|
|
20
|
+
pnpm add calendar-events
|
|
18
21
|
```
|
|
19
22
|
|
|
20
23
|
**Peer dependencies** (install if not already present):
|
|
@@ -23,6 +26,31 @@ npm install calendar-events
|
|
|
23
26
|
npm install react react-dom
|
|
24
27
|
```
|
|
25
28
|
|
|
29
|
+
## Color palette setup
|
|
30
|
+
|
|
31
|
+
After installing, run the following command to choose a color palette for your project:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm exec calendar-events
|
|
35
|
+
# or
|
|
36
|
+
pnpm exec calendar-events
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This interactive CLI will ask you to pick a **color** and a **shade**, then automatically write the selected values into the `dist/style.css` file.
|
|
40
|
+
|
|
41
|
+
**Available colors:**
|
|
42
|
+
|
|
43
|
+
| # | Color | Description |
|
|
44
|
+
|---|-------|-------------|
|
|
45
|
+
| 1 | `verde` | Green |
|
|
46
|
+
| 2 | `rojo` | Red |
|
|
47
|
+
| 3 | `amarillo` | Yellow |
|
|
48
|
+
| 4 | `morado` | Purple |
|
|
49
|
+
| 5 | `azul` | Blue |
|
|
50
|
+
| 6 | `naranja` | Orange |
|
|
51
|
+
|
|
52
|
+
**Available shades:** `claro` (light) · `medio` (medium) · `oscuro` (dark)
|
|
53
|
+
|
|
26
54
|
## Usage
|
|
27
55
|
|
|
28
56
|
### 1. Import the styles
|
|
@@ -33,8 +61,6 @@ Import the CSS once at the root of your app (e.g. `main.tsx` or `layout.tsx`):
|
|
|
33
61
|
import 'calendar-events/style.css'
|
|
34
62
|
```
|
|
35
63
|
|
|
36
|
-
> **Already using shadcn/ui?** Skip this import — your existing CSS variables are already compatible.
|
|
37
|
-
|
|
38
64
|
### 2. Use the component
|
|
39
65
|
|
|
40
66
|
```tsx
|
|
@@ -112,8 +138,15 @@ Use the `renderEvent` prop to replace the default event pill with anything you w
|
|
|
112
138
|
events={events}
|
|
113
139
|
renderEvent={(event) => (
|
|
114
140
|
<span
|
|
115
|
-
|
|
116
|
-
|
|
141
|
+
style={{
|
|
142
|
+
display: 'block',
|
|
143
|
+
borderRadius: '4px',
|
|
144
|
+
padding: '2px 8px',
|
|
145
|
+
fontSize: '0.75rem',
|
|
146
|
+
color: 'white',
|
|
147
|
+
overflow: 'hidden',
|
|
148
|
+
backgroundColor: event.data?.color,
|
|
149
|
+
}}
|
|
117
150
|
>
|
|
118
151
|
{event.title}
|
|
119
152
|
</span>
|
|
@@ -134,6 +167,30 @@ const { data, isLoading } = useQuery(...)
|
|
|
134
167
|
/>
|
|
135
168
|
```
|
|
136
169
|
|
|
170
|
+
## Loading events per month
|
|
171
|
+
|
|
172
|
+
Use `onDateChange` to fetch only the events for the month currently visible. It fires every time the user navigates to a different month, receiving the `year` and `month` (0-indexed, same as `Date`) of the new view.
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
const [events, setEvents] = useState<CalendarEvent[]>([])
|
|
176
|
+
const [loading, setLoading] = useState(false)
|
|
177
|
+
|
|
178
|
+
async function handleDateChange(year: number, month: number) {
|
|
179
|
+
setLoading(true)
|
|
180
|
+
const data = await fetchEvents(year, month)
|
|
181
|
+
setEvents(data)
|
|
182
|
+
setLoading(false)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
<CalendarEvents
|
|
186
|
+
events={events}
|
|
187
|
+
loading={loading}
|
|
188
|
+
onDateChange={handleDateChange}
|
|
189
|
+
/>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
> `onDateChange` does not fire on the initial render. Call your fetch function once on mount with the starting year/month if you need to populate the calendar immediately.
|
|
193
|
+
|
|
137
194
|
## Props — `CalendarEvents`
|
|
138
195
|
|
|
139
196
|
| Prop | Type | Default | Description |
|
|
@@ -143,6 +200,7 @@ const { data, isLoading } = useQuery(...)
|
|
|
143
200
|
| `loading` | `boolean` | `false` | Shows an animated loading overlay |
|
|
144
201
|
| `className` | `string` | — | Extra classes for the root element |
|
|
145
202
|
| `onClickEvent` | `(event: CalendarEvent<TData>) => void` | — | Fired when the user clicks an event |
|
|
203
|
+
| `onDateChange` | `(year: number, month: number) => void` | — | Fired when the user navigates to a different month |
|
|
146
204
|
| `renderEvent` | `(event: CalendarEvent<TData>) => ReactNode` | — | Custom renderer for each event pill |
|
|
147
205
|
|
|
148
206
|
## Type — `CalendarEvent<TData>`
|
|
@@ -163,18 +221,29 @@ The library styles are built on CSS custom properties. If you imported `calendar
|
|
|
163
221
|
|
|
164
222
|
```css
|
|
165
223
|
:root {
|
|
166
|
-
--
|
|
167
|
-
--
|
|
168
|
-
--
|
|
169
|
-
--
|
|
170
|
-
--
|
|
171
|
-
--
|
|
172
|
-
--
|
|
173
|
-
--
|
|
224
|
+
--ce-background: 0 0% 100%;
|
|
225
|
+
--ce-foreground: 222.2 84% 4.9%;
|
|
226
|
+
--ce-primary: 222.2 47.4% 11.2%;
|
|
227
|
+
--ce-primary-foreground: 210 40% 98%;
|
|
228
|
+
--ce-secondary: 210 40% 96.1%;
|
|
229
|
+
--ce-muted-foreground: 215.4 16.3% 46.9%;
|
|
230
|
+
--ce-accent: 210 40% 96.1%;
|
|
231
|
+
--ce-border: 214.3 31.8% 91.4%;
|
|
232
|
+
--ce-radius: 0.5rem;
|
|
174
233
|
}
|
|
175
234
|
```
|
|
176
235
|
|
|
177
|
-
Values follow the `H S% L%` HSL format (no `hsl()` wrapper)
|
|
236
|
+
Values follow the `H S% L%` HSL format (no `hsl()` wrapper).
|
|
237
|
+
|
|
238
|
+
If you use shadcn/ui, you can map your existing variables:
|
|
239
|
+
|
|
240
|
+
```css
|
|
241
|
+
:root {
|
|
242
|
+
--ce-primary: var(--primary);
|
|
243
|
+
--ce-border: var(--border);
|
|
244
|
+
/* etc. */
|
|
245
|
+
}
|
|
246
|
+
```
|
|
178
247
|
|
|
179
248
|
## Dark mode
|
|
180
249
|
|
package/bin/init.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { readFileSync, writeFileSync
|
|
3
|
+
import { intro, outro, select, spinner, isCancel, cancel } from '@clack/prompts'
|
|
4
|
+
import { readFileSync, writeFileSync } from 'fs'
|
|
5
5
|
import { join, dirname } from 'path'
|
|
6
6
|
import { fileURLToPath } from 'url'
|
|
7
7
|
|
|
@@ -35,7 +35,7 @@ const PALETTES = {
|
|
|
35
35
|
},
|
|
36
36
|
naranja: {
|
|
37
37
|
claro: { primary: '24 90% 63%', secondary: '24 55% 93%', accent: '24 55% 94%', 'muted-foreground': '24 20% 55%', border: '24 35% 84%' },
|
|
38
|
-
medio: { primary: '24 100% 50%', secondary: '24 45% 90%', accent: '24 45% 91%', 'muted-foreground': '24 15% 50%', border: '24
|
|
38
|
+
medio: { primary: '24 100% 50%', secondary: '24 45% 90%', accent: '24 45% 91%', 'muted-foreground': '24 15% 50%', border: '24 15% 76%' },
|
|
39
39
|
oscuro: { primary: '24 100% 36%', secondary: '24 30% 87%', accent: '24 30% 88%', 'muted-foreground': '24 10% 45%', border: '24 15% 76%' },
|
|
40
40
|
},
|
|
41
41
|
}
|
|
@@ -43,62 +43,35 @@ const PALETTES = {
|
|
|
43
43
|
const COLOR_OPTIONS = ['verde', 'rojo', 'amarillo', 'morado', 'azul', 'naranja']
|
|
44
44
|
const SHADE_OPTIONS = ['claro', 'medio', 'oscuro']
|
|
45
45
|
|
|
46
|
-
function openTTY() {
|
|
47
|
-
// When npm/pnpm pipes stdin, we open /dev/tty directly to get
|
|
48
|
-
// an interactive terminal regardless of how the script was spawned.
|
|
49
|
-
if (process.stdin.isTTY) {
|
|
50
|
-
return { input: process.stdin, output: process.stdout }
|
|
51
|
-
}
|
|
52
|
-
if (!existsSync('/dev/tty')) return null
|
|
53
|
-
try {
|
|
54
|
-
return {
|
|
55
|
-
input: createReadStream('/dev/tty'),
|
|
56
|
-
output: createWriteStream('/dev/tty'),
|
|
57
|
-
}
|
|
58
|
-
} catch {
|
|
59
|
-
return null
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function ask(rl, prompt) {
|
|
64
|
-
return new Promise(resolve => rl.question(prompt, resolve))
|
|
65
|
-
}
|
|
66
|
-
|
|
67
46
|
async function main() {
|
|
68
|
-
|
|
69
|
-
if (!
|
|
47
|
+
// Salir silenciosamente en CI/CD (sin TTY)
|
|
48
|
+
if (!process.stdout.isTTY) process.exit(0)
|
|
70
49
|
|
|
71
|
-
|
|
50
|
+
intro('calendar-events — Setup de color')
|
|
72
51
|
|
|
73
|
-
|
|
52
|
+
const colorKey = await select({
|
|
53
|
+
message: 'Selecciona una paleta de colores:',
|
|
54
|
+
options: COLOR_OPTIONS.map(c => ({ value: c, label: c })),
|
|
55
|
+
})
|
|
74
56
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const colorAnswer = (await ask(rl, '\nColor (1-6): ')).trim()
|
|
79
|
-
const colorKey = COLOR_OPTIONS[parseInt(colorAnswer) - 1]
|
|
80
|
-
|
|
81
|
-
if (!colorKey) {
|
|
82
|
-
tty.output.write('Seleccion invalida.\n')
|
|
83
|
-
rl.close()
|
|
84
|
-
process.exit(1)
|
|
57
|
+
if (isCancel(colorKey)) {
|
|
58
|
+
cancel('Setup cancelado.')
|
|
59
|
+
process.exit(0)
|
|
85
60
|
}
|
|
86
61
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const shadeAnswer = (await ask(rl, '\nTono (1-3): ')).trim()
|
|
93
|
-
const shadeKey = SHADE_OPTIONS[parseInt(shadeAnswer) - 1]
|
|
62
|
+
const shadeKey = await select({
|
|
63
|
+
message: `Selecciona un tono para ${colorKey.toLocaleUpperCase()}:`,
|
|
64
|
+
options: SHADE_OPTIONS.map(s => ({ value: s, label: s })),
|
|
65
|
+
})
|
|
94
66
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
tty.output.write('Seleccion invalida.\n')
|
|
99
|
-
process.exit(1)
|
|
67
|
+
if (isCancel(shadeKey)) {
|
|
68
|
+
cancel('Setup cancelado.')
|
|
69
|
+
process.exit(0)
|
|
100
70
|
}
|
|
101
71
|
|
|
72
|
+
const s = spinner()
|
|
73
|
+
s.start('Aplicando paleta...')
|
|
74
|
+
|
|
102
75
|
const palette = PALETTES[colorKey][shadeKey]
|
|
103
76
|
const cssPath = join(__dirname, '..', 'dist', 'style.css')
|
|
104
77
|
let css = readFileSync(cssPath, 'utf-8')
|
|
@@ -112,7 +85,8 @@ async function main() {
|
|
|
112
85
|
|
|
113
86
|
writeFileSync(cssPath, css)
|
|
114
87
|
|
|
115
|
-
|
|
88
|
+
s.stop('Paleta aplicada.')
|
|
89
|
+
outro(`${colorKey} ${shadeKey} — listo!`)
|
|
116
90
|
}
|
|
117
91
|
|
|
118
92
|
main()
|
package/dist/calendar-events.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),z=require("react");function be(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const me=be(z);/**
|
|
2
2
|
* @license lucide-react v0.468.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -13,36 +13,36 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const xe=
|
|
16
|
+
*/const xe=z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:n,iconNode:a,...s},u)=>z.createElement("svg",{ref:u,...he,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:re("lucide",l),...s},[...a.map(([g,h])=>z.createElement(g,h)),...Array.isArray(n)?n:[n]]));/**
|
|
17
17
|
* @license lucide-react v0.468.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const U=(e,t)=>{const r=z.forwardRef(({className:o,...l},n)=>z.createElement(xe,{ref:n,iconNode:t,className:re(`lucide-${fe(e)}`,o),...l}));return r.displayName=`${e}`,r};/**
|
|
22
22
|
* @license lucide-react v0.468.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ye=
|
|
26
|
+
*/const ye=U("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
27
27
|
* @license lucide-react v0.468.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const we=
|
|
31
|
+
*/const we=U("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
32
32
|
* @license lucide-react v0.468.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const ve=
|
|
37
|
-
@keyframes ${
|
|
36
|
+
*/const ve=U("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);function oe({date:e,onPreviousMonth:t,onNextMonth:r}){return d.jsxs("div",{className:"flex items-center gap-4 calendar-header-container",children:[d.jsxs("div",{className:"flex items-center gap-2 calendar-header-date-change-container",children:[d.jsx("button",{onClick:t,className:"rounded-full size-10 bg-accent flex items-center justify-center transition-all calendar-header-date-change-button","aria-label":"Mes anterior",children:d.jsx(we,{className:"size-7 text-muted-foreground calendar-header-date-change-icon"})}),d.jsx("button",{onClick:r,className:"rounded-full size-10 bg-accent flex items-center justify-center transition-all calendar-header-date-change-button","aria-label":"Mes siguiente",children:d.jsx(ve,{className:"size-7 text-muted-foreground calendar-header-date-change-icon"})})]}),d.jsxs("p",{className:"flex items-center gap-2 font-medium text-xl capitalize calendar-header-date-title",children:[d.jsx(ye,{className:"size-7 text-primary calendar-header-date-icon"}),e.toLocaleDateString("es-CL",{month:"long",year:"numeric"})]})]})}function ne({label:e}){return d.jsx("div",{className:"text-muted-foreground px-3 text-xs lg:text-md xl:text-lg truncate calendar-week-header-item",children:e})}const ke=["LUNES","MARTES","MIÉRCOLES","JUEVES","VIERNES","SÁBADO","DOMINGO"];function se(){return d.jsx("div",{className:"grid grid-cols-7 bg-primary/20 rounded h-13 text-lg items-center mt-4 mb-1 calendar-week-header-container",children:ke.map(e=>d.jsx(ne,{label:e},e))})}function ae({event:e,onClickEvent:t}){return d.jsx("button",{className:"text-xs p-2 bg-secondary/50 w-full justify-start line-clamp-2 text-start rounded-lg italic cursor-pointer transition-all calendar-event-item",onClick:()=>t==null?void 0:t(e),children:e.title})}function F({day:e,events:t,isToday:r,isOutsideMonth:o=!1,onClickEvent:l,renderEvent:n}){return o?d.jsx("div",{className:"text-muted-foreground p-2 bg-accent/50 h-20 lg:h-28 text-xs calendar-day-is-outside",children:e.getDate()}):d.jsxs("div",{className:`p-2 rounded h-20 lg:h-28 flex flex-col bg-accent/50 border calendar-day-container ${r?"border-primary/50 calendar-day-is-today":"border-transparent calendar-day-is-not-today"}`,children:[d.jsx("div",{className:"font-medium text-xs calendar-day-number",children:e.getDate()}),d.jsx("div",{className:"mt-1 flex-1 overflow-y-auto p-1 space-y-1 calendar-day-event-list",children:t.map(a=>n?d.jsx("div",{children:n(a)},a.id):d.jsx(ae,{event:a,onClickEvent:l},a.id))})]})}const Ce=[{cx:7,cy:13.5},{cx:12,cy:13.5},{cx:17,cy:13.5},{cx:7,cy:17.5},{cx:12,cy:17.5},{cx:17,cy:17.5}],Me=.28,je=2.4;function le({size:e=24,color:t="currentColor",strokeWidth:r=2,className:o,style:l,...n}){const a=me.useId().replace(/:/g,"");return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:o,style:l,"aria-hidden":"true",...n,children:[d.jsx("style",{children:`
|
|
37
|
+
@keyframes ${a}-pulse {
|
|
38
38
|
0%, 100% { opacity: 0.12; transform: scale(1); }
|
|
39
39
|
30% { opacity: 1; transform: scale(1.5); }
|
|
40
40
|
55% { opacity: 0.12; transform: scale(1); }
|
|
41
41
|
}
|
|
42
|
-
.${
|
|
43
|
-
animation: ${
|
|
42
|
+
.${a}-dot {
|
|
43
|
+
animation: ${a}-pulse ${je}s ease-in-out infinite;
|
|
44
44
|
transform-box: fill-box;
|
|
45
45
|
transform-origin: center;
|
|
46
46
|
}
|
|
47
|
-
`}),d.jsx("rect",{x:"3",y:"4",width:"18",height:"17",rx:"2"}),d.jsx("path",{d:"M3 10h18"}),d.jsx("path",{d:"M8 2v4M16 2v4"}),ke.map((a,u)=>d.jsx("circle",{cx:a.cx,cy:a.cy,r:1.3,fill:t,stroke:"none",className:`${n}-dot`,style:{animationDelay:`${u*Me}s`,opacity:.12}},u))]})}function ie(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=ie(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Se(){for(var e,t,r=0,o="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=ie(e))&&(o&&(o+=" "),o+=t);return o}const U="-",ze=e=>{const t=Ne(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{const a=n.split(U);return a[0]===""&&a.length!==1&&a.shift(),ce(a,t)||De(n)},getConflictingClassGroupIds:(n,a)=>{const u=r[n]||[];return a&&o[n]?[...u,...o[n]]:u}}},ce=(e,t)=>{var n;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),l=o?ce(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;const s=e.join(U);return(n=t.validators.find(({validator:a})=>a(s)))==null?void 0:n.classGroupId},ee=/^\[(.+)\]$/,De=e=>{if(ee.test(e)){const t=ee.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ne=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ie(Object.entries(e.classGroups),r).forEach(([s,n])=>{V(n,o,s,t)}),o},V=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?t:te(t,l);s.classGroupId=r;return}if(typeof l=="function"){if(Ae(l)){V(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([s,n])=>{V(n,te(t,s),r,o)})})},te=(e,t)=>{let r=e;return t.split(U).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ae=e=>e.isThemeGetter,Ie=(e,t)=>t?e.map(([r,o])=>{const l=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([n,a])=>[t+n,a])):s);return[r,l]}):e,Re=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const l=(s,n)=>{r.set(s,n),t++,t>e&&(t=0,o=r,r=new Map)};return{get(s){let n=r.get(s);if(n!==void 0)return n;if((n=o.get(s))!==void 0)return l(s,n),n},set(s,n){r.has(s)?r.set(s,n):l(s,n)}}},de="!",Ee=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],s=t.length,n=a=>{const u=[];let m=0,f=0,w;for(let i=0;i<a.length;i++){let p=a[i];if(m===0){if(p===l&&(o||a.slice(i,i+s)===t)){u.push(a.slice(f,i)),f=i+s;continue}if(p==="/"){w=i;continue}}p==="["?m++:p==="]"&&m--}const v=u.length===0?a:a.substring(f),j=v.startsWith(de),C=j?v.substring(1):v,h=w&&w>f?w-f:void 0;return{modifiers:u,hasImportantModifier:j,baseClassName:C,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:n}):n},Pe=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Oe=e=>({cache:Re(e.cacheSize),parseClassName:Ee(e),...ze(e)}),Te=/\s+/,Ge=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,s=[],n=e.trim().split(Te);let a="";for(let u=n.length-1;u>=0;u-=1){const m=n[u],{modifiers:f,hasImportantModifier:w,baseClassName:v,maybePostfixModifierPosition:j}=r(m);let C=!!j,h=o(C?v.substring(0,j):v);if(!h){if(!C){a=m+(a.length>0?" "+a:a);continue}if(h=o(v),!h){a=m+(a.length>0?" "+a:a);continue}C=!1}const i=Pe(f).join(":"),p=w?i+de:i,x=p+h;if(s.includes(x))continue;s.push(x);const k=l(h,C);for(let y=0;y<k.length;++y){const M=k[y];s.push(p+M)}a=m+(a.length>0?" "+a:a)}return a};function Le(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ue(t))&&(o&&(o+=" "),o+=r);return o}const ue=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ue(e[o]))&&(r&&(r+=" "),r+=t);return r};function $e(e,...t){let r,o,l,s=n;function n(u){const m=t.reduce((f,w)=>w(f),e());return r=Oe(m),o=r.cache.get,l=r.cache.set,s=a,a(u)}function a(u){const m=o(u);if(m)return m;const f=Ge(u,r);return l(u,f),f}return function(){return s(Le.apply(null,arguments))}}const g=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},pe=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fe=/^\d+\/\d+$/,We=new Set(["px","full","screen"]),_e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Be=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>I(e)||We.has(e)||Fe.test(e),N=e=>R(e,"length",et),I=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>R(e,"number",I),P=e=>!!e&&Number.isInteger(Number(e)),qe=e=>e.endsWith("%")&&I(e.slice(0,-1)),c=e=>pe.test(e),A=e=>_e.test(e),He=new Set(["length","size","percentage"]),Je=e=>R(e,He,ge),Ke=e=>R(e,"position",ge),Xe=new Set(["image","url"]),Ze=e=>R(e,Xe,rt),Qe=e=>R(e,"",tt),O=()=>!0,R=(e,t,r)=>{const o=pe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},et=e=>Ye.test(e)&&!Ve.test(e),ge=()=>!1,tt=e=>Be.test(e),rt=e=>Ue.test(e),ot=()=>{const e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),l=g("borderColor"),s=g("borderRadius"),n=g("borderSpacing"),a=g("borderWidth"),u=g("contrast"),m=g("grayscale"),f=g("hueRotate"),w=g("invert"),v=g("gap"),j=g("gradientColorStops"),C=g("gradientColorStopPositions"),h=g("inset"),i=g("margin"),p=g("opacity"),x=g("padding"),k=g("saturate"),y=g("scale"),M=g("sepia"),q=g("skew"),H=g("space"),J=g("translate"),$=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",c,t],b=()=>[c,t],K=()=>["",D,N],T=()=>["auto",I,c],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],E=()=>["","0",c],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[I,c];return{cacheSize:500,separator:":",theme:{colors:[O],spacing:[D,N],blur:["none","",A,c],brightness:z(),borderColor:[e],borderRadius:["none","","full",A,c],borderSpacing:b(),borderWidth:K(),contrast:z(),grayscale:E(),hueRotate:z(),invert:E(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[qe,N],inset:W(),margin:W(),opacity:z(),padding:b(),saturate:z(),scale:z(),sepia:E(),skew:z(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[A]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),c]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",P,c]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",P,c]}],"grid-cols":[{"grid-cols":[O]}],"col-start-end":[{col:["auto",{span:["full",P,c]},c]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[O]}],"row-start-end":[{row:["auto",{span:[P,c]},c]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[i]}],mx:[{mx:[i]}],my:[{my:[i]}],ms:[{ms:[i]}],me:[{me:[i]}],mt:[{mt:[i]}],mr:[{mr:[i]}],mb:[{mb:[i]}],ml:[{ml:[i]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[A]},A]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",A,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y]}],"font-family":[{font:[O]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",I,Y]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",D,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",D,N]}],"underline-offset":[{"underline-offset":["auto",D,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Ke]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Je]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ze]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:G()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[D,c]}],"outline-w":[{outline:[D,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[D,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",A,Qe]}],"shadow-color":[{shadow:[O]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",A,c]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[w]}],saturate:[{saturate:[k]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[P,c]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[D,N,Y]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},nt=$e(ot);function st(...e){return nt(Se(e))}const at=new Map([["lunes",0],["martes",1],["miércoles",2],["miercoles",2],["jueves",3],["viernes",4],["sábado",5],["sabado",5],["domingo",6]]),lt=[{id:1,title:"Reunión de equipo",date:new Date(new Date().getFullYear(),new Date().getMonth(),5),description:"Reunión semanal del equipo"},{id:2,title:"Entrega proyecto",date:new Date(new Date().getFullYear(),new Date().getMonth(),10),description:"Fecha límite de entrega"},{id:3,title:"Capacitación",date:new Date(new Date().getFullYear(),new Date().getMonth(),15),description:"Capacitación en nuevas tecnologías"},{id:4,title:"Revisión código",date:new Date(new Date().getFullYear(),new Date().getMonth(),20),description:"Code review del sprint"},{id:5,title:"Demo cliente",date:new Date(new Date().getFullYear(),new Date().getMonth(),25),description:"Presentación al cliente"}];function it({initialDate:e=new Date,events:t=lt,className:r,loading:o=!1,onClickEvent:l,renderEvent:s}){const[n,a]=S.useState(e),u=S.useMemo(()=>{const i=n.getFullYear(),p=n.getMonth(),x=new Date(i,p+1,0).getDate(),k=[];for(let y=1;y<=x;y++)k.push(new Date(i,p,y));return k},[n]),m=()=>{const i=u[0].toLocaleDateString("es-CL",{weekday:"long"});return at.get(i)??0},f=S.useMemo(()=>{const i=m();if(i===0)return[];const p=n.getFullYear(),x=n.getMonth(),k=new Date(p,x,0).getDate(),y=[];for(let M=i-1;M>=0;M--)y.push(new Date(p,x-1,k-M));return y},[n,u]),w=S.useMemo(()=>{const p=42-m()-u.length;if(p<=0)return[];const x=n.getFullYear(),k=n.getMonth(),y=[];for(let M=1;M<=p;M++)y.push(new Date(x,k+1,M));return y},[n,u]),v=()=>{a(new Date(n.getFullYear(),n.getMonth()-1,1))},j=()=>{a(new Date(n.getFullYear(),n.getMonth()+1,1))},C=i=>i.toDateString()===new Date().toDateString(),h=i=>t.filter(p=>i.toDateString()===p.date.toDateString());return d.jsxs("div",{className:st("p-2 border rounded-lg w-full calendar-container",r),children:[d.jsx(oe,{date:n,onPreviousMonth:v,onNextMonth:j}),d.jsx(se,{}),d.jsxs("div",{className:"relative calendar-body",children:[o&&d.jsxs("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-background/90 flex-col gap-2 calendar-loading-overlay",children:[d.jsx(le,{size:90,className:"text-primary"}),d.jsx("p",{className:"text-lg italic text-muted-foreground calendar-loading-text",children:"Cargando Eventos del Calendario..."})]}),d.jsxs("div",{className:"grid grid-cols-7 gap-1 calendar-grid",children:[f.map(i=>d.jsx(L,{day:i,events:[],isToday:!1,isOutsideMonth:!0},i.toISOString())),u.map(i=>d.jsx(L,{day:i,events:h(i),isToday:C(i),onClickEvent:l,renderEvent:s},i.toISOString())),w.map(i=>d.jsx(L,{day:i,events:[],isToday:!1,isOutsideMonth:!0},i.toISOString()))]})]})]})}exports.CalendarAnimatedIcon=le;exports.CalendarDay=L;exports.CalendarEventItem=ae;exports.CalendarEvents=it;exports.CalendarHeader=oe;exports.CalendarWeekHeader=se;exports.CalendarWeekHeaderItem=ne;
|
|
47
|
+
`}),d.jsx("rect",{x:"3",y:"4",width:"18",height:"17",rx:"2"}),d.jsx("path",{d:"M3 10h18"}),d.jsx("path",{d:"M8 2v4M16 2v4"}),Ce.map((s,u)=>d.jsx("circle",{cx:s.cx,cy:s.cy,r:1.3,fill:t,stroke:"none",className:`${a}-dot`,style:{animationDelay:`${u*Me}s`,opacity:.12}},u))]})}function ie(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=ie(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Se(){for(var e,t,r=0,o="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=ie(e))&&(o&&(o+=" "),o+=t);return o}const q="-",ze=e=>{const t=Ae(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{const s=a.split(q);return s[0]===""&&s.length!==1&&s.shift(),ce(s,t)||Ne(a)},getConflictingClassGroupIds:(a,s)=>{const u=r[a]||[];return s&&o[a]?[...u,...o[a]]:u}}},ce=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),l=o?ce(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;const n=e.join(q);return(a=t.validators.find(({validator:s})=>s(n)))==null?void 0:a.classGroupId},ee=/^\[(.+)\]$/,Ne=e=>{if(ee.test(e)){const t=ee.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ae=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ie(Object.entries(e.classGroups),r).forEach(([n,a])=>{B(a,o,n,t)}),o},B=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){const n=l===""?t:te(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(De(l)){B(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,a])=>{B(a,te(t,n),r,o)})})},te=(e,t)=>{let r=e;return t.split(q).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},De=e=>e.isThemeGetter,Ie=(e,t)=>t?e.map(([r,o])=>{const l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([a,s])=>[t+a,s])):n);return[r,l]}):e,Re=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const l=(n,a)=>{r.set(n,a),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let a=r.get(n);if(a!==void 0)return a;if((a=o.get(n))!==void 0)return l(n,a),a},set(n,a){r.has(n)?r.set(n,a):l(n,a)}}},de="!",Ee=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,a=s=>{const u=[];let g=0,h=0,v;for(let m=0;m<s.length;m++){let i=s[m];if(g===0){if(i===l&&(o||s.slice(m,m+n)===t)){u.push(s.slice(h,m)),h=m+n;continue}if(i==="/"){v=m;continue}}i==="["?g++:i==="]"&&g--}const k=u.length===0?s:s.substring(h),j=k.startsWith(de),C=j?k.substring(1):k,x=v&&v>h?v-h:void 0;return{modifiers:u,hasImportantModifier:j,baseClassName:C,maybePostfixModifierPosition:x}};return r?s=>r({className:s,parseClassName:a}):a},Pe=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Oe=e=>({cache:Re(e.cacheSize),parseClassName:Ee(e),...ze(e)}),Te=/\s+/,Ge=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],a=e.trim().split(Te);let s="";for(let u=a.length-1;u>=0;u-=1){const g=a[u],{modifiers:h,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:j}=r(g);let C=!!j,x=o(C?k.substring(0,j):k);if(!x){if(!C){s=g+(s.length>0?" "+s:s);continue}if(x=o(k),!x){s=g+(s.length>0?" "+s:s);continue}C=!1}const m=Pe(h).join(":"),i=v?m+de:m,f=i+x;if(n.includes(f))continue;n.push(f);const M=l(x,C);for(let y=0;y<M.length;++y){const w=M[y];n.push(i+w)}s=g+(s.length>0?" "+s:s)}return s};function Le(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ue(t))&&(o&&(o+=" "),o+=r);return o}const ue=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ue(e[o]))&&(r&&(r+=" "),r+=t);return r};function Fe(e,...t){let r,o,l,n=a;function a(u){const g=t.reduce((h,v)=>v(h),e());return r=Oe(g),o=r.cache.get,l=r.cache.set,n=s,s(u)}function s(u){const g=o(u);if(g)return g;const h=Ge(u,r);return l(u,h),h}return function(){return n(Le.apply(null,arguments))}}const p=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},pe=/^\[(?:([a-z-]+):)?(.+)\]$/i,$e=/^\d+\/\d+$/,We=new Set(["px","full","screen"]),_e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Be=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>R(e)||We.has(e)||$e.test(e),D=e=>E(e,"length",et),R=e=>!!e&&!Number.isNaN(Number(e)),V=e=>E(e,"number",R),O=e=>!!e&&Number.isInteger(Number(e)),qe=e=>e.endsWith("%")&&R(e.slice(0,-1)),c=e=>pe.test(e),I=e=>_e.test(e),He=new Set(["length","size","percentage"]),Je=e=>E(e,He,ge),Ke=e=>E(e,"position",ge),Xe=new Set(["image","url"]),Ze=e=>E(e,Xe,rt),Qe=e=>E(e,"",tt),T=()=>!0,E=(e,t,r)=>{const o=pe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},et=e=>Ye.test(e)&&!Ve.test(e),ge=()=>!1,tt=e=>Be.test(e),rt=e=>Ue.test(e),ot=()=>{const e=p("colors"),t=p("spacing"),r=p("blur"),o=p("brightness"),l=p("borderColor"),n=p("borderRadius"),a=p("borderSpacing"),s=p("borderWidth"),u=p("contrast"),g=p("grayscale"),h=p("hueRotate"),v=p("invert"),k=p("gap"),j=p("gradientColorStops"),C=p("gradientColorStopPositions"),x=p("inset"),m=p("margin"),i=p("opacity"),f=p("padding"),M=p("saturate"),y=p("scale"),w=p("sepia"),S=p("skew"),H=p("space"),J=p("translate"),$=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",c,t],b=()=>[c,t],K=()=>["",A,D],G=()=>["auto",R,c],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",c],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[R,c];return{cacheSize:500,separator:":",theme:{colors:[T],spacing:[A,D],blur:["none","",I,c],brightness:N(),borderColor:[e],borderRadius:["none","","full",I,c],borderSpacing:b(),borderWidth:K(),contrast:N(),grayscale:P(),hueRotate:N(),invert:P(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[qe,D],inset:_(),margin:_(),opacity:N(),padding:b(),saturate:N(),scale:N(),sepia:P(),skew:N(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[I]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),c]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",O,c]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",O,c]}],"grid-cols":[{"grid-cols":[T]}],"col-start-end":[{col:["auto",{span:["full",O,c]},c]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[T]}],"row-start-end":[{row:["auto",{span:[O,c]},c]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[I]},I]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",I,D]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",V]}],"font-family":[{font:[T]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",R,V]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",A,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[i]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",A,D]}],"underline-offset":[{"underline-offset":["auto",A,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[i]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Ke]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Je]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ze]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[i]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[i]}],"divide-style":[{divide:L()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[A,c]}],"outline-w":[{outline:[A,D]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[i]}],"ring-offset-w":[{"ring-offset":[A,D]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",I,Qe]}],"shadow-color":[{shadow:[T]}],opacity:[{opacity:[i]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",I,c]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[v]}],saturate:[{saturate:[M]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[i]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[O,c]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[A,D,V]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},nt=Fe(ot);function st(...e){return nt(Se(e))}const at=new Map([["lunes",0],["martes",1],["miércoles",2],["miercoles",2],["jueves",3],["viernes",4],["sábado",5],["sabado",5],["domingo",6]]),lt=[{id:1,title:"Reunión de equipo",date:new Date(new Date().getFullYear(),new Date().getMonth(),5),description:"Reunión semanal del equipo"},{id:2,title:"Entrega proyecto",date:new Date(new Date().getFullYear(),new Date().getMonth(),10),description:"Fecha límite de entrega"},{id:3,title:"Capacitación",date:new Date(new Date().getFullYear(),new Date().getMonth(),15),description:"Capacitación en nuevas tecnologías"},{id:4,title:"Revisión código",date:new Date(new Date().getFullYear(),new Date().getMonth(),20),description:"Code review del sprint"},{id:5,title:"Demo cliente",date:new Date(new Date().getFullYear(),new Date().getMonth(),25),description:"Presentación al cliente"}];function it({initialDate:e=new Date,events:t=lt,className:r,loading:o=!1,onClickEvent:l,onDateChange:n,renderEvent:a}){const[s,u]=z.useState(e),g=z.useMemo(()=>{const i=s.getFullYear(),f=s.getMonth(),M=new Date(i,f+1,0).getDate(),y=[];for(let w=1;w<=M;w++)y.push(new Date(i,f,w));return y},[s]),h=()=>{const i=g[0].toLocaleDateString("es-CL",{weekday:"long"});return at.get(i)??0},v=z.useMemo(()=>{const i=h();if(i===0)return[];const f=s.getFullYear(),M=s.getMonth(),y=new Date(f,M,0).getDate(),w=[];for(let S=i-1;S>=0;S--)w.push(new Date(f,M-1,y-S));return w},[s,g]),k=z.useMemo(()=>{const f=42-h()-g.length;if(f<=0)return[];const M=s.getFullYear(),y=s.getMonth(),w=[];for(let S=1;S<=f;S++)w.push(new Date(M,y+1,S));return w},[s,g]),j=()=>{const i=new Date(s.getFullYear(),s.getMonth()-1,1);u(i),n==null||n(i.getFullYear(),i.getMonth())},C=()=>{const i=new Date(s.getFullYear(),s.getMonth()+1,1);u(i),n==null||n(i.getFullYear(),i.getMonth())},x=i=>i.toDateString()===new Date().toDateString(),m=i=>t.filter(f=>i.toDateString()===f.date.toDateString());return d.jsxs("div",{className:st("p-2 border rounded-lg w-full calendar-container",r),children:[d.jsx(oe,{date:s,onPreviousMonth:j,onNextMonth:C}),d.jsx(se,{}),d.jsxs("div",{className:"relative calendar-body",children:[o&&d.jsxs("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-background/90 flex-col gap-2 calendar-loading-overlay",children:[d.jsx(le,{size:90,className:"text-primary"}),d.jsx("p",{className:"text-lg italic text-muted-foreground calendar-loading-text",children:"Cargando Eventos del Calendario..."})]}),d.jsxs("div",{className:"grid grid-cols-7 gap-1 calendar-grid",children:[v.map(i=>d.jsx(F,{day:i,events:[],isToday:!1,isOutsideMonth:!0},i.toISOString())),g.map(i=>d.jsx(F,{day:i,events:m(i),isToday:x(i),onClickEvent:l,renderEvent:a},i.toISOString())),k.map(i=>d.jsx(F,{day:i,events:[],isToday:!1,isOutsideMonth:!0},i.toISOString()))]})]})]})}exports.CalendarAnimatedIcon=le;exports.CalendarDay=F;exports.CalendarEventItem=ae;exports.CalendarEvents=it;exports.CalendarHeader=oe;exports.CalendarWeekHeader=se;exports.CalendarWeekHeaderItem=ne;
|
|
48
48
|
//# sourceMappingURL=calendar-events.cjs.map
|