Migrate site controls to Nebula design system
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
This commit is contained in:
parent
e3d0925eb1
commit
817e21567b
127 changed files with 5380 additions and 2363 deletions
|
|
@ -2,19 +2,11 @@
|
|||
import { Icon } from "../../../components/Icon.jsx";
|
||||
import {
|
||||
CALENDAR_ALERT_OFFSETS,
|
||||
CALENDAR_COLORS
|
||||
CALENDAR_COLORS,
|
||||
CALENDAR_COLOR_VALUES
|
||||
} from "./calendarUtils.js";
|
||||
import { ALERT_MODES } from "./timerOptions.js";
|
||||
|
||||
const CALENDAR_COLOR_VALUES = {
|
||||
violet: "#8b5cf6",
|
||||
gold: "#f6c453",
|
||||
cyan: "#22d3ee",
|
||||
pink: "#d946ef",
|
||||
green: "#22c55e",
|
||||
gray: "#7d879f"
|
||||
};
|
||||
|
||||
export function MonthlyRepeatSwitch({ value, textContent, onChange }) {
|
||||
const options = [
|
||||
{ value: "monthDay", icon: "day-number", label: textContent.monthlyRepeatMonthDay || "Numéro du jour" },
|
||||
|
|
@ -22,7 +14,7 @@ export function MonthlyRepeatSwitch({ value, textContent, onChange }) {
|
|||
];
|
||||
|
||||
return (
|
||||
<div className="layout-switch calendar-month-repeat-switch" role="group" aria-label={textContent.monthlyRepeatLabel || "Règle mensuelle"}>
|
||||
<div className="layout-switch calendar-month-repeat-switch nds-radio-button-group" data-size="sm" role="group" aria-label={textContent.monthlyRepeatLabel || "Règle mensuelle"}>
|
||||
{options.map((option) => (
|
||||
<button
|
||||
key={option.value}
|
||||
|
|
@ -49,7 +41,7 @@ export function MonthEventRepeatSwitch({ value, monthlyRepeatBy, textContent, on
|
|||
const safeValue = monthlyRepeatBy === "monthDay" && value === "weekly" ? "none" : value;
|
||||
|
||||
return (
|
||||
<div className="calendar-month-event-repeat-switch" role="group" aria-label={textContent.repeatLabel || "Répétition"}>
|
||||
<div className="calendar-month-event-repeat-switch nds-radio-button-group" data-size="sm" role="group" aria-label={textContent.repeatLabel || "Répétition"}>
|
||||
{options.map((option) => (
|
||||
<button
|
||||
key={option.value}
|
||||
|
|
@ -80,7 +72,7 @@ export function CalendarAlertOffsets({ selectedOffsets, textContent, onToggle })
|
|||
<legend>{textContent.alertOffsetLabel || "Alerte"}</legend>
|
||||
{CALENDAR_ALERT_OFFSETS.map((offset) => (
|
||||
<label key={offset}>
|
||||
<input type="checkbox" checked={selectedOffsets.includes(offset)} onChange={() => onToggle(offset)} />
|
||||
<input className="nds-checkbox" data-size="sm" type="checkbox" checked={selectedOffsets.includes(offset)} onChange={() => onToggle(offset)} />
|
||||
<span>{labels[offset]}</span>
|
||||
</label>
|
||||
))}
|
||||
|
|
@ -94,7 +86,7 @@ export function CalendarColorPicker({ value, textContent, onChange }) {
|
|||
<div className="calendar-color-picker notepad-color-dropdown">
|
||||
<span>{label}</span>
|
||||
<button
|
||||
className="calendar-color-toggle notepad-color-toggle"
|
||||
className="calendar-color-toggle notepad-color-toggle nds-swatch"
|
||||
type="button"
|
||||
title={label}
|
||||
aria-label={label}
|
||||
|
|
@ -104,7 +96,7 @@ export function CalendarColorPicker({ value, textContent, onChange }) {
|
|||
{CALENDAR_COLORS.map((color) => (
|
||||
<button
|
||||
key={color}
|
||||
className={`notepad-swatch ${value === color ? "active" : ""}`}
|
||||
className={`notepad-swatch nds-swatch ${value === color ? "active" : ""}`}
|
||||
type="button"
|
||||
title={textContent[`color${color.charAt(0).toUpperCase()}${color.slice(1)}`] || color}
|
||||
aria-label={textContent[`color${color.charAt(0).toUpperCase()}${color.slice(1)}`] || color}
|
||||
|
|
@ -126,7 +118,7 @@ export function CalendarAlertModeSwitch({ mode, textContent, onChange }) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="timer-alert-mode-switch calendar-alert-mode-switch" role="group" aria-label={textContent.alertModeTitle || "Mode d'alerte"}>
|
||||
<div className="timer-alert-mode-switch calendar-alert-mode-switch nds-radio-button-group" data-size="xs" role="group" aria-label={textContent.alertModeTitle || "Mode d'alerte"}>
|
||||
{ALERT_MODES.map((option) => (
|
||||
<button
|
||||
key={option.mode}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue