@remit/ui 0.0.234 → 0.0.236
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/dist/components/ErrorBanner.js +3 -3
- package/dist/components/ErrorState.js +3 -3
- package/dist/components/KeyboardShortcutsModal.js +1 -1
- package/dist/components/account-menu.js +1 -1
- package/dist/components/account-service-status.js +2 -2
- package/dist/components/address-display.js +1 -1
- package/dist/components/address-tag.js +1 -1
- package/dist/components/agenda-flow.d.ts +21 -0
- package/dist/components/agenda-flow.js +1 -1
- package/dist/components/agenda-panels.js +1 -1
- package/dist/components/app-switcher.js +1 -1
- package/dist/components/attachment-list.js +3 -3
- package/dist/components/attendee-row.js +1 -1
- package/dist/components/auto-moved-badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/brief-empty.js +2 -2
- package/dist/components/brief-section.js +1 -1
- package/dist/components/button.d.ts +0 -1
- package/dist/components/calendar-clash-strip.js +1 -1
- package/dist/components/calendar-event-chip-content.js +1 -1
- package/dist/components/calendar-event-popup.js +2 -2
- package/dist/components/calendar-event-sidebar.js +1 -1
- package/dist/components/calendar-failure-note.js +1 -1
- package/dist/components/calendar-guests.js +2 -2
- package/dist/components/calendar-invite-card.js +2 -2
- package/dist/components/calendar-list.js +2 -2
- package/dist/components/calendar-parse-badge.js +2 -2
- package/dist/components/calendar-quick-create.js +1 -1
- package/dist/components/calendar-screen-toolbar.js +1 -1
- package/dist/components/calendar-side-pane.js +1 -1
- package/dist/components/calendar-suggestion-list.js +1 -1
- package/dist/components/calendar-task-popup.js +3 -3
- package/dist/components/calendar-time-grid.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/compose-action-bar.js +3 -3
- package/dist/components/compose-attachments.js +3 -3
- package/dist/components/compose-fab.js +1 -1
- package/dist/components/compose-header.js +1 -1
- package/dist/components/compose-language-setting.js +1 -1
- package/dist/components/compose-smtp-missing-banner.js +2 -2
- package/dist/components/danger-zone-section.js +2 -2
- package/dist/components/event-editor-pane.js +1 -1
- package/dist/components/event-editor.js +1 -1
- package/dist/components/event-suggestion-card.js +2 -2
- package/dist/components/filter-clause-chip.js +1 -1
- package/dist/components/filter-preview-count.js +4 -4
- package/dist/components/flow-screen.js +1 -1
- package/dist/components/folder-manage-actions.js +2 -2
- package/dist/components/folder-mutation-dialog.js +2 -2
- package/dist/components/folder-rename-dialog.js +1 -1
- package/dist/components/folder-role.js +2 -2
- package/dist/components/folder-row.js +2 -2
- package/dist/components/folder-tree-picker.js +1 -1
- package/dist/components/input.d.ts +0 -1
- package/dist/components/intelligence-calendar.js +1 -1
- package/dist/components/intelligence-panel.js +2 -2
- package/dist/components/intelligence-toggle.js +1 -1
- package/dist/components/list-result-header.js +1 -1
- package/dist/components/mail-action-toolbar.js +2 -2
- package/dist/components/mail-header.js +1 -1
- package/dist/components/mcp-connected-apps-page.js +1 -1
- package/dist/components/mcp-permission-list.js +1 -1
- package/dist/components/message-list-pane.js +1 -1
- package/dist/components/message-list-state.js +3 -3
- package/dist/components/message-report-dialog.js +1 -1
- package/dist/components/message-row.js +1 -1
- package/dist/components/message-settlement.js +1 -1
- package/dist/components/mini-month.js +1 -1
- package/dist/components/mobile-message-action-bar.js +2 -2
- package/dist/components/mobile-reading-pane.js +1 -1
- package/dist/components/mobile-search-view.js +1 -1
- package/dist/components/nav-sidebar.js +5 -5
- package/dist/components/nav-toggle-button.js +1 -1
- package/dist/components/new-folder-action.js +1 -1
- package/dist/components/outbox-row.js +2 -2
- package/dist/components/outbox-status-badge.d.ts +1 -1
- package/dist/components/outbox-status-badge.js +6 -6
- package/dist/components/password-input.js +1 -1
- package/dist/components/popover-menu.js +1 -1
- package/dist/components/quarantine-entry-row.js +1 -1
- package/dist/components/quarantine-section.js +2 -2
- package/dist/components/quoted-text.js +1 -1
- package/dist/components/reading-pane-empty.js +1 -1
- package/dist/components/reading-pane.js +1 -1
- package/dist/components/refresh-button.js +2 -2
- package/dist/components/rescue-banner.js +1 -1
- package/dist/components/rescue-candidate-row.js +1 -1
- package/dist/components/rescue-from-spam-flow.js +3 -3
- package/dist/components/rescue-sender-group.js +1 -1
- package/dist/components/rich-text-correction-menu.js +1 -1
- package/dist/components/rich-text-spellcheck-notice.js +3 -3
- package/dist/components/rich-text-toolbar.js +1 -1
- package/dist/components/role-appointment-list.js +1 -1
- package/dist/components/role-appointment-prompt.js +3 -3
- package/dist/components/row-actions.js +2 -2
- package/dist/components/search-chip-input.js +1 -1
- package/dist/components/search-conversion-notice.js +1 -1
- package/dist/components/search-results.js +2 -2
- package/dist/components/search-token-chip.js +1 -1
- package/dist/components/select.d.ts +0 -1
- package/dist/components/select.js +1 -1
- package/dist/components/selection-top-bar.js +2 -2
- package/dist/components/selection-wizard.js +5 -5
- package/dist/components/self-update-confirm-dialog.js +1 -1
- package/dist/components/self-update-progress-overlay.js +3 -3
- package/dist/components/self-update-section.js +5 -5
- package/dist/components/sender-trust-indicator.js +1 -1
- package/dist/components/settings-screen.js +2 -2
- package/dist/components/shell-top-bar.d.ts +24 -0
- package/dist/components/shell-top-bar.js +1 -25
- package/dist/components/slide-panel.js +1 -1
- package/dist/components/swipeable-row.js +3 -3
- package/dist/components/sync-warning-row.js +1 -1
- package/dist/components/sync-warning-section.js +2 -2
- package/dist/components/touch-list.js +1 -1
- package/dist/components/wizard.js +1 -1
- package/dist/icons.d.ts +109 -0
- package/dist/icons.js +109 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/merge-props.d.ts +8 -0
- package/dist/lib/merge-props.js +29 -0
- package/dist/lib/use-long-press.js +1 -1
- package/package.json +6 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CircleAlert, Info, TriangleAlert, X } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
const SEVERITY_STYLES = {
|
|
5
5
|
error: {
|
|
@@ -19,8 +19,8 @@ const SEVERITY_STYLES = {
|
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
const SEVERITY_ICONS = {
|
|
22
|
-
error:
|
|
23
|
-
warning:
|
|
22
|
+
error: CircleAlert,
|
|
23
|
+
warning: TriangleAlert,
|
|
24
24
|
info: Info,
|
|
25
25
|
};
|
|
26
26
|
const SEVERITY_LABEL = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CircleAlert } from "../icons.js";
|
|
3
3
|
export const formatErrorMessage = (error) => {
|
|
4
4
|
if (error instanceof Error)
|
|
5
5
|
return error.message;
|
|
@@ -16,7 +16,7 @@ export const formatErrorMessage = (error) => {
|
|
|
16
16
|
export const ErrorState = ({ title = "Couldn't load content", error, onRetry, variant = "block", }) => {
|
|
17
17
|
const message = formatErrorMessage(error);
|
|
18
18
|
if (variant === "inline") {
|
|
19
|
-
return (_jsxs("div", { role: "alert", className: "flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm", children: [_jsx(
|
|
19
|
+
return (_jsxs("div", { role: "alert", className: "flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm", children: [_jsx(CircleAlert, { className: "size-4 shrink-0 text-danger mt-0.5", "aria-hidden": "true" }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "font-medium text-danger", children: title }), _jsx("p", { className: "text-fg-muted mt-0.5 break-words", children: message })] }), onRetry && (_jsx("button", { type: "button", onClick: onRetry, className: "shrink-0 text-sm font-medium text-accent hover:underline", children: "Retry" }))] }));
|
|
20
20
|
}
|
|
21
|
-
return (_jsxs("div", { role: "alert", className: "flex flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx(
|
|
21
|
+
return (_jsxs("div", { role: "alert", className: "flex flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx(CircleAlert, { className: "size-8 text-danger", "aria-hidden": "true" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium text-danger", children: title }), _jsx("p", { className: "text-sm text-fg-muted mt-1 break-words", children: message })] }), onRetry && (_jsx("button", { type: "button", onClick: onRetry, className: "inline-flex items-center rounded-md border border-line bg-canvas px-4 py-2 text-sm font-medium hover:bg-surface-raised transition-colors", children: "Retry" }))] }));
|
|
22
22
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { X } from "lucide-react";
|
|
3
2
|
import { Fragment, useRef } from "react";
|
|
3
|
+
import { X } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { KEY_HINT_GROUPS } from "../lib/keymap.js";
|
|
6
6
|
import { useOverlayScope } from "../lib/overlay-scope.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { LogOut } from "lucide-react";
|
|
3
2
|
import { useEffect, useRef } from "react";
|
|
3
|
+
import { LogOut } from "../icons.js";
|
|
4
4
|
import { Avatar } from "./avatar.js";
|
|
5
5
|
import { PopoverMenuPanel, PopoverMenuPortal, PopoverMenuRow, usePopoverMenuState, } from "./popover-menu.js";
|
|
6
6
|
export function AccountMenu({ email, sections = [], onOpenSection, onSignOut, }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CirclePause } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
import { Badge } from "./badge.js";
|
|
5
5
|
import { Banner } from "./banner.js";
|
|
@@ -33,7 +33,7 @@ export const ACCOUNT_NO_SERVICE_TOGGLES_MESSAGE = "This account connects over IM
|
|
|
33
33
|
* picker and the sidebar (#1179).
|
|
34
34
|
*/
|
|
35
35
|
export function AccountServiceOffBadge({ service, className, }) {
|
|
36
|
-
return (_jsxs(Badge, { tone: "neutral", className: className, children: [_jsx(
|
|
36
|
+
return (_jsxs(Badge, { tone: "neutral", className: className, children: [_jsx(CirclePause, { className: "size-3 shrink-0", "aria-hidden": true }), ACCOUNT_SERVICE_OFF_LABEL[service]] }));
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* The notice above stored rows a switched-off service left behind — a mailbox
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BadgeCheck, ChevronDown, ChevronRight } from "lucide-react";
|
|
3
2
|
import { useState } from "react";
|
|
3
|
+
import { BadgeCheck, ChevronDown, ChevronRight } from "../icons.js";
|
|
4
4
|
export const AddressDisplay = ({ address, showTrustedBadge = false, }) => {
|
|
5
5
|
const badge = showTrustedBadge ? (_jsx(BadgeCheck, { className: "inline-block size-4 ml-1 -mt-0.5 text-positive", "aria-label": "Trusted sender", "data-testid": "trusted-sender-badge" })) : null;
|
|
6
6
|
if (address.displayName) {
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The strip: one scrolling list of days.
|
|
3
|
+
*
|
|
4
|
+
* A time grid spends its pixels in proportion to the hours it covers, which is
|
|
5
|
+
* backwards — most days are mostly empty. This list spends them in proportion
|
|
6
|
+
* to what is on the day: a booked hour gets a row, an empty day gets a line,
|
|
7
|
+
* and a run of empty days gets one sentence. Free stretches are drawn, not
|
|
8
|
+
* left as whitespace, because "your Thursday afternoon is clear" is the answer
|
|
9
|
+
* people actually come to a calendar for.
|
|
10
|
+
*
|
|
11
|
+
* Scrolling never paginates. Reaching either end asks the owner for more days
|
|
12
|
+
* and the scroll position is held across the insert, so the strip has no seams
|
|
13
|
+
* and no page boundaries to lose your place at.
|
|
14
|
+
*
|
|
15
|
+
* Reaching an end is something a reader does, never something a layout is. A
|
|
16
|
+
* sparse diary draws shorter than the distance either end is fetched at, so an
|
|
17
|
+
* end measured off the content alone is reached the moment the strip mounts and
|
|
18
|
+
* stays reached however many days arrive — which walked the range, and the
|
|
19
|
+
* address with it, out into empty years. What asks for more days is a scroll
|
|
20
|
+
* the reader drove, moving toward the end it asks about.
|
|
21
|
+
*/
|
|
1
22
|
import { type ReactNode } from "react";
|
|
2
23
|
import { type FreeStretch } from "../lib/agenda-time.js";
|
|
3
24
|
import type { CalendarDay, CalendarDescriptor, CalendarSlotPick } from "./calendar-types.js";
|
|
@@ -20,8 +20,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
* address with it, out into empty years. What asks for more days is a scroll
|
|
21
21
|
* the reader drove, moving toward the end it asks about.
|
|
22
22
|
*/
|
|
23
|
-
import { CalendarOff, ChevronRight, Layers, MapPin, Users } from "lucide-react";
|
|
24
23
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
|
|
24
|
+
import { CalendarOff, ChevronRight, Layers, MapPin, Users } from "../icons.js";
|
|
25
25
|
import { buildAgendaRows, busySpansOn, DAY_END_MINUTE, DAY_START_MINUTE, formatMinute, formatRunLabel, formatSpan, freeStretchesOn, groupOverlapping, minuteOfDay, monthLabel, weekdayLongLabel, } from "../lib/agenda-time.js";
|
|
26
26
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
27
27
|
import { cn } from "../lib/cn.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Clock, Radio, Sun } from "lucide-react";
|
|
3
2
|
import { useMemo } from "react";
|
|
3
|
+
import { Clock, Radio, Sun } from "../icons.js";
|
|
4
4
|
import { addDays, formatMinute, formatShortDay, formatSpan, } from "../lib/agenda-time.js";
|
|
5
5
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CalendarDays, Mail } from "lucide-react";
|
|
3
2
|
import { useRef } from "react";
|
|
3
|
+
import { CalendarDays, Mail } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { useRovingFocus } from "../lib/roving-focus.js";
|
|
6
6
|
const ICONS = { mail: Mail, calendar: CalendarDays };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ChevronDown, ChevronRight, CircleAlert, Download, LoaderCircle, Mail, Paperclip, } from "../icons.js";
|
|
3
3
|
import { formatByteSize } from "../lib/attachment-file.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
function DownloadFailure({ state, onRetry, }) {
|
|
6
|
-
return (_jsxs("div", { role: "alert", "data-testid": "attachment-error", className: "flex items-start gap-2 border-t border-danger/30 bg-danger-soft px-2 py-2 text-xs", children: [_jsx(
|
|
6
|
+
return (_jsxs("div", { role: "alert", "data-testid": "attachment-error", className: "flex items-start gap-2 border-t border-danger/30 bg-danger-soft px-2 py-2 text-xs", children: [_jsx(CircleAlert, { className: "mt-0.5 size-3.5 shrink-0 text-danger", "aria-hidden": true }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "font-medium text-danger", children: state.title }), _jsx("p", { className: "mt-0.5 text-fg-muted", children: state.detail })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [_jsx("button", { type: "button", onClick: onRetry, className: "font-medium text-accent hover:underline", children: "Try again" }), state.reportUrl && (_jsx("a", { href: state.reportUrl, target: "_blank", rel: "noreferrer", className: "font-medium text-accent hover:underline", children: "Report this" }))] })] }));
|
|
7
7
|
}
|
|
8
8
|
function AttachmentLabel({ attachment }) {
|
|
9
9
|
return (_jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("bdi", { className: "block truncate text-sm text-fg", title: attachment.filename, children: attachment.filename }), _jsxs("span", { className: "block truncate text-2xs text-fg-subtle", children: [attachment.typeLabel, " \u00B7 ", formatByteSize(attachment.sizeOctets)] })] }));
|
|
10
10
|
}
|
|
11
11
|
function DownloadGlyph({ isDownloading }) {
|
|
12
|
-
return isDownloading ? (_jsx(
|
|
12
|
+
return isDownloading ? (_jsx(LoaderCircle, { className: "size-4 shrink-0 animate-spin text-fg-subtle", "aria-hidden": true })) : (_jsx(Download, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true }));
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The attachments carried by an open message: what each one is, how big it is,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Check, Clock, Minus, X } from "lucide-react";
|
|
3
2
|
import { Fragment, useId } from "react";
|
|
3
|
+
import { Check, Clock, Minus, X } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { Avatar } from "./avatar.js";
|
|
6
6
|
const rsvpLabels = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { LoaderCircle, Sparkles } from "../icons.js";
|
|
3
3
|
/**
|
|
4
4
|
* The brief with no sections. Two states, because an empty list has two
|
|
5
5
|
* causes and only one of them is good news.
|
|
6
6
|
*/
|
|
7
7
|
export function BriefEmpty({ sync }) {
|
|
8
8
|
if (sync) {
|
|
9
|
-
return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center px-4", role: "status", "aria-live": "polite", children: [_jsx(
|
|
9
|
+
return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center px-4", role: "status", "aria-live": "polite", children: [_jsx(LoaderCircle, { className: "size-8 animate-spin text-fg-subtle", "aria-hidden": "true" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Still syncing your mail" }), _jsx("p", { className: "text-xs text-fg-subtle", children: syncCopy(sync) })] }));
|
|
10
10
|
}
|
|
11
11
|
return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center px-4", children: [_jsx(Sparkles, { className: "size-8 text-fg-subtle", "aria-hidden": "true" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "You're caught up" }), _jsx("p", { className: "text-xs text-fg-subtle", children: "Nothing needs attention." })] }));
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDown, ChevronRight } from "lucide-react";
|
|
3
2
|
import { useState } from "react";
|
|
3
|
+
import { ChevronDown, ChevronRight } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
/** Rows a section renders before the reader is sent to the filtered list. */
|
|
6
6
|
export const SECTION_ROW_CAP = 10;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Check, TriangleAlert } from "
|
|
2
|
+
import { Check, TriangleAlert } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
export function CalendarClashStrip({ clashes, clearText = "Nothing else is booked over it.", className, }) {
|
|
5
5
|
if (clashes.length === 0)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Globe, Mail, Repeat } from "
|
|
2
|
+
import { Globe, Mail, Repeat } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
/**
|
|
5
5
|
* What is written inside one event: the time, the title, the marks, and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CalendarDays, MapPin, Pencil,
|
|
2
|
+
import { CalendarDays, MapPin, Pencil, Trash, X } from "../icons.js";
|
|
3
3
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
/** A failure stated where it happened, with Try again and a prefilled report. */
|
|
@@ -10,7 +10,7 @@ const iconButton = "flex size-9 items-center justify-center rounded-full text-fg
|
|
|
10
10
|
/** What the event popup says about one stored event. */
|
|
11
11
|
export function CalendarEventPopupCard({ headingId, headingRef, title, color, when, location, calendarName, availability, onEdit, onDelete, deleting = false, onClose, failure, failureRef, children, }) {
|
|
12
12
|
const hue = calendarColorClasses(color);
|
|
13
|
-
return (_jsxs("div", { className: "flex flex-col gap-3 p-3", children: [_jsxs("div", { className: "flex justify-end gap-1", children: [onEdit && (_jsx("button", { type: "button", "aria-label": "Edit", onClick: onEdit, className: iconButton, children: _jsx(Pencil, { className: "size-4" }) })), onDelete && (_jsx("button", { type: "button", "aria-label": "Delete", onClick: onDelete, disabled: deleting, className: iconButton, children: _jsx(
|
|
13
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 p-3", children: [_jsxs("div", { className: "flex justify-end gap-1", children: [onEdit && (_jsx("button", { type: "button", "aria-label": "Edit", onClick: onEdit, className: iconButton, children: _jsx(Pencil, { className: "size-4" }) })), onDelete && (_jsx("button", { type: "button", "aria-label": "Delete", onClick: onDelete, disabled: deleting, className: iconButton, children: _jsx(Trash, { className: "size-4" }) })), _jsx("button", { type: "button", "aria-label": "Close", onClick: onClose, className: iconButton, children: _jsx(X, { className: "size-4" }) })] }), _jsxs("div", { className: "flex gap-3 px-2", children: [_jsx("span", { className: cn("mt-1.5 size-3.5 shrink-0 rounded-sm", hue.solid), "aria-hidden": "true" }), _jsxs("div", { className: "min-w-0", children: [_jsx("h2", { id: headingId, ref: headingRef, tabIndex: -1, className: "text-xl font-normal break-words text-fg outline-none", children: title === "" ? "(No title)" : title }), _jsx("p", { className: "mt-1 text-sm text-fg-muted", children: when })] })] }), _jsxs("dl", { className: "flex flex-col gap-2 px-2 text-sm", children: [location !== "" && (_jsxs("div", { className: "flex gap-3", children: [_jsx("dt", { children: _jsx(MapPin, { className: "size-4 text-fg-subtle", "aria-label": "Location" }) }), _jsx("dd", { className: "min-w-0 break-words", children: location })] })), _jsxs("div", { className: "flex gap-3", children: [_jsx("dt", { children: _jsx(CalendarDays, { className: "size-4 text-fg-subtle", "aria-label": "Calendar" }) }), _jsxs("dd", { children: [calendarName, " \u00B7 ", availability] })] })] }), children, failure && (_jsx(CalendarFailureBlock, { failure: failure, focusRef: failureRef }))] }));
|
|
14
14
|
}
|
|
15
15
|
/** The popup for an event the address names that is no longer stored. */
|
|
16
16
|
export function CalendarEventGone({ headingId, onClose, closeRef, }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { X } from "
|
|
2
|
+
import { X } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
import { invalidGuest } from "../lib/guest-list.js";
|
|
5
5
|
import { CalendarFailureBlock, } from "./calendar-event-popup.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TriangleAlert } from "
|
|
2
|
+
import { TriangleAlert } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
/**
|
|
5
5
|
* An answer or a read that did not land, stated where it was asked for, with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Check, CircleHelp, Clock3, Crown, X } from "lucide-react";
|
|
3
2
|
import { useId, useState } from "react";
|
|
3
|
+
import { Check, CircleQuestionMark, Clock3, Crown, X } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { parseGuest, withGuest } from "../lib/guest-list.js";
|
|
6
6
|
import { CalendarFailureBlock, } from "./calendar-event-popup.js";
|
|
@@ -64,7 +64,7 @@ const answerMark = (rsvp) => {
|
|
|
64
64
|
if (rsvp === "declined")
|
|
65
65
|
return _jsx(X, { className: "size-3.5 text-danger", "aria-label": "No" });
|
|
66
66
|
if (rsvp === "tentative")
|
|
67
|
-
return _jsx(
|
|
67
|
+
return (_jsx(CircleQuestionMark, { className: "size-3.5 text-fg-muted", "aria-label": "Maybe" }));
|
|
68
68
|
return _jsx(Clock3, { className: "size-3.5 text-fg-subtle", "aria-label": "Awaiting" });
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BellOff, Calendar, Check, Clock,
|
|
2
|
+
import { BellOff, Calendar, Check, Clock, MapPin, RotateCcwClock, Trash, X, } from "../icons.js";
|
|
3
3
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { RsvpBadge } from "./attendee-row.js";
|
|
@@ -36,7 +36,7 @@ export function CalendarInviteCard({ invite, whenText, calendarName, color, clas
|
|
|
36
36
|
.filter((entry) => entry.count > 0)
|
|
37
37
|
.map((entry) => `${entry.count} ${tallyWord[entry.state]}`)
|
|
38
38
|
.join(" · ");
|
|
39
|
-
return (_jsxs("section", { className: cn("flex flex-col gap-3 rounded-lg border border-line bg-surface-raised p-3", className), children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: cn("size-2.5 shrink-0 rounded-full", hue.solid) }), _jsxs("span", { className: "min-w-0 flex-1 truncate text-2xs uppercase tracking-wider text-fg-subtle", children: ["Invitation from ", invite.organizerName, " \u00B7 ", calendarName] }), _jsx(CalendarParseBadge, { method: invite.method })] }), _jsxs("div", { className: cn(stale && "opacity-60"), children: [_jsx("h3", { className: "text-md font-semibold text-fg", children: invite.proposed.title }), _jsxs("p", { className: "mt-1 flex items-center gap-2 text-sm text-fg", children: [_jsx(Clock, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true }), whenText] }), invite.proposed.location !== "" && (_jsxs("p", { className: "mt-1 flex items-center gap-2 text-sm text-fg-muted", children: [_jsx(MapPin, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true }), invite.proposed.location] }))] }), invite.state === "superseded" && (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-warning/40 bg-warning-soft p-2", children: [_jsx(
|
|
39
|
+
return (_jsxs("section", { className: cn("flex flex-col gap-3 rounded-lg border border-line bg-surface-raised p-3", className), children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: cn("size-2.5 shrink-0 rounded-full", hue.solid) }), _jsxs("span", { className: "min-w-0 flex-1 truncate text-2xs uppercase tracking-wider text-fg-subtle", children: ["Invitation from ", invite.organizerName, " \u00B7 ", calendarName] }), _jsx(CalendarParseBadge, { method: invite.method })] }), _jsxs("div", { className: cn(stale && "opacity-60"), children: [_jsx("h3", { className: "text-md font-semibold text-fg", children: invite.proposed.title }), _jsxs("p", { className: "mt-1 flex items-center gap-2 text-sm text-fg", children: [_jsx(Clock, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true }), whenText] }), invite.proposed.location !== "" && (_jsxs("p", { className: "mt-1 flex items-center gap-2 text-sm text-fg-muted", children: [_jsx(MapPin, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true }), invite.proposed.location] }))] }), invite.state === "superseded" && (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-warning/40 bg-warning-soft p-2", children: [_jsx(RotateCcwClock, { className: "mt-0.5 size-4 shrink-0 text-warning", "aria-hidden": true }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("p", { className: "text-xs font-semibold text-warning", children: [invite.organizerName, " has sent a newer version of this."] }), _jsxs("p", { className: "mt-1 text-xs text-fg", children: ["This one is revision ", invite.sequence, " and is out of date. The newer message carries the one to answer."] }), onOpenNewer && (_jsx(Button, { variant: "secondary", size: touch ? "md" : "sm", onClick: onOpenNewer, className: cn("mt-2", touch && "min-h-11"), children: "Open the newer invitation" }))] })] })), invite.state === "cancelled" && (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft p-2", children: [_jsx(X, { className: "mt-0.5 size-4 shrink-0 text-danger", "aria-hidden": true }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("p", { className: "text-xs font-semibold text-danger", children: [invite.organizerName, " cancelled this."] }), _jsx("p", { className: "mt-1 text-xs text-fg", children: "It is still on your calendar. Nothing comes off it until you say so." }), onRemove && (_jsxs("div", { className: cn("mt-2 flex gap-2", touch && "flex-wrap"), children: [_jsx(Button, { variant: "primary", size: touch ? "md" : "sm", icon: _jsx(Trash, { className: "size-3.5" }), onClick: onRemove, disabled: busy || addBlocked !== undefined, className: cn(touch && "min-h-11 flex-1"), children: "Remove from calendar" }), onReopen && (_jsx(Button, { variant: "secondary", size: touch ? "md" : "sm", onClick: onReopen, disabled: busy, className: cn(touch && "min-h-11 flex-1"), children: "Keep it" }))] }))] })] })), !stale && _jsx(CalendarClashStrip, { clashes: clashes }), guests ??
|
|
40
40
|
(attendees.length > 0 && (_jsxs("p", { className: "text-2xs uppercase tracking-wider text-fg-subtle", children: [attendees.length, " guests", tally === "" ? "" : ` · ${tally}`] }))), failure !== "" && (_jsx(CalendarFailureNote, { text: failure, reportHref: reportHref })), addBlocked !== undefined && (_jsx("div", { className: "rounded-md border border-warning/40 bg-warning-soft p-2 text-xs text-fg", children: addBlocked })), !stale &&
|
|
41
41
|
(rsvp === "noReply" && invite.state !== "dismissed" ? (_jsxs("div", { className: "flex flex-col gap-2 border-t border-line pt-3", children: [_jsxs("div", { className: cn("flex gap-2", touch && "flex-wrap"), children: [_jsx(Button, { variant: "primary", size: touch ? "md" : "sm", icon: _jsx(Calendar, { className: "size-3.5" }), onClick: onAdd, disabled: busy || addBlocked !== undefined, className: cn(touch && "min-h-11 flex-1"), children: "Add to calendar" }), onTentative && (_jsx(Button, { variant: "secondary", size: touch ? "md" : "sm", onClick: onTentative, disabled: busy || addBlocked !== undefined, className: cn(touch && "min-h-11 flex-1"), children: "Maybe" })), _jsx(Button, { variant: "secondary", size: touch ? "md" : "sm", icon: _jsx(X, { className: "size-3.5" }), onClick: onDecline, disabled: busy, className: cn(touch && "min-h-11 flex-1"), children: "Decline" })] }), _jsx(Button, { variant: "ghost", size: touch ? "md" : "sm", onClick: onOfferOtherTimes, className: cn("self-start", touch && "min-h-11 w-full"), children: "Offer other times" }), mute && (_jsx(Button, { variant: "ghost", size: touch ? "md" : "sm", icon: _jsx(BellOff, { className: "size-3.5" }), onClick: mute.onMute, disabled: busy, className: cn("self-start", touch && "min-h-11 w-full"), children: `Stop offering invitations from ${mute.sender}` })), _jsxs("p", { className: "text-2xs text-fg-subtle", children: [invite.organizerName, " is not notified. Reader writes this to your calendar and sends no reply \u2014 tell them in the thread."] })] })) : (_jsxs("div", { className: "flex flex-col gap-2 border-t border-line pt-3", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsxs("span", { className: "flex items-center gap-1.5 text-sm text-fg", children: [answeredText(invite.state, rsvp), invite.state !== "dismissed" && _jsx(RsvpBadge, { rsvp: rsvp })] }), onReopen && (_jsx(Button, { variant: "ghost", size: touch ? "md" : "sm", onClick: onReopen, disabled: busy, className: touch ? "min-h-11" : "", children: "Change" })), rsvp === "declined" && (_jsx(Button, { variant: "secondary", size: touch ? "md" : "sm", onClick: onOfferOtherTimes, className: touch ? "min-h-11" : "", children: "Offer other times" }))] }), _jsxs("p", { className: "flex items-start gap-1.5 text-2xs text-fg-subtle", children: [_jsx(Check, { className: "mt-0.5 size-3 shrink-0", "aria-hidden": true }), invite.organizerName, " was not notified."] })] })))] }));
|
|
42
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AlertTriangle, Check, ChevronDown, ChevronRight, PauseCircle, } from "lucide-react";
|
|
3
2
|
import { useState } from "react";
|
|
3
|
+
import { Check, ChevronDown, ChevronRight, CirclePause, TriangleAlert, } from "../icons.js";
|
|
4
4
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { ACCOUNT_SERVICE_OFF_LABEL } from "./account-service-status.js";
|
|
@@ -62,5 +62,5 @@ function CalendarListRow({ calendar, checked, touch, onToggle, }) {
|
|
|
62
62
|
const syncError = calendar.syncError ?? "";
|
|
63
63
|
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("label", { className: cn("flex cursor-pointer items-center gap-2.5 rounded-sm px-row-inset hover:bg-surface-sunken", touch ? "min-h-11" : "min-h-9"), children: [_jsx("input", { type: "checkbox", checked: checked, onChange: onToggle, className: "peer sr-only" }), _jsx("span", { "aria-hidden": true, className: cn("flex size-4 shrink-0 items-center justify-center rounded-xs border transition-colors", "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-surface", checked
|
|
64
64
|
? cn(hue.solid, hue.border)
|
|
65
|
-
: cn("bg-transparent", hue.border)), children: checked && _jsx(Check, { className: "size-3 text-canvas", strokeWidth: 3 }) }), _jsx("span", { className: cn("min-w-0 flex-1 truncate text-sm", checked ? "text-fg" : "text-fg-subtle"), children: calendar.name }), paused && (_jsx(
|
|
65
|
+
: cn("bg-transparent", hue.border)), children: checked && _jsx(Check, { className: "size-3 text-canvas", strokeWidth: 3 }) }), _jsx("span", { className: cn("min-w-0 flex-1 truncate text-sm", checked ? "text-fg" : "text-fg-subtle"), children: calendar.name }), paused && (_jsx(CirclePause, { className: "size-3.5 shrink-0 text-fg-subtle", "aria-hidden": true })), syncError !== "" && (_jsx(TriangleAlert, { className: "size-3.5 shrink-0 text-danger", "aria-hidden": true }))] }), paused && (_jsx("span", { className: "sr-only", children: `${calendar.name}: ${ACCOUNT_SERVICE_OFF_LABEL.Calendar}` })), syncError !== "" && (_jsx("p", { className: "px-row-inset pb-1 text-xs text-danger", children: _jsx("span", { className: "block pl-6.5", children: `Not refreshed: ${syncError}` }) }))] }));
|
|
66
66
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CodeXml, FileText, TextSearch } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
/**
|
|
5
5
|
* Which rung of the ladder answered. Saying so is not trivia: it is the
|
|
@@ -18,7 +18,7 @@ export const calendarParseNote = {
|
|
|
18
18
|
};
|
|
19
19
|
const icons = {
|
|
20
20
|
ics: FileText,
|
|
21
|
-
markup:
|
|
21
|
+
markup: CodeXml,
|
|
22
22
|
pattern: TextSearch,
|
|
23
23
|
};
|
|
24
24
|
const tones = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { GripHorizontal, X } from "
|
|
2
|
+
import { GripHorizontal, X } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
import { invalidGuest } from "../lib/guest-list.js";
|
|
5
5
|
import { CalendarFailureBlock, } from "./calendar-event-popup.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeft, ChevronRight, Menu } from "
|
|
2
|
+
import { ChevronLeft, ChevronRight, Menu } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
import { Select } from "./select.js";
|
|
5
5
|
const VIEW_LABELS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Plus } from "
|
|
2
|
+
import { Plus } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
/** Google Calendar's left pane: New event, the mini month and My calendars. */
|
|
5
5
|
export function CalendarSidePane({ id, onNewEvent, newEventRef, month, calendars, className, }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Sparkles } from "
|
|
2
|
+
import { Sparkles } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
/** Readings waiting on a decision, one under the other, each with its own buttons. */
|
|
5
5
|
export function CalendarSuggestionList({ items, className, }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CalendarDays, CheckSquare, Square, Trash2, X } from "lucide-react";
|
|
3
2
|
import { useState } from "react";
|
|
3
|
+
import { CalendarDays, Square, SquareCheckBig, Trash, X } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
import { CalendarFailureBlock, } from "./calendar-event-popup.js";
|
|
6
6
|
const iconButton = "flex size-9 items-center justify-center rounded-full text-fg-muted outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40";
|
|
@@ -8,10 +8,10 @@ const field = "h-9 w-full rounded-md border border-line bg-surface-sunken px-2 t
|
|
|
8
8
|
/** A task's popup: title, due date, list and description, with Mark done, Edit and Delete. */
|
|
9
9
|
export function CalendarTaskPopupCard({ headingId, headingRef, fields, dueText, listName, completed, onToggle, onSave, onDelete, onClose, busy = false, failure, }) {
|
|
10
10
|
const [editing, setEditing] = useState(null);
|
|
11
|
-
return (_jsxs("div", { className: "flex flex-col gap-3 p-3", children: [_jsxs("div", { className: "flex justify-end gap-1", children: [editing === null && (_jsx("button", { type: "button", onClick: () => setEditing(fields), className: "rounded-md px-3 text-sm font-medium text-accent hover:bg-accent-soft focus-visible:ring-2 focus-visible:ring-ring", children: "Edit" })), _jsx("button", { type: "button", "aria-label": "Delete", onClick: onDelete, disabled: busy, className: iconButton, children: _jsx(
|
|
11
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 p-3", children: [_jsxs("div", { className: "flex justify-end gap-1", children: [editing === null && (_jsx("button", { type: "button", onClick: () => setEditing(fields), className: "rounded-md px-3 text-sm font-medium text-accent hover:bg-accent-soft focus-visible:ring-2 focus-visible:ring-ring", children: "Edit" })), _jsx("button", { type: "button", "aria-label": "Delete", onClick: onDelete, disabled: busy, className: iconButton, children: _jsx(Trash, { className: "size-4" }) }), _jsx("button", { type: "button", "aria-label": "Close", onClick: onClose, className: iconButton, children: _jsx(X, { className: "size-4" }) })] }), editing === null ? (_jsxs("div", { className: "flex flex-col gap-2 px-2", children: [_jsx("h2", { id: headingId, ref: headingRef, tabIndex: -1, className: cn("text-xl font-normal break-words text-fg outline-none", completed && "text-fg-muted line-through"), children: fields.title === "" ? "(No title)" : fields.title }), _jsx("p", { className: "text-sm text-fg-muted", children: dueText }), _jsxs("p", { className: "flex items-center gap-2 text-sm", children: [_jsx(CalendarDays, { className: "size-4 text-fg-subtle", "aria-label": "List" }), listName] }), fields.description !== "" && (_jsx("p", { className: "text-sm whitespace-pre-wrap break-words", children: fields.description }))] })) : (_jsxs("form", { className: "flex flex-col gap-2 px-2", onSubmit: (event) => {
|
|
12
12
|
event.preventDefault();
|
|
13
13
|
onSave(editing);
|
|
14
14
|
setEditing(null);
|
|
15
15
|
}, children: [_jsx("h2", { id: headingId, className: "sr-only", children: "Edit task" }), _jsx("input", { "aria-label": "Title", value: editing.title, onChange: (event) => setEditing({ ...editing, title: event.target.value }), className: field }), _jsxs("div", { className: "flex gap-2", children: [_jsx("input", { type: "date", "aria-label": "Due date", value: editing.dueDate, onChange: (event) => event.target.value !== "" &&
|
|
16
|
-
setEditing({ ...editing, dueDate: event.target.value }), className: field }), _jsx("input", { type: "time", "aria-label": "Due time", value: editing.dueTime, onChange: (event) => setEditing({ ...editing, dueTime: event.target.value }), className: field })] }), _jsx("textarea", { "aria-label": "Description", rows: 3, value: editing.description, onChange: (event) => setEditing({ ...editing, description: event.target.value }), className: "w-full rounded-md border border-line bg-surface-sunken px-2 py-1 text-sm" }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx("button", { type: "button", onClick: () => setEditing(null), className: "h-9 rounded-md border border-line px-3 text-sm font-medium", children: "Cancel" }), _jsx("button", { type: "submit", disabled: busy, className: "h-9 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg disabled:opacity-50", children: "Save" })] })] })), failure && _jsx(CalendarFailureBlock, { failure: failure }), editing === null && (_jsx("div", { className: "flex justify-end px-2", children: _jsxs("button", { type: "button", onClick: onToggle, disabled: busy, className: "inline-flex h-9 items-center gap-2 rounded-md border border-line px-3 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50", children: [completed ? (_jsx(Square, { className: "size-4", "aria-hidden": "true" })) : (_jsx(
|
|
16
|
+
setEditing({ ...editing, dueDate: event.target.value }), className: field }), _jsx("input", { type: "time", "aria-label": "Due time", value: editing.dueTime, onChange: (event) => setEditing({ ...editing, dueTime: event.target.value }), className: field })] }), _jsx("textarea", { "aria-label": "Description", rows: 3, value: editing.description, onChange: (event) => setEditing({ ...editing, description: event.target.value }), className: "w-full rounded-md border border-line bg-surface-sunken px-2 py-1 text-sm" }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx("button", { type: "button", onClick: () => setEditing(null), className: "h-9 rounded-md border border-line px-3 text-sm font-medium", children: "Cancel" }), _jsx("button", { type: "submit", disabled: busy, className: "h-9 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg disabled:opacity-50", children: "Save" })] })] })), failure && _jsx(CalendarFailureBlock, { failure: failure }), editing === null && (_jsx("div", { className: "flex justify-end px-2", children: _jsxs("button", { type: "button", onClick: onToggle, disabled: busy, className: "inline-flex h-9 items-center gap-2 rounded-md border border-line px-3 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50", children: [completed ? (_jsx(Square, { className: "size-4", "aria-hidden": "true" })) : (_jsx(SquareCheckBig, { className: "size-4", "aria-hidden": "true" })), completed ? "Mark not done" : "Mark done"] }) }))] }));
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TriangleAlert } from "lucide-react";
|
|
3
2
|
import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, } from "react";
|
|
3
|
+
import { TriangleAlert } from "../icons.js";
|
|
4
4
|
import { calendarColorClasses } from "../lib/calendar-color.js";
|
|
5
5
|
import { calendarEventBodyClasses } from "../lib/calendar-event-shell.js";
|
|
6
6
|
import { allDayRange, clickRange, isDrag, minuteAt, rangeMinutes, timedRange, } from "../lib/calendar-slot-pick.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Check, Minus } from "lucide-react";
|
|
3
2
|
import { useEffect, useRef } from "react";
|
|
3
|
+
import { Check, Minus } from "../icons.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
const box = "peer relative size-5 shrink-0 cursor-pointer appearance-none rounded-md border border-line-strong bg-surface outline-none transition-colors checked:border-positive checked:bg-positive indeterminate:border-positive indeterminate:bg-positive focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface";
|
|
6
6
|
const mark = "pointer-events-none absolute inset-0 m-auto size-3.5 text-accent-fg";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Loader2, Paperclip, Send, Trash2 } from "lucide-react";
|
|
3
2
|
import { useRef } from "react";
|
|
3
|
+
import { LoaderCircle, Paperclip, Send, Trash } from "../icons.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
const AttachControl = ({ disabled, onAttach, }) => {
|
|
6
6
|
const inputRef = useRef(null);
|
|
@@ -39,7 +39,7 @@ const SaveStateIndicator = ({ save }) => {
|
|
|
39
39
|
export function ComposeActionBar({ send, onSend, onBlocked, onDiscard, save = { status: "idle" }, onAttach, }) {
|
|
40
40
|
const sending = send.status === "sending";
|
|
41
41
|
const blockedReason = send.status === "blocked" ? send.reason : undefined;
|
|
42
|
-
return (_jsxs("div", { className: "flex items-center justify-between border-t border-line px-3 py-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx(Button, { variant: "primary", size: "md", "aria-busy": sending, title: blockedReason, className: "min-h-11 shrink-0 rounded-full px-4", "data-testid": "compose-send", icon: sending ? (_jsx(
|
|
42
|
+
return (_jsxs("div", { className: "flex items-center justify-between border-t border-line px-3 py-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx(Button, { variant: "primary", size: "md", "aria-busy": sending, title: blockedReason, className: "min-h-11 shrink-0 rounded-full px-4", "data-testid": "compose-send", icon: sending ? (_jsx(LoaderCircle, { className: "size-4 animate-spin" })) : (_jsx(Send, { className: "size-4" })), onClick: () => {
|
|
43
43
|
if (sending)
|
|
44
44
|
return;
|
|
45
45
|
if (blockedReason !== undefined) {
|
|
@@ -47,7 +47,7 @@ export function ComposeActionBar({ send, onSend, onBlocked, onDiscard, save = {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
onSend();
|
|
50
|
-
}, children: "Send" }), onAttach && _jsx(AttachControl, { disabled: sending, onAttach: onAttach }), _jsx(SaveStateIndicator, { save: save })] }), _jsx(Button, { variant: "ghost", size: "md", "aria-busy": sending, "aria-label": "Discard", className: "min-h-11 min-w-11 px-2 hover:text-danger", icon: _jsx(
|
|
50
|
+
}, children: "Send" }), onAttach && _jsx(AttachControl, { disabled: sending, onAttach: onAttach }), _jsx(SaveStateIndicator, { save: save })] }), _jsx(Button, { variant: "ghost", size: "md", "aria-busy": sending, "aria-label": "Discard", className: "min-h-11 min-w-11 px-2 hover:text-danger", icon: _jsx(Trash, { className: "size-4" }), onClick: () => {
|
|
51
51
|
if (sending)
|
|
52
52
|
return;
|
|
53
53
|
onDiscard();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CircleAlert, LoaderCircle, Paperclip, X } from "../icons.js";
|
|
3
3
|
import { formatByteSize } from "../lib/attachment-file.js";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
5
|
const StateIcon = ({ state }) => {
|
|
6
6
|
if (state.status === "uploading") {
|
|
7
|
-
return (_jsx(
|
|
7
|
+
return (_jsx(LoaderCircle, { className: "size-4 shrink-0 animate-spin text-fg-subtle", "aria-hidden": true }));
|
|
8
8
|
}
|
|
9
9
|
if (state.status === "failed") {
|
|
10
|
-
return _jsx(
|
|
10
|
+
return _jsx(CircleAlert, { className: "size-4 shrink-0 text-danger", "aria-hidden": true });
|
|
11
11
|
}
|
|
12
12
|
return _jsx(Paperclip, { className: "size-4 shrink-0 text-fg-subtle", "aria-hidden": true });
|
|
13
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Pencil } from "
|
|
2
|
+
import { Pencil } from "../icons.js";
|
|
3
3
|
export function ComposeFab({ onCompose }) {
|
|
4
4
|
return (_jsx("button", { type: "button", onClick: onCompose, "aria-label": "Compose new message", className: "lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all", style: {
|
|
5
5
|
bottom: "calc(var(--app-tab-bar, 0px) + env(safe-area-inset-bottom, 0px) + 1rem)",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDown } from "
|
|
2
|
+
import { ChevronDown } from "../icons.js";
|
|
3
3
|
const RevealButton = ({ label, onClick, }) => (_jsx("button", { type: "button", onClick: onClick, className: "text-xs text-fg-muted hover:text-fg transition-colors", children: label }));
|
|
4
4
|
export const composeHeaderSummary = ({ to, cc, bcc, subject, }) => {
|
|
5
5
|
const chips = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Star, X } from "
|
|
2
|
+
import { Star, X } from "../icons.js";
|
|
3
3
|
import { COMPOSE_LANGUAGE_OPTIONS, languageLabel, primaryLanguageSubtag, } from "../lib/compose-language.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
const addable = (chosen) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowRight, TriangleAlert } from "../icons.js";
|
|
3
3
|
/**
|
|
4
4
|
* The one sentence this failure gets. The banner states it, and Send refuses
|
|
5
5
|
* with the same words — a second wording of the same fact reads as a second
|
|
@@ -12,4 +12,4 @@ export const SMTP_MISSING_MESSAGE = "This account can't send mail until SMTP is
|
|
|
12
12
|
* rather than disables, so the user has a single, factual account of why
|
|
13
13
|
* nothing will leave. See issue #196.
|
|
14
14
|
*/
|
|
15
|
-
export const ComposeSmtpMissingBanner = ({ onConfigure, configureRef, }) => (_jsxs("div", { role: "alert", "data-testid": "compose-smtp-missing-banner", className: "flex items-start gap-3 border-b border-warning/50 bg-warning/10 px-3 py-2", children: [_jsx(
|
|
15
|
+
export const ComposeSmtpMissingBanner = ({ onConfigure, configureRef, }) => (_jsxs("div", { role: "alert", "data-testid": "compose-smtp-missing-banner", className: "flex items-start gap-3 border-b border-warning/50 bg-warning/10 px-3 py-2", children: [_jsx(TriangleAlert, { className: "size-5 shrink-0 mt-0.5 text-warning", "aria-hidden": "true" }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-warning", children: SMTP_MISSING_MESSAGE }), _jsxs("button", { ref: configureRef, type: "button", onClick: onConfigure, "data-testid": "compose-smtp-configure", className: "mt-1 inline-flex items-center gap-1 text-xs font-medium text-warning hover:underline", children: ["Configure SMTP", _jsx(ArrowRight, { className: "size-3", "aria-hidden": "true" })] })] })] }));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { TriangleAlert } from "../icons.js";
|
|
3
3
|
/**
|
|
4
4
|
* GitHub-style red offboarding block. Its own section, never bolted into a
|
|
5
5
|
* list — keep markup and labels here so the story and the live route can't
|
|
6
6
|
* drift (#791).
|
|
7
7
|
*/
|
|
8
8
|
export function DangerZoneSection({ title, description, action, }) {
|
|
9
|
-
return (_jsxs("div", { className: "rounded-sm border border-danger/50", children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-danger/30 bg-danger-soft px-row-inset py-2", children: [_jsx(
|
|
9
|
+
return (_jsxs("div", { className: "rounded-sm border border-danger/50", children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-danger/30 bg-danger-soft px-row-inset py-2", children: [_jsx(TriangleAlert, { className: "size-4 text-danger" }), _jsx("h2", { className: "text-sm font-semibold text-danger", children: "Danger zone" })] }), _jsxs("div", { className: "flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-sm font-medium text-fg", children: title }), _jsx("p", { className: "text-xs text-fg-muted", children: description })] }), _jsx("div", { className: "shrink-0", children: action })] })] }));
|
|
10
10
|
}
|