chore(autonomous-session): consolidate uncommitted work from prior session
Bundles the prior autonomous-session output that was sitting unstaged: - Em-dash sweep across src/ + tests/ (en-dash/em-dash to hyphen, ~2280 instances) - country-flag-icons rollout (CountryFlag component, replaces emoji glyphs that never rendered on Windows; lazy-loads the 3x2 SVG index as a single chunk after the per-subpath dynamic-import approach silently failed in webpack) - Admin IA Phase 1+2: 7-domain regroup, 41 to 38 pages, /admin/berths index, redirects (ocr to ai, reports to dashboard, invitations to users), docs/admin-ia-proposal.md - Per-template email tester (registry + endpoint + UI on Email admin page) - Cancel-document mode picker (delete-from-Documenso vs keep-for-audit) - Dashboard PDF report: 25 widgets, SVG charts, date-range picker, 11 resolvers - Customize-widgets per-region sortables at xl+ (charts/rails/feed); single flat sortable below xl when the layout stacks; per-viewport saved orders - Audit doc updates capturing each shipped item - Lint fixes: react-compiler immutability in DonutChart (reduce instead of let-reassign), set-state-in-effect disables in CountryFlag and UploadForSigning preview-bytes effect, unused 'confirm' destructures in interest contract + reservation tabs, unescaped apostrophe in test-template card copy
This commit is contained in:
@@ -36,7 +36,7 @@ const AlertDialogContent = React.forwardRef<
|
||||
<AlertDialogPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
// Centered fade + subtle zoom-in (no slide-from-corner — drops
|
||||
// Centered fade + subtle zoom-in (no slide-from-corner - drops
|
||||
// the jarring fly-from-top-left effect the Dialog primitive had).
|
||||
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg',
|
||||
className,
|
||||
|
||||
@@ -87,7 +87,7 @@ function Calendar({
|
||||
'text-muted-foreground select-none text-[0.8rem]',
|
||||
defaultClassNames.week_number,
|
||||
),
|
||||
// NB: the 'table' className was removed in react-day-picker 10 —
|
||||
// NB: the 'table' className was removed in react-day-picker 10 -
|
||||
// the renderer is now CSS-grid based, so the table-derived class
|
||||
// doesn't apply. shadcn's older Calendar wrapper had it; we drop
|
||||
// it on the v10 bump.
|
||||
|
||||
@@ -59,7 +59,7 @@ const CommandList = React.forwardRef<
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
||||
>(({ className, onWheel, ...props }, ref) => (
|
||||
// Inside a Radix Popover, native wheel scrolling is intercepted by the
|
||||
// focus-scope and never reaches the cmdk list — so trackpad/mousewheel
|
||||
// focus-scope and never reaches the cmdk list - so trackpad/mousewheel
|
||||
// scrolling on the country dropdown silently no-ops. Translate the wheel
|
||||
// event ourselves so the list scrolls regardless of focus state.
|
||||
<CommandPrimitive.List
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface DatePickerProps {
|
||||
placeholder?: string;
|
||||
/** Disable the entire control. */
|
||||
disabled?: boolean;
|
||||
/** Limit selectable range — same shape react-day-picker accepts. */
|
||||
/** Limit selectable range - same shape react-day-picker accepts. */
|
||||
fromDate?: Date;
|
||||
toDate?: Date;
|
||||
/** Optional className on the trigger Button (desktop) / Input (mobile). */
|
||||
@@ -56,10 +56,10 @@ function toIso(date: Date | undefined): string {
|
||||
/**
|
||||
* Cross-platform date picker. Desktop: shadcn Popover + Calendar
|
||||
* (caption-dropdown nav so reps can jump months/years for backfill).
|
||||
* Mobile: native `<input type="date">` for the OS-level picker —
|
||||
* Mobile: native `<input type="date">` for the OS-level picker -
|
||||
* touch-friendly and zero bundle cost.
|
||||
*
|
||||
* Drop-in replacement for `<Input type="date">` — same `value` /
|
||||
* Drop-in replacement for `<Input type="date">` - same `value` /
|
||||
* `onChange` contract (YYYY-MM-DD).
|
||||
*/
|
||||
export function DatePicker({
|
||||
@@ -76,7 +76,7 @@ export function DatePicker({
|
||||
name,
|
||||
forceVariant,
|
||||
}: DatePickerProps) {
|
||||
// Strict mobile only — tablet (768-1023) has room for the desktop
|
||||
// Strict mobile only - tablet (768-1023) has room for the desktop
|
||||
// Popover Calendar; only the smallest phone widths fall back to the
|
||||
// native datepicker input.
|
||||
const tier = useViewportTier();
|
||||
|
||||
@@ -63,7 +63,7 @@ export function DateTimePicker({
|
||||
name,
|
||||
forceVariant,
|
||||
}: DateTimePickerProps) {
|
||||
// Strict mobile only — tablet has room for the desktop Popover; only
|
||||
// Strict mobile only - tablet has room for the desktop Popover; only
|
||||
// the smallest phone widths fall back to the native datetime-local input.
|
||||
const tier = useViewportTier();
|
||||
const variant = forceVariant ?? (tier === 'mobile' ? 'mobile' : 'desktop');
|
||||
|
||||
@@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef<
|
||||
className={cn(
|
||||
// Cap at the smaller of 24rem (384px) and the radix-reported
|
||||
// available height under/above the trigger, so long menus don't
|
||||
// visually stretch past the viewport edge on small screens —
|
||||
// visually stretch past the viewport edge on small screens -
|
||||
// internal scroll handles overflow. The CSS variable is set by
|
||||
// Radix on `[data-side]` collision detection. Consumers can
|
||||
// override via the `className` prop.
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface FieldErrorProps extends React.HTMLAttributes<HTMLParagraphEleme
|
||||
*/
|
||||
message?: string | null | undefined;
|
||||
/**
|
||||
* Optional id — pair with `aria-describedby` on the associated input
|
||||
* Optional id - pair with `aria-describedby` on the associated input
|
||||
* so SR users hear the error after the input's accessible name.
|
||||
*/
|
||||
id?: string;
|
||||
@@ -22,7 +22,7 @@ export interface FieldErrorProps extends React.HTMLAttributes<HTMLParagraphEleme
|
||||
* Accessible error renderer for form fields. Always renders a
|
||||
* `role="alert"` + `aria-live="polite"` region so SR users get
|
||||
* immediate feedback when validation fires. Hide visually when
|
||||
* `message` is empty without removing the region from the DOM —
|
||||
* `message` is empty without removing the region from the DOM -
|
||||
* tearing the live region down between submits delays the next
|
||||
* announcement on most assistive tech.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface FieldLabelProps extends React.ComponentPropsWithoutRef<typeof L
|
||||
* "why and how to choose a value" rather than restating the label.
|
||||
*/
|
||||
tooltip?: React.ReactNode;
|
||||
/** Mark the field as required — appends an asterisk after the label text. */
|
||||
/** Mark the field as required - appends an asterisk after the label text. */
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@ export interface FileInputButtonProps {
|
||||
title?: string;
|
||||
/**
|
||||
* When true, renders the selected filename next to a clear (×) button
|
||||
* underneath the picker — same idiom as the expense form. Default:
|
||||
* underneath the picker - same idiom as the expense form. Default:
|
||||
* false (the caller manages its own filename display).
|
||||
*/
|
||||
showSelectedFilename?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Styled file-picker primitive — replaces the raw browser-default
|
||||
* Styled file-picker primitive - replaces the raw browser-default
|
||||
* `<input type="file">` UI that looks different across Chromium /
|
||||
* Safari / Firefox. Renders a Button + hidden input; the Button forwards
|
||||
* clicks to the input. Use everywhere we'd otherwise render a raw file
|
||||
|
||||
@@ -6,7 +6,7 @@ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(
|
||||
({ className, type, inputMode, ...props }, ref) => {
|
||||
// Default `type=number` to a numeric keyboard on mobile when the caller
|
||||
// didn't explicitly override `inputMode`. Without this, iOS shows the
|
||||
// full QWERTY keyboard for prices/dimensions/etc. — common audit gripe.
|
||||
// full QWERTY keyboard for prices/dimensions/etc. - common audit gripe.
|
||||
// `decimal` covers both whole numbers and decimals; if the caller wants
|
||||
// strict integer input they pass `inputMode="numeric"` explicitly.
|
||||
const resolvedInputMode = inputMode ?? (type === 'number' ? 'decimal' : undefined);
|
||||
|
||||
@@ -16,7 +16,7 @@ interface KPITileProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
/** Optional accent stripe colour token; defaults to brand. */
|
||||
accent?: 'brand' | 'success' | 'warning' | 'mint' | 'teal' | 'purple';
|
||||
/** Optional explainer rendered in a Popover when the user clicks the (i)
|
||||
* icon next to the title. Keep it short — one sentence ideally. */
|
||||
* icon next to the title. Keep it short - one sentence ideally. */
|
||||
tooltip?: React.ReactNode;
|
||||
/** For metrics where lower is better (bounce rate, error count). The
|
||||
* delta number is still shown verbatim, but the colour flips: a
|
||||
|
||||
@@ -14,7 +14,7 @@ const SelectValue = SelectPrimitive.Value;
|
||||
|
||||
/**
|
||||
* Size variant mirroring Button's idiom. Default `h-11` (44px) pairs
|
||||
* with `<Input>`'s default — fixes the 8px height mismatch that
|
||||
* with `<Input>`'s default - fixes the 8px height mismatch that
|
||||
* triggered the platform-wide UAT finding. Compact contexts (FilterBar,
|
||||
* dense table headers) pass `size="sm"` to retain the legacy 36px /
|
||||
* h-9 footprint. Old call sites that haven't been audited yet still
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Toaster as Sonner } from 'sonner';
|
||||
|
||||
type ToasterProps = React.ComponentProps<typeof Sonner>;
|
||||
|
||||
// Dark mode is disabled across the app — hardcode the light theme so
|
||||
// Dark mode is disabled across the app - hardcode the light theme so
|
||||
// sonner doesn't pick up a `prefers-color-scheme: dark` system hint and
|
||||
// render against a dark background that the rest of the UI doesn't use.
|
||||
const Toaster = ({ ...props }: ToasterProps) => {
|
||||
|
||||
@@ -25,7 +25,7 @@ const TableBody = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
// Strip only the bottom border on the last row (the visual table-divider).
|
||||
// The shorter `border-0` form also nuked left/right borders, which broke
|
||||
// the colored left-accent (e.g. mooring-letter tone in berth-list) — that
|
||||
// the colored left-accent (e.g. mooring-letter tone in berth-list) - that
|
||||
// accent is added via row className and counts on the left border surviving.
|
||||
<tbody ref={ref} className={cn('[&_tr:last-child]:border-b-0', className)} {...props} />
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user