diff --git a/go-backend/internal/web/ui/button.css b/go-backend/internal/web/ui/button.css index 95fb45e..e4ee750 100644 --- a/go-backend/internal/web/ui/button.css +++ b/go-backend/internal/web/ui/button.css @@ -36,7 +36,7 @@ .ui-button-md { font-size: 0.95rem; - padding: 0.75rem 1.1rem; + padding: 0.7rem 1rem; } .ui-button-lg { diff --git a/go-backend/internal/web/views/tasks.templ b/go-backend/internal/web/views/tasks.templ index 8d12c7f..bfd46b0 100644 --- a/go-backend/internal/web/views/tasks.templ +++ b/go-backend/internal/web/views/tasks.templ @@ -1,24 +1,38 @@ package views import taskmodel "xtablo-backend/internal/tasks" +import "xtablo-backend/internal/web/ui" templ TasksPageContent(vm TasksPageViewModel) {

Mes Tâches

- + @ui.Button(ui.ButtonProps{ + Label: "Nouvelle tâche", + Variant: ui.ButtonVariantDefault, + Size: ui.SizeMD, + Type: "button", + Icon: "plus", + })
@TasksViewTabs(vm.State)
- + @ui.Button(ui.ButtonProps{ + Label: tasksFilterSummaryLabel(vm.Filters), + Variant: ui.ButtonVariantNeutral, + Tone: ui.ButtonToneSolid, + Size: ui.SizeMD, + Type: "button", + Icon: "filter", + Attrs: templ.Attributes{ + "data-tasks-filter-trigger": "", + "aria-haspopup": "menu", + "aria-expanded": "false", + }, + })
+ @TasksFilterMenu(vm)
if !vm.HasTasks { @@ -36,17 +50,168 @@ templ TasksPageContent(vm TasksPageViewModel) {
} +templ TasksFilterMenu(vm TasksPageViewModel) { +
+ + +
+} + templ TasksViewTabs(state taskmodel.TaskPageState) {
- + @TasksIcon("kanban", "w-4 h-4") Tableau - + @TasksIcon("list", "w-4 h-4") Liste - + @TasksIcon("map", "w-4 h-4") Roadmap @@ -57,13 +222,8 @@ templ TasksViewTabs(state taskmodel.TaskPageState) {
if state.View == taskmodel.TaskViewRoadmap { -
- - Semaine - - - Mois - +
+ @ui.Select(taskRoadmapModeSelectProps(state))
} } @@ -74,13 +234,17 @@ templ TasksKanbanLayout(view TasksKanbanView, state taskmodel.TaskPageState) {
- @TasksIcon("circle", "lucide lucide-circle w-5 h-5 " + statusIconClass(column.ID)) + @TasksIcon("circle", "lucide lucide-circle w-5 h-5 "+statusIconClass(column.ID))

{ column.Label }

{ len(column.Tasks) }
- + @ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + column.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + })
for _, task := range column.Tasks { @@ -98,13 +262,17 @@ templ TasksListLayout(view TasksListView, state taskmodel.TaskPageState) {
- @TasksIcon("circle", "lucide lucide-circle w-5 h-5 " + statusIconClass(group.ID)) + @TasksIcon("circle", "lucide lucide-circle w-5 h-5 "+statusIconClass(group.ID))

{ group.Label }

{ len(group.Tasks) }
- + @ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + group.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + })
for _, task := range group.Tasks { @@ -125,9 +293,13 @@ templ TasksRoadmapLayout(view TasksRoadmapView, state taskmodel.TaskPageState) {

{ lane.Label }

Étape comme lane horizontale, avec bucketisation par date d'échéance.

- + @ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + lane.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + })
for _, bucket := range lane.Buckets { @@ -153,12 +325,30 @@ templ TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) {

{ task.Title }

- - + @ui.IconButton(ui.IconButtonProps{ + Label: "Modifier la tâche " + task.Title, + Icon: "pencil", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + Attrs: templ.Attributes{ + "hx-get": taskEditHref(task, state), + "hx-target": "#app-main-content", + "hx-swap": "beforeend", + }, + }) + @ui.IconButton(ui.IconButtonProps{ + Label: taskDeleteAriaLabel(task), + Icon: "trash", + Variant: ui.IconButtonVariantDanger, + Tone: ui.IconButtonToneGhost, + Type: "button", + Attrs: templ.Attributes{ + "hx-delete": taskDeleteHref(task, state), + "hx-target": "#app-main-content", + "hx-swap": "outerHTML", + }, + })
if task.DueDate != "" {
@@ -320,6 +510,10 @@ templ TasksIcon(kind string, className string) { + case "check": + + + default: @TasksIcon("circle", className) } diff --git a/go-backend/internal/web/views/tasks_templ.go b/go-backend/internal/web/views/tasks_templ.go index 4e10b0c..c03539f 100644 --- a/go-backend/internal/web/views/tasks_templ.go +++ b/go-backend/internal/web/views/tasks_templ.go @@ -9,6 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import taskmodel "xtablo-backend/internal/tasks" +import "xtablo-backend/internal/web/ui" func TasksPageContent(vm TasksPageViewModel) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { @@ -38,21 +39,27 @@ func TasksPageContent(vm TasksPageViewModel) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(vm.State.View)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 6, Col: 68} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 7, Col: 68} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\">

Mes Tâches

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -60,20 +67,40 @@ func TasksPageContent(vm TasksPageViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = TasksFilterMenu(vm).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if !vm.HasTasks { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
Aucune tâche pour le moment.
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
Aucune tâche pour le moment.
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -93,7 +120,322 @@ func TasksPageContent(vm TasksPageViewModel) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +func TasksFilterMenu(vm TasksPageViewModel) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if vm.State.View == taskmodel.TaskViewRoadmap { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "
Projet
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if tasksFilterGroupAllSelected(vm.Filters.Tablos) { + templ_7745c5c3_Err = TasksIcon("check", "h-4 w-4").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, " Tous les projets ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, option := range vm.Filters.Tablos { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
Statut
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if tasksFilterGroupAllSelected(vm.Filters.Statuses) { + templ_7745c5c3_Err = TasksIcon("check", "h-4 w-4").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, " Tous ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, option := range vm.Filters.Statuses { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "
Assigné
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if tasksFilterGroupAllSelected(vm.Filters.Assignees) { + templ_7745c5c3_Err = TasksIcon("check", "h-4 w-4").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, " Tous ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, option := range vm.Filters.Assignees { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -117,57 +459,57 @@ func TasksViewTabs(state taskmodel.TaskPageState) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent + templ_7745c5c3_Var16 := templ.GetChildren(ctx) + if templ_7745c5c3_Var16 == nil { + templ_7745c5c3_Var16 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var4 = []any{taskViewTabClass(state, taskmodel.TaskViewKanban)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var4...) + var templ_7745c5c3_Var17 = []any{taskViewTabClass(state, taskmodel.TaskViewKanban)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var17...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -175,52 +517,52 @@ func TasksViewTabs(state taskmodel.TaskPageState) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "Tableau ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "Tableau ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var7 = []any{taskViewTabClass(state, taskmodel.TaskViewList)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var7...) + var templ_7745c5c3_Var20 = []any{taskViewTabClass(state, taskmodel.TaskViewList)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var20...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -228,52 +570,52 @@ func TasksViewTabs(state taskmodel.TaskPageState) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "Liste ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "Liste ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var10 = []any{taskViewTabClass(state, taskmodel.TaskViewRoadmap)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var10...) + var templ_7745c5c3_Var23 = []any{taskViewTabClass(state, taskmodel.TaskViewRoadmap)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var23...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -281,7 +623,7 @@ func TasksViewTabs(state taskmodel.TaskPageState) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "Roadmap
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "Calendrier Bientôt
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if state.View == taskmodel.TaskViewRoadmap { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var13 = []any{taskRoadmapModeClass(state, taskmodel.TaskRoadmapModeWeek)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var13...) + templ_7745c5c3_Err = ui.Select(taskRoadmapModeSelectProps(state)).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "Semaine ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var16 = []any{taskRoadmapModeClass(state, taskmodel.TaskRoadmapModeMonth)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var16...) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "Mois
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -389,30 +669,30 @@ func TasksKanbanLayout(view TasksKanbanView, state taskmodel.TaskPageState) temp }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var19 := templ.GetChildren(ctx) - if templ_7745c5c3_Var19 == nil { - templ_7745c5c3_Var19 = templ.NopComponent + templ_7745c5c3_Var26 := templ.GetChildren(ctx) + if templ_7745c5c3_Var26 == nil { + templ_7745c5c3_Var26 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, column := range view.Columns { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -420,41 +700,47 @@ func TasksKanbanLayout(view TasksKanbanView, state taskmodel.TaskPageState) temp if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var21 string - templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(column.Label) + var templ_7745c5c3_Var28 string + templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(column.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 78, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 238, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var22 string - templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(len(column.Tasks)) + var templ_7745c5c3_Var29 string + templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(len(column.Tasks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 79, Col: 146} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 239, Col: 146} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = TasksIcon("plus", "lucide lucide-plus w-[18px] h-[18px]").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + column.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + }).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -464,12 +750,12 @@ func TasksKanbanLayout(view TasksKanbanView, state taskmodel.TaskPageState) temp return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -493,30 +779,30 @@ func TasksListLayout(view TasksListView, state taskmodel.TaskPageState) templ.Co }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var23 := templ.GetChildren(ctx) - if templ_7745c5c3_Var23 == nil { - templ_7745c5c3_Var23 = templ.NopComponent + templ_7745c5c3_Var30 := templ.GetChildren(ctx) + if templ_7745c5c3_Var30 == nil { + templ_7745c5c3_Var30 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, group := range view.Groups { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -524,41 +810,47 @@ func TasksListLayout(view TasksListView, state taskmodel.TaskPageState) templ.Co if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var25 string - templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label) + var templ_7745c5c3_Var32 string + templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 102, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 266, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var26 string - templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(len(group.Tasks)) + var templ_7745c5c3_Var33 string + templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(len(group.Tasks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 103, Col: 145} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 267, Col: 145} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = TasksIcon("plus", "lucide lucide-plus w-[18px] h-[18px]").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + group.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + }).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -568,12 +860,12 @@ func TasksListLayout(view TasksListView, state taskmodel.TaskPageState) templ.Co return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -597,95 +889,101 @@ func TasksRoadmapLayout(view TasksRoadmapView, state taskmodel.TaskPageState) te }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var27 := templ.GetChildren(ctx) - if templ_7745c5c3_Var27 == nil { - templ_7745c5c3_Var27 = templ.NopComponent + templ_7745c5c3_Var34 := templ.GetChildren(ctx) + if templ_7745c5c3_Var34 == nil { + templ_7745c5c3_Var34 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, lane := range view.Lanes { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var29 string - templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(lane.Label) + var templ_7745c5c3_Var36 string + templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(lane.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 125, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 293, Col: 77} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "

Étape comme lane horizontale, avec bucketisation par date d'échéance.

Étape comme lane horizontale, avec bucketisation par date d'échéance.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = TasksIcon("plus", "lucide lucide-plus w-[18px] h-[18px]").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = ui.IconButton(ui.IconButtonProps{ + Label: "Nouvelle tâche dans " + lane.Label, + Icon: "plus", + Variant: ui.IconButtonVariantNeutral, + Tone: ui.IconButtonToneGhost, + Type: "button", + }).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, bucket := range lane.Buckets { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var31 string - templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(bucket.Label) + var templ_7745c5c3_Var38 string + templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(bucket.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 136, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 308, Col: 89} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var32 string - templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(len(bucket.Tasks)) + var templ_7745c5c3_Var39 string + templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(len(bucket.Tasks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 137, Col: 152} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 309, Col: 152} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -695,17 +993,17 @@ func TasksRoadmapLayout(view TasksRoadmapView, state taskmodel.TaskPageState) te return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -729,134 +1027,113 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var33 := templ.GetChildren(ctx) - if templ_7745c5c3_Var33 == nil { - templ_7745c5c3_Var33 = templ.NopComponent + templ_7745c5c3_Var40 := templ.GetChildren(ctx) + if templ_7745c5c3_Var40 == nil { + templ_7745c5c3_Var40 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - var templ_7745c5c3_Var34 = []any{taskCardClass(compact)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var34...) + var templ_7745c5c3_Var41 = []any{taskCardClass(compact)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var41...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var37 string - templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(task.Title) + var templ_7745c5c3_Var44 string + templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(task.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 155, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 327, Col: 116} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if task.DueDate != "" { - var templ_7745c5c3_Var41 = []any{"flex items-center text-xs mb-3 " + dueDateToneClass(task.DueDateValue)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var41...) + var templ_7745c5c3_Var45 = []any{"flex items-center text-xs mb-3 " + dueDateToneClass(task.DueDateValue)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var45...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -864,43 +1141,43 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var43 string - templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(task.DueDate) + var templ_7745c5c3_Var47 string + templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(task.DueDate) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 166, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 356, Col: 18} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var44 = []any{"w-5 h-5 rounded-[5px] mr-2 flex items-center justify-center shrink-0 " + etapeBadgeClass(task)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var44...) + var templ_7745c5c3_Var48 = []any{"w-5 h-5 rounded-[5px] mr-2 flex items-center justify-center shrink-0 " + etapeBadgeClass(task)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var48...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -908,20 +1185,20 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var46 string - templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(etapeLabel(task)) + var templ_7745c5c3_Var50 string + templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(etapeLabel(task)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 173, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 363, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -929,7 +1206,7 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "0
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "0
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -937,20 +1214,20 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "0
Tablo ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "0
Tablo ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var47 string - templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(task.TabloName) + var templ_7745c5c3_Var51 string + templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(task.TabloName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 186, Col: 98} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 376, Col: 98} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -958,7 +1235,7 @@ func TaskCard(task TaskCardView, state taskmodel.TaskPageState, compact bool) te if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -982,25 +1259,25 @@ func TasksListRow(task TaskCardView, state taskmodel.TaskPageState) templ.Compon }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var48 := templ.GetChildren(ctx) - if templ_7745c5c3_Var48 == nil { - templ_7745c5c3_Var48 = templ.NopComponent + templ_7745c5c3_Var52 := templ.GetChildren(ctx) + if templ_7745c5c3_Var52 == nil { + templ_7745c5c3_Var52 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1008,59 +1285,59 @@ func TasksListRow(task TaskCardView, state taskmodel.TaskPageState) templ.Compon if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "
Tablo
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "
Tablo
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var50 string - templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(task.TabloName) + var templ_7745c5c3_Var54 string + templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(task.TabloName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 204, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 394, Col: 39} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "
Étape
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "
Étape
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var51 string - templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(etapeLabel(task)) + var templ_7745c5c3_Var55 string + templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(etapeLabel(task)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 208, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 398, Col: 41} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "
Assignée
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "
Assignée
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var52 string - templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(emptyFallback(task.Assignee, "Non assignée")) + var templ_7745c5c3_Var56 string + templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(emptyFallback(task.Assignee, "Non assignée")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 212, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 402, Col: 70} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "
Statut
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "
Statut
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var53 string - templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(task.StatusLabel) + var templ_7745c5c3_Var57 string + templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(task.StatusLabel) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 216, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 406, Col: 41} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1084,31 +1361,31 @@ func TaskAssigneeAvatar(task TaskCardView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var54 := templ.GetChildren(ctx) - if templ_7745c5c3_Var54 == nil { - templ_7745c5c3_Var54 = templ.NopComponent + templ_7745c5c3_Var58 := templ.GetChildren(ctx) + if templ_7745c5c3_Var58 == nil { + templ_7745c5c3_Var58 = templ.NopComponent } ctx = templ.ClearChildren(ctx) if taskHasAssignee(task) { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var55 string - templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(assigneeInitials(task.Assignee)) + var templ_7745c5c3_Var59 string + templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(assigneeInitials(task.Assignee)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 227, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/views/tasks.templ`, Line: 417, Col: 36} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1116,7 +1393,7 @@ func TaskAssigneeAvatar(task TaskCardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1141,65 +1418,19 @@ func TasksIcon(kind string, className string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var56 := templ.GetChildren(ctx) - if templ_7745c5c3_Var56 == nil { - templ_7745c5c3_Var56 = templ.NopComponent + templ_7745c5c3_Var60 := templ.GetChildren(ctx) + if templ_7745c5c3_Var60 == nil { + templ_7745c5c3_Var60 = templ.NopComponent } ctx = templ.ClearChildren(ctx) switch kind { case "circle": - var templ_7745c5c3_Var57 = []any{className} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var57...) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - case "plus": - var templ_7745c5c3_Var59 = []any{className} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var59...) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - case "kanban": var templ_7745c5c3_Var61 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var61...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "list": + case "plus": var templ_7745c5c3_Var63 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var63...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "map": + case "kanban": var templ_7745c5c3_Var65 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var65...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "calendar": + case "list": var templ_7745c5c3_Var67 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var67...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "settings2": + case "map": var templ_7745c5c3_Var69 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var69...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "ellipsis-vertical": + case "calendar": var templ_7745c5c3_Var71 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var71...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "trash2": + case "settings2": var templ_7745c5c3_Var73 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var73...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "message-square": + case "ellipsis-vertical": var templ_7745c5c3_Var75 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var75...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "paperclip": + case "trash2": var templ_7745c5c3_Var77 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var77...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "user": + case "message-square": var templ_7745c5c3_Var79 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var79...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "gem": + case "paperclip": var templ_7745c5c3_Var81 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var81...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "flame": + case "user": var templ_7745c5c3_Var83 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var83...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - case "zap": + case "gem": var templ_7745c5c3_Var85 = []any{className} templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var85...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "\"> ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case "flame": + var templ_7745c5c3_Var87 = []any{className} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var87...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case "zap": + var templ_7745c5c3_Var89 = []any{className} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var89...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case "check": + var templ_7745c5c3_Var91 = []any{className} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var91...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/go-backend/internal/web/views/tasks_view.go b/go-backend/internal/web/views/tasks_view.go index c277720..e3548fb 100644 --- a/go-backend/internal/web/views/tasks_view.go +++ b/go-backend/internal/web/views/tasks_view.go @@ -3,12 +3,14 @@ package views import ( "net/url" "slices" + "strconv" "strings" "time" "github.com/google/uuid" tablomodel "xtablo-backend/internal/tablos" taskmodel "xtablo-backend/internal/tasks" + "xtablo-backend/internal/web/ui" ) type TasksPageViewModel struct { @@ -391,6 +393,75 @@ func taskRoadmapModeClass(state taskmodel.TaskPageState, mode taskmodel.TaskRoad return base + "bg-gray-100 text-gray-600 border border-transparent hover:text-gray-900 dark:bg-gray-800 dark:text-gray-300" } +func taskRoadmapModeSelectProps(state taskmodel.TaskPageState) ui.SelectProps { + return ui.SelectProps{ + ID: "tasks-roadmap-mode", + Name: "roadmap_mode_nav", + Value: taskRoadmapModeHref(state, state.RoadmapMode), + Options: []ui.SelectOption{ + {Value: taskRoadmapModeHref(state, taskmodel.TaskRoadmapModeWeek), Label: "Semaine"}, + {Value: taskRoadmapModeHref(state, taskmodel.TaskRoadmapModeMonth), Label: "Mois"}, + }, + Attrs: map[string]any{ + "onchange": "if (this.value) window.location.href=this.value", + }, + } +} + +func tasksFilterSummaryLabel(filters TasksFiltersView) string { + count := 0 + for _, option := range filters.Tablos { + if option.Selected { + count++ + } + } + for _, option := range filters.Statuses { + if option.Selected { + count++ + } + } + for _, option := range filters.Assignees { + if option.Selected { + count++ + } + } + if count == 0 { + return "Filtrer" + } + return "Filtrer (" + strconv.Itoa(count) + ")" +} + +func tasksFilterGroupAllSelected(options []TasksOptionView) bool { + for _, option := range options { + if option.Selected { + return false + } + } + return true +} + +func tasksFilterGroupHasChoices(options []TasksOptionView) bool { + return len(options) > 0 +} + +func tasksClearTabloFiltersHref(state taskmodel.TaskPageState) string { + nextState := state + nextState.TabloIDs = nil + return stateAction("/tasks", nextState) +} + +func tasksClearStatusFiltersHref(state taskmodel.TaskPageState) string { + nextState := state + nextState.Statuses = nil + return stateAction("/tasks", nextState) +} + +func tasksClearAssigneeFiltersHref(state taskmodel.TaskPageState) string { + nextState := state + nextState.AssigneeIDs = nil + return stateAction("/tasks", nextState) +} + func taskCardClass(compact bool) string { if compact { return "bg-white dark:bg-gray-800 rounded-lg p-3 shadow-sm border border-gray-100 dark:border-gray-700" diff --git a/go-backend/static/styles.css b/go-backend/static/styles.css index 667950e..7ba0145 100644 --- a/go-backend/static/styles.css +++ b/go-backend/static/styles.css @@ -429,7 +429,7 @@ input { .ui-button-md { font-size: 0.95rem; - padding: 0.75rem 1.1rem; + padding: 0.7rem 1rem; } .ui-button-lg { diff --git a/go-backend/static/tailwind.css b/go-backend/static/tailwind.css index 34a1a05..76ce62f 100644 --- a/go-backend/static/tailwind.css +++ b/go-backend/static/tailwind.css @@ -58,6 +58,7 @@ --tracking-wide: 0.025em; --tracking-wider: 0.05em; --leading-tight: 1.25; + --radius-sm: 0.25rem; --radius-md: 0.375rem; --radius-lg: 0.5rem; --radius-xl: 0.75rem; @@ -73,6 +74,17 @@ .visible { visibility: visible; } +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + border-width: 0; +} .absolute { position: absolute; } @@ -88,18 +100,33 @@ .top-1\/2 { top: calc(1/2 * 100%); } +.top-2 { + top: calc(var(--spacing) * 2); +} +.right-0 { + right: calc(var(--spacing) * 0); +} +.left-2 { + left: calc(var(--spacing) * 2); +} .left-3 { left: calc(var(--spacing) * 3); } .isolate { isolation: isolate; } -.-m-1 { - margin: calc(var(--spacing) * -1); +.z-50 { + z-index: 50; +} +.-mx-1 { + margin-inline: calc(var(--spacing) * -1); } .-mx-4 { margin-inline: calc(var(--spacing) * -4); } +.my-1 { + margin-block: calc(var(--spacing) * 1); +} .mt-1 { margin-top: calc(var(--spacing) * 1); } @@ -136,6 +163,9 @@ -webkit-box-orient: vertical; -webkit-line-clamp: 2; } +.block { + display: block; +} .flex { display: flex; } @@ -211,15 +241,15 @@ .h-8 { height: calc(var(--spacing) * 8); } -.h-9 { - height: calc(var(--spacing) * 9); -} -.h-\[18px\] { - height: 18px; -} .h-fit { height: fit-content; } +.h-px { + height: 1px; +} +.max-h-\[28rem\] { + max-height: 28rem; +} .min-h-\[44px\] { min-height: 44px; } @@ -232,6 +262,9 @@ .min-h-screen { min-height: 100vh; } +.w-2 { + width: calc(var(--spacing) * 2); +} .w-3 { width: calc(var(--spacing) * 3); } @@ -253,14 +286,14 @@ .w-12 { width: calc(var(--spacing) * 12); } -.w-\[18px\] { - width: 18px; +.w-56 { + width: calc(var(--spacing) * 56); } .w-full { width: 100%; } -.min-w-\[44px\] { - min-width: 44px; +.max-w-\[220px\] { + max-width: 220px; } .min-w-\[80px\] { min-width: 80px; @@ -372,8 +405,11 @@ .overflow-x-auto { overflow-x: auto; } -.rounded { - border-radius: 0.25rem; +.overflow-x-hidden { + overflow-x: hidden; +} +.overflow-y-auto { + overflow-y: auto; } .rounded-\[5px\] { border-radius: 5px; @@ -393,6 +429,9 @@ .rounded-md { border-radius: var(--radius-md); } +.rounded-sm { + border-radius: var(--radius-sm); +} .rounded-xl { border-radius: var(--radius-xl); } @@ -510,9 +549,6 @@ .bg-teal-500 { background-color: var(--color-teal-500); } -.bg-transparent { - background-color: transparent; -} .bg-white { background-color: var(--color-white); } @@ -527,8 +563,8 @@ .bg-yellow-500 { background-color: var(--color-yellow-500); } -.p-2 { - padding: calc(var(--spacing) * 2); +.p-1 { + padding: calc(var(--spacing) * 1); } .p-3 { padding: calc(var(--spacing) * 3); @@ -560,9 +596,6 @@ .py-1\.5 { padding-block: calc(var(--spacing) * 1.5); } -.py-2 { - padding-block: calc(var(--spacing) * 2); -} .py-2\.5 { padding-block: calc(var(--spacing) * 2.5); } @@ -587,6 +620,9 @@ .pr-1 { padding-right: calc(var(--spacing) * 1); } +.pr-2 { + padding-right: calc(var(--spacing) * 2); +} .pr-4 { padding-right: calc(var(--spacing) * 4); } @@ -599,6 +635,9 @@ .pb-6 { padding-bottom: calc(var(--spacing) * 6); } +.pl-8 { + padding-left: calc(var(--spacing) * 8); +} .pl-10 { padding-left: calc(var(--spacing) * 10); } @@ -725,12 +764,12 @@ .opacity-40 { opacity: 40%; } -.shadow-sm { - --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); +.shadow-md { + --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } -.shadow-xs { - --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05)); +.shadow-sm { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } .filter { @@ -751,6 +790,14 @@ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); transition-duration: var(--tw-duration, var(--default-transition-duration)); } +.outline-none { + --tw-outline-style: none; + outline-style: none; +} +.select-none { + -webkit-user-select: none; + user-select: none; +} .hover\:bg-gray-50 { &:hover { @media (hover: hover) { @@ -758,24 +805,10 @@ } } } -.hover\:bg-gray-200 { +.hover\:bg-gray-100 { &:hover { @media (hover: hover) { - background-color: var(--color-gray-200); - } - } -} -.hover\:bg-purple-700 { - &:hover { - @media (hover: hover) { - background-color: var(--color-purple-700); - } - } -} -.hover\:text-gray-600 { - &:hover { - @media (hover: hover) { - color: var(--color-gray-600); + background-color: var(--color-gray-100); } } } @@ -793,13 +826,6 @@ } } } -.hover\:text-red-500 { - &:hover { - @media (hover: hover) { - color: var(--color-red-500); - } - } -} .hover\:shadow-md { &:hover { @media (hover: hover) { @@ -825,39 +851,6 @@ outline-style: none; } } -.focus-visible\:ring-2 { - &:focus-visible { - --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); - box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); - } -} -.focus-visible\:ring-offset-2 { - &:focus-visible { - --tw-ring-offset-width: 2px; - --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - } -} -.focus-visible\:outline-none { - &:focus-visible { - --tw-outline-style: none; - outline-style: none; - } -} -.disabled\:pointer-events-none { - &:disabled { - pointer-events: none; - } -} -.disabled\:opacity-50 { - &:disabled { - opacity: 50%; - } -} -.has-\[\>svg\]\:px-3 { - &:has(>svg) { - padding-inline: calc(var(--spacing) * 3); - } -} .sm\:mx-0 { @media (width >= 40rem) { margin-inline: calc(var(--spacing) * 0); @@ -878,11 +871,6 @@ width: 350px; } } -.md\:w-auto { - @media (width >= 48rem) { - width: auto; - } -} .md\:grid-cols-2 { @media (width >= 48rem) { grid-template-columns: repeat(2, minmax(0, 1fr)); @@ -1093,15 +1081,6 @@ color: var(--color-purple-400); } } -.dark\:hover\:bg-gray-700 { - &:is(.dark *) { - &:hover { - @media (hover: hover) { - background-color: var(--color-gray-700); - } - } - } -} .dark\:hover\:bg-gray-800 { &:is(.dark *) { &:hover { @@ -1129,22 +1108,6 @@ } } } -.\[\&_svg\]\:pointer-events-none { - & svg { - pointer-events: none; - } -} -.\[\&_svg\]\:size-4 { - & svg { - width: calc(var(--spacing) * 4); - height: calc(var(--spacing) * 4); - } -} -.\[\&_svg\]\:shrink-0 { - & svg { - flex-shrink: 0; - } -} .\[\&\>svg\]\:h-4 { &>svg { height: calc(var(--spacing) * 4);