Adds work week configuration feature

Implements configurable work week presets, allowing users to customize the days displayed in the calendar.

This includes:
- Defining work week settings (work days, day names, total days).
- Providing predefined work week presets (standard, compressed, weekend, full week).
- Adding UI elements to switch between presets.
- Updating grid and header rendering logic to reflect the selected work week.
- Emitting events when the work week changes, triggering necessary UI updates and data re-renders.

This provides a more flexible and personalized calendar experience.
This commit is contained in:
Janus Knudsen 2025-08-18 22:27:17 +02:00
parent 26f0cb8aaa
commit d017d48bd6
11 changed files with 283 additions and 34 deletions

View file

@ -87,6 +87,44 @@ swp-view-button {
}
}
/* Workweek Presets */
swp-workweek-presets {
display: flex;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: 4px;
overflow: hidden;
margin-left: 16px;
}
swp-preset-button {
padding: 6px 12px;
border: none;
background: transparent;
cursor: pointer;
font-size: 0.75rem;
font-weight: 500;
transition: all var(--transition-fast);
position: relative;
color: var(--color-text-secondary);
&:not(:last-child) {
border-right: 1px solid var(--color-border);
}
&[data-active="true"] {
background: var(--color-primary);
color: white;
font-weight: 600;
}
&[disabled] {
opacity: 0.5;
cursor: not-allowed;
}
}
/* Search container */
swp-search-container {
margin-left: auto;