@mieweb/ui 0.10.0-dev.6 → 0.10.0-dev.7

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.
Files changed (101) hide show
  1. package/agent/mieweb-ui.instructions.md +13 -1
  2. package/dist/brands/index.cjs +13 -13
  3. package/dist/brands/index.js +1 -1
  4. package/dist/chunk-3YBS4WUQ.js +52 -0
  5. package/dist/chunk-3YBS4WUQ.js.map +1 -0
  6. package/dist/chunk-4IS3QCOQ.cjs +453 -0
  7. package/dist/chunk-4IS3QCOQ.cjs.map +1 -0
  8. package/dist/chunk-4NCDU5IG.cjs +56 -0
  9. package/dist/chunk-4NCDU5IG.cjs.map +1 -0
  10. package/dist/chunk-76TBQDED.js +166 -0
  11. package/dist/chunk-76TBQDED.js.map +1 -0
  12. package/dist/chunk-DZ5HFLRC.js +258 -0
  13. package/dist/chunk-DZ5HFLRC.js.map +1 -0
  14. package/dist/chunk-G4D6CLBT.js +333 -0
  15. package/dist/chunk-G4D6CLBT.js.map +1 -0
  16. package/dist/chunk-IT775BYG.js +179 -0
  17. package/dist/chunk-IT775BYG.js.map +1 -0
  18. package/dist/{chunk-ELPW32ZI.cjs → chunk-KQUI4BGS.cjs} +3 -3
  19. package/dist/{chunk-ELPW32ZI.cjs.map → chunk-KQUI4BGS.cjs.map} +1 -1
  20. package/dist/{chunk-WNM7IZJ7.js → chunk-MNILXWVY.js} +2 -2
  21. package/dist/{chunk-WNM7IZJ7.js.map → chunk-MNILXWVY.js.map} +1 -1
  22. package/dist/chunk-OCSCBB52.cjs +188 -0
  23. package/dist/chunk-OCSCBB52.cjs.map +1 -0
  24. package/dist/{chunk-2YCERQWC.js → chunk-TVTIGV7Q.js} +3 -3
  25. package/dist/{chunk-2YCERQWC.js.map → chunk-TVTIGV7Q.js.map} +1 -1
  26. package/dist/chunk-URAQIF67.cjs +356 -0
  27. package/dist/chunk-URAQIF67.cjs.map +1 -0
  28. package/dist/chunk-VINZZQBD.cjs +323 -0
  29. package/dist/chunk-VINZZQBD.cjs.map +1 -0
  30. package/dist/{chunk-U42F3HLE.cjs → chunk-XCENM6ED.cjs} +12 -2
  31. package/dist/chunk-XCENM6ED.cjs.map +1 -0
  32. package/dist/chunk-XDIMTPZU.cjs +202 -0
  33. package/dist/chunk-XDIMTPZU.cjs.map +1 -0
  34. package/dist/{chunk-JI244Y7C.js → chunk-XEPDIFEA.js} +12 -2
  35. package/dist/chunk-XEPDIFEA.js.map +1 -0
  36. package/dist/chunk-XVW5DPPP.js +429 -0
  37. package/dist/chunk-XVW5DPPP.js.map +1 -0
  38. package/dist/chunk-XZNN3S3S.cjs +281 -0
  39. package/dist/chunk-XZNN3S3S.cjs.map +1 -0
  40. package/dist/chunk-Y4QNLW7W.js +300 -0
  41. package/dist/chunk-Y4QNLW7W.js.map +1 -0
  42. package/dist/{chunk-2QKBTPUC.cjs → chunk-ZPSJ2UV6.cjs} +2 -2
  43. package/dist/{chunk-2QKBTPUC.cjs.map → chunk-ZPSJ2UV6.cjs.map} +1 -1
  44. package/dist/components/BoardView/index.cjs +24 -0
  45. package/dist/components/BoardView/index.cjs.map +1 -0
  46. package/dist/components/BoardView/index.d.cts +42 -0
  47. package/dist/components/BoardView/index.d.ts +42 -0
  48. package/dist/components/BoardView/index.js +7 -0
  49. package/dist/components/BoardView/index.js.map +1 -0
  50. package/dist/components/CalendarView/index.cjs +22 -0
  51. package/dist/components/CalendarView/index.cjs.map +1 -0
  52. package/dist/components/CalendarView/index.d.cts +40 -0
  53. package/dist/components/CalendarView/index.d.ts +40 -0
  54. package/dist/components/CalendarView/index.js +9 -0
  55. package/dist/components/CalendarView/index.js.map +1 -0
  56. package/dist/components/GanttView/index.cjs +20 -0
  57. package/dist/components/GanttView/index.cjs.map +1 -0
  58. package/dist/components/GanttView/index.d.cts +37 -0
  59. package/dist/components/GanttView/index.d.ts +37 -0
  60. package/dist/components/GanttView/index.js +7 -0
  61. package/dist/components/GanttView/index.js.map +1 -0
  62. package/dist/components/ListView/index.cjs +22 -0
  63. package/dist/components/ListView/index.cjs.map +1 -0
  64. package/dist/components/ListView/index.d.cts +37 -0
  65. package/dist/components/ListView/index.d.ts +37 -0
  66. package/dist/components/ListView/index.js +9 -0
  67. package/dist/components/ListView/index.js.map +1 -0
  68. package/dist/components/Markdown/index.cjs +15 -15
  69. package/dist/components/Markdown/index.js +3 -3
  70. package/dist/components/QuickAction/index.d.cts +1 -1
  71. package/dist/components/QuickAction/index.d.ts +1 -1
  72. package/dist/components/ViewSet/index.cjs +23 -0
  73. package/dist/components/ViewSet/index.cjs.map +1 -0
  74. package/dist/components/ViewSet/index.d.cts +89 -0
  75. package/dist/components/ViewSet/index.d.ts +89 -0
  76. package/dist/components/ViewSet/index.js +14 -0
  77. package/dist/components/ViewSet/index.js.map +1 -0
  78. package/dist/components/ViewSwitcher/index.cjs +20 -0
  79. package/dist/components/ViewSwitcher/index.cjs.map +1 -0
  80. package/dist/components/ViewSwitcher/index.d.cts +40 -0
  81. package/dist/components/ViewSwitcher/index.d.ts +40 -0
  82. package/dist/components/ViewSwitcher/index.js +7 -0
  83. package/dist/components/ViewSwitcher/index.js.map +1 -0
  84. package/dist/esheet.cjs +5 -5
  85. package/dist/esheet.js +2 -2
  86. package/dist/hooks/index.cjs +5 -5
  87. package/dist/hooks/index.js +1 -1
  88. package/dist/index.cjs +439 -372
  89. package/dist/index.cjs.map +1 -1
  90. package/dist/index.d.cts +8 -0
  91. package/dist/index.d.ts +8 -0
  92. package/dist/index.js +57 -50
  93. package/dist/index.js.map +1 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/tailwind-preset.cjs +4 -4
  96. package/dist/tailwind-preset.js +1 -1
  97. package/dist/types-CbWXIKbe.d.cts +119 -0
  98. package/dist/types-CbWXIKbe.d.ts +119 -0
  99. package/package.json +1 -1
  100. package/dist/chunk-JI244Y7C.js.map +0 -1
  101. package/dist/chunk-U42F3HLE.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/BoardView/BoardView.tsx"],"names":["defaultViewLabels","cva","useDraggable","jsxs","jsx","cn","accentClasses","useDroppable","React","useSensors","useSensor","PointerSensor","Spinner","DndContext","pointerWithin","DragOverlay"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDO,IAAM,kBAAA,GAAkC;AAAA,EAC7C,GAAGA,mCAAA;AAAA,EACH,KAAA,EAAO,uBAAA;AAAA,EACP,KAAA,EAAO,OAAA;AAAA,EACP,KAAA,EAAO,yBAAA;AAAA,EACP,UAAA,EAAY,uBAAA;AAAA,EACZ,QAAA,EAAU;AACZ;AAsBA,IAAM,YAAA,GAAeC,0BAAA;AAAA,EACnB;AAAA,IACE,+DAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,WAAA,EAAa,KAAA;AAAA,QACb,OAAA,EAAS;AAAA,OACX;AAAA,MACA,WAAA,EAAa,EAAE,IAAA,EAAM,6BAAA,EAA+B,OAAO,EAAA,EAAG;AAAA,MAC9D,QAAA,EAAU,EAAE,IAAA,EAAM,4BAAA,EAA8B,OAAO,EAAA,EAAG;AAAA,MAC1D,OAAA,EAAS,EAAE,IAAA,EAAM,YAAA,EAAc,OAAO,EAAA;AAAG,KAC3C;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,aAAA;AAAA,MACT,WAAA,EAAa,KAAA;AAAA,MACb,QAAA,EAAU,KAAA;AAAA,MACV,OAAA,EAAS;AAAA;AACX;AAEJ;AAEA,IAAM,IAAA,GAAO,CAAC,QAAA,EAAkB,MAAA,KAC9B,QAAA,CAAS,OAAA,CAAQ,YAAA,EAAc,CAAC,CAAA,EAAG,GAAA,KAAQ,MAAA,CAAO,GAAG,KAAK,EAAE,CAAA;AAsB9D,SAAS,SAAA,CAAU;AAAA,EACjB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA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EAAU,2CAAA,EACb,oBAAU,QAAA,CAAS,YAAY,CAAA,EAClC,CAAA,EACF,CAAA,EAEJ;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-4IS3QCOQ.cjs","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n DndContext,\n DragOverlay,\n PointerSensor,\n pointerWithin,\n useDraggable,\n useDroppable,\n useSensor,\n useSensors,\n type DragEndEvent,\n type DragStartEvent,\n} from '@dnd-kit/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from '../Spinner';\nimport {\n accentClasses,\n defaultViewLabels,\n type Accent,\n type Stage,\n type ViewBaseProps,\n type ViewLabels,\n} from '../../views/types';\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type BoardViewSlot =\n | 'column'\n | 'columnHeader'\n | 'card'\n | 'selectedCard'\n | 'state';\n\nexport interface BoardLabels extends ViewLabels {\n /** Accessible name of the scrollable board region. */\n board: string;\n /** Announced when a card starts moving. `{item}` and `{stage}` are substituted. */\n moved: string;\n /** Announced when `onMove` rejects. */\n moveFailed: string;\n /** Hint on a focusable card describing the keyboard move. */\n moveHint: string;\n}\n\nexport const defaultBoardLabels: BoardLabels = {\n ...defaultViewLabels,\n empty: 'Nothing in this stage',\n board: 'Board',\n moved: '{item} moved to {stage}',\n moveFailed: 'Could not move {item}',\n moveHint: 'Press Control with the arrow keys to move between stages',\n};\n\nexport interface BoardViewProps<T>\n extends ViewBaseProps<T>, VariantProps<typeof cardVariants> {\n /** Columns, in order. A board without stages has nothing to draw. */\n stages: readonly Stage[];\n /**\n * Commits a move. The board shows the card in its new column while this is\n * pending and puts it back if the promise rejects, so the caller never has to\n * re-render it home.\n */\n onMove?: (id: string, toStage: string, item: T) => void | Promise<void>;\n labels?: Partial<BoardLabels>;\n classNames?: Partial<Record<BoardViewSlot, string>>;\n /** Heading level for column headers, under the page's own heading. */\n headingLevel?: 'h2' | 'h3' | 'h4';\n}\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nconst cardVariants = cva(\n [\n 'w-full rounded-md border border-border bg-card p-2 text-start',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n ],\n {\n variants: {\n density: {\n comfortable: 'p-3',\n compact: 'p-2',\n },\n interactive: { true: 'hover:border-primary-500/40', false: '' },\n selected: { true: 'ring-2 ring-primary-500/50', false: '' },\n pending: { true: 'opacity-60', false: '' },\n },\n defaultVariants: {\n density: 'comfortable',\n interactive: false,\n selected: false,\n pending: false,\n },\n }\n);\n\nconst fill = (template: string, values: Record<string, string>) =>\n template.replace(/\\{(\\w+)\\}/g, (_, key) => values[key] ?? '');\n\n// =============================================================================\n// Card\n// =============================================================================\n\ninterface CardProps {\n id: string;\n title: string;\n subtitle?: string;\n accent?: Accent;\n selected: boolean;\n pending: boolean;\n draggable: boolean;\n hint?: string;\n href?: string;\n className?: string;\n children?: React.ReactNode;\n onOpen?: () => void;\n onKeyDown?: (event: React.KeyboardEvent) => void;\n}\n\nfunction BoardCard({\n id,\n title,\n subtitle,\n accent,\n selected,\n pending,\n draggable,\n hint,\n href,\n className,\n children,\n onOpen,\n onKeyDown,\n}: CardProps) {\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id,\n disabled: !draggable,\n });\n\n const body = children ?? (\n <span className=\"flex items-start gap-2\">\n {accent && (\n <span\n aria-hidden\n className={cn(\n 'mt-1.5 size-2 shrink-0 rounded-full',\n accentClasses[accent].marker\n )}\n />\n )}\n <span className=\"min-w-0 flex-1\">\n <span className=\"text-foreground block text-sm font-medium\">\n {title}\n </span>\n {subtitle && (\n <span className=\"text-muted-foreground block truncate text-xs\">\n {subtitle}\n </span>\n )}\n </span>\n </span>\n );\n\n const onCardKeyDown = (event: React.KeyboardEvent) => {\n if (onOpen && !href && (event.key === 'Enter' || event.key === ' ')) {\n // Space is dnd-kit's pick-up key only while dragging; here the card is at\n // rest, so it activates like any other button.\n if (!event.ctrlKey && !event.metaKey) {\n event.preventDefault();\n onOpen();\n return;\n }\n }\n onKeyDown?.(event);\n };\n\n const shared = {\n ref: setNodeRef,\n // Only the pointer listeners are shared. dnd-kit's `attributes` carry\n // `role=\"button\"` and a `tabIndex`, which on an `<a href>` would override\n // the native link role — the card would announce as a button, and the\n // middle-click / \"copy link\" affordance this branch exists to preserve\n // would no longer be what assistive tech describes. The non-link card takes\n // them below, where button semantics are the correct answer.\n ...(draggable ? listeners : {}),\n 'aria-current': selected ? ('true' as const) : undefined,\n 'aria-describedby': hint,\n 'aria-busy': pending || undefined,\n 'data-slot': 'board-view-card',\n className: cn(className, isDragging && 'opacity-40'),\n };\n\n return (\n <li>\n {href ? (\n // An anchor, like every other view: the card stays middle-clickable and\n // \"copy link\" works. dnd-kit's listeners still own the drag.\n <a\n {...shared}\n href={href}\n onKeyDown={onCardKeyDown}\n onClick={(event) => {\n if (\n !onOpen ||\n event.defaultPrevented ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.button !== 0\n )\n return;\n event.preventDefault();\n onOpen();\n }}\n >\n {body}\n </a>\n ) : (\n <div\n {...shared}\n {...(draggable ? attributes : {})}\n role={onOpen ? 'button' : undefined}\n tabIndex={draggable || onOpen ? 0 : undefined}\n onKeyDown={onCardKeyDown}\n onClick={onOpen}\n >\n {body}\n </div>\n )}\n </li>\n );\n}\n\n// =============================================================================\n// Column\n// =============================================================================\n\nfunction BoardColumn({\n stage,\n headerId,\n count,\n headingLevel: Heading,\n droppable,\n classNames,\n children,\n}: {\n stage: Stage;\n droppable: boolean;\n headerId: string;\n count: number;\n headingLevel: 'h2' | 'h3' | 'h4';\n classNames?: BoardViewProps<unknown>['classNames'];\n children: React.ReactNode;\n}) {\n const { setNodeRef, isOver } = useDroppable({\n id: stage.id,\n disabled: !droppable,\n });\n const accent = stage.accent ?? 'neutral';\n return (\n <section\n ref={setNodeRef}\n data-slot=\"board-view-column\"\n data-over={isOver || undefined}\n className={cn(\n 'bg-muted/40 flex min-w-0 flex-col rounded-lg border',\n isOver ? accentClasses[accent].border : 'border-border',\n 'sm:w-72 sm:shrink-0',\n classNames?.column\n )}\n >\n <Heading>\n <span\n id={headerId}\n data-slot=\"board-view-column-header\"\n className={cn(\n 'border-border text-muted-foreground flex items-center gap-2 border-b px-3 py-2 text-xs font-semibold tracking-wide uppercase',\n classNames?.columnHeader\n )}\n >\n <span\n aria-hidden\n className={cn(\n 'size-2 shrink-0 rounded-full',\n accentClasses[accent].marker\n )}\n />\n <span>{stage.label}</span>\n <span className=\"ms-auto font-normal tabular-nums\">{count}</span>\n </span>\n </Heading>\n {children}\n </section>\n );\n}\n\n// =============================================================================\n// Component\n// =============================================================================\n\nexport function BoardView<T>({\n items,\n accessors,\n stages,\n loading = false,\n error = null,\n selectedId = null,\n onOpen,\n getHref,\n onMove,\n renderItem,\n emptyState,\n labels,\n density,\n className,\n classNames,\n headingLevel = 'h3',\n}: BoardViewProps<T>) {\n const text = { ...defaultBoardLabels, ...labels };\n const hintId = React.useId();\n // Ids come from position, not from the stage id: two distinct statuses can\n // normalise to the same string, and a duplicate id makes `aria-labelledby`\n // resolve to the wrong heading.\n const baseId = React.useId();\n const [announcement, setAnnouncement] = React.useState('');\n const [draggingId, setDraggingId] = React.useState<string | null>(null);\n // Where a card is shown while its move is in flight, so the column it landed\n // in is the one the user sees before the caller's data catches up.\n // A Map, not an object. Ids come from the caller's `getId` and are only\n // typed `string`, so a collection keyed by user data can legitimately produce\n // `toString`, `constructor` or `__proto__`. On a plain object `'toString' in\n // pending` is true before anything is pending, which would pin that card as\n // permanently in-flight and make it impossible to move.\n const [pending, setPending] = React.useState<Map<string, string>>(\n () => new Map()\n );\n\n const byId = React.useMemo(() => {\n const map = new Map<string, T>();\n for (const item of items) map.set(accessors.getId(item), item);\n return map;\n }, [items, accessors]);\n\n const stageOf = React.useCallback(\n (item: T) =>\n pending.get(accessors.getId(item)) ?? accessors.getStatus?.(item),\n [pending, accessors]\n );\n\n const columns = React.useMemo(() => {\n const buckets = new Map<string, T[]>(stages.map((s) => [s.id, []]));\n const extra = new Map<string, T[]>();\n for (const item of items) {\n const key = stageOf(item) ?? '';\n const bucket = buckets.get(key);\n if (bucket) bucket.push(item);\n else {\n const spill = extra.get(key);\n if (spill) spill.push(item);\n else extra.set(key, [item]);\n }\n }\n return [\n ...stages.map((stage) => ({\n stage,\n declared: true,\n items: buckets.get(stage.id) ?? [],\n })),\n // Never silently drop a record whose status matches no stage. These are\n // shown so the record stays visible, but they are not drop targets: their\n // ids were never declared, and `onMove` promises a named stage.\n ...[...extra].map(([key, bucket]) => ({\n stage: { id: key, label: key || text.ungrouped } as Stage,\n declared: false,\n items: bucket,\n })),\n ];\n }, [items, stages, stageOf, text.ungrouped]);\n\n const commit = React.useCallback(\n async (id: string, toStage: string) => {\n const item = byId.get(id);\n if (!item || !onMove) return;\n // One move per card at a time: a second would overwrite the first's\n // pending stage, and the first `finally` would then clear it, snapping\n // the card home while the second mutation is still in flight.\n if (pending.has(id)) return;\n const stage = stages.find((s) => s.id === toStage);\n // `onMove` promises a move to a stage the caller declared. Columns\n // synthesized for unknown statuses exist so a record is never silently\n // dropped, not as somewhere to put things — accepting a drop there would\n // hand back an id that was never in `stages`.\n if (!stage) return;\n const from = accessors.getStatus?.(item);\n if (from === toStage) return;\n const title = accessors.getTitle(item);\n\n setPending((prev) => new Map(prev).set(id, toStage));\n setAnnouncement(\n fill(text.moved, { item: title, stage: stage.label ?? toStage })\n );\n try {\n await onMove(id, toStage, item);\n } catch {\n setAnnouncement(fill(text.moveFailed, { item: title }));\n } finally {\n setPending((prev) => {\n const next = new Map(prev);\n next.delete(id);\n return next;\n });\n }\n },\n [byId, onMove, pending, accessors, stages, text.moved, text.moveFailed]\n );\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 5 } })\n );\n\n const onDragStart = (event: DragStartEvent) =>\n setDraggingId(String(event.active.id));\n\n const onDragEnd = (event: DragEndEvent) => {\n setDraggingId(null);\n if (event.over) void commit(String(event.active.id), String(event.over.id));\n };\n\n // Pointer drag has no keyboard equivalent that is pleasant to use, so moving\n // by keyboard is its own command on the focused card rather than a simulated\n // drag: Ctrl/Cmd with the arrow keys steps it between adjacent stages.\n const onCardKeyDown = (\n event: React.KeyboardEvent,\n id: string,\n columnIndex: number\n ) => {\n if (!onMove || !(event.ctrlKey || event.metaKey)) return;\n const rtl = getComputedStyle(event.currentTarget).direction === 'rtl';\n let delta = 0;\n if (event.key === 'ArrowRight') delta = rtl ? -1 : 1;\n else if (event.key === 'ArrowLeft') delta = rtl ? 1 : -1;\n else return;\n // Step to the next *declared* stage. A fallback column is not a move\n // target, so stopping on one would strand the card there; skipping it\n // keeps arrowing continuous and still lets a card leave one.\n let target;\n for (\n let i = columnIndex + delta;\n i >= 0 && i < columns.length;\n i += delta\n ) {\n if (columns[i].declared) {\n target = columns[i];\n break;\n }\n }\n if (!target) return;\n event.preventDefault();\n void commit(id, target.stage.id);\n };\n\n const state = (content: React.ReactNode) => (\n <div\n data-slot=\"board-view-state\"\n className={cn(\n 'border-border bg-card text-muted-foreground flex flex-col items-center justify-center gap-2 rounded-lg border px-4 py-10 text-center text-sm',\n classNames?.state\n )}\n >\n {content}\n </div>\n );\n\n if (error) {\n return state(\n <p role=\"alert\" className=\"text-destructive\">\n {text.error}\n </p>\n );\n }\n if (loading) {\n return state(\n <span className=\"flex items-center gap-2\">\n <Spinner size=\"sm\" label={text.loading} />\n <span aria-hidden>{text.loading}</span>\n </span>\n );\n }\n if (items.length === 0 && emptyState) return <>{emptyState}</>;\n\n const draggingItem = draggingId ? byId.get(draggingId) : undefined;\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={pointerWithin}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n onDragCancel={() => setDraggingId(null)}\n >\n <div\n data-slot=\"board-view\"\n // Scrollable content must be keyboard operable (WCAG 2.1.1), which axe\n // enforces as scrollable-region-focusable. jsx-a11y disagrees for\n // non-interactive elements; the success criterion wins.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n role=\"group\"\n aria-label={text.board}\n className={cn(\n // Columns on one scrolling row once there is room; stacked below it,\n // because five 288px columns on a phone is a horizontal maze.\n 'flex flex-col gap-3 sm:flex-row sm:overflow-x-auto sm:pb-2',\n className\n )}\n >\n {columns.map((column, columnIndex) => (\n <BoardColumn\n key={column.stage.id}\n stage={column.stage}\n droppable={column.declared && Boolean(onMove)}\n headerId={`${baseId}-col-${columnIndex}`}\n count={column.items.length}\n headingLevel={headingLevel}\n classNames={classNames}\n >\n <ul\n aria-labelledby={`${baseId}-col-${columnIndex}`}\n className=\"flex flex-1 flex-col gap-2 p-2\"\n >\n {column.items.map((item) => {\n const id = accessors.getId(item);\n return (\n <BoardCard\n key={id}\n id={id}\n title={accessors.getTitle(item)}\n subtitle={accessors.getSubtitle?.(item)}\n accent={accessors.getAccent?.(item)}\n selected={id === selectedId}\n pending={pending.has(id)}\n draggable={Boolean(onMove)}\n hint={onMove ? hintId : undefined}\n href={getHref?.(id, item)}\n className={cn(\n cardVariants({\n density,\n interactive: Boolean(onOpen),\n selected: id === selectedId,\n pending: pending.has(id),\n }),\n classNames?.card,\n id === selectedId && classNames?.selectedCard\n )}\n onOpen={onOpen ? () => onOpen(id, item) : undefined}\n onKeyDown={(event) => onCardKeyDown(event, id, columnIndex)}\n >\n {renderItem?.(item, { view: 'board' })}\n </BoardCard>\n );\n })}\n {column.items.length === 0 && (\n <li className=\"text-muted-foreground px-1 py-2 text-xs\">\n {text.empty}\n </li>\n )}\n </ul>\n </BoardColumn>\n ))}\n </div>\n\n {onMove && (\n <span id={hintId} className=\"sr-only\">\n {text.moveHint}\n </span>\n )}\n {/* Separate from dnd-kit's own drag live region: this announces moves\n made by keyboard command, which are not drags. */}\n <span\n data-slot=\"board-view-announcer\"\n role=\"status\"\n aria-live=\"polite\"\n className=\"sr-only\"\n >\n {announcement}\n </span>\n\n <DragOverlay>\n {draggingItem && (\n <div className={cn(cardVariants({ density }), 'shadow-lg')}>\n <span className=\"text-foreground block text-sm font-medium\">\n {accessors.getTitle(draggingItem)}\n </span>\n </div>\n )}\n </DragOverlay>\n </DndContext>\n );\n}\n\nexport { cardVariants as boardViewCardVariants };\n"]}
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var luxon = require('luxon');
4
+
5
+ // src/views/types.ts
6
+ var defaultViewLabels = {
7
+ viewSwitcher: "View",
8
+ loading: "Loading",
9
+ empty: "Nothing to show",
10
+ error: "Could not load this view",
11
+ retry: "Try again",
12
+ ungrouped: "Ungrouped"
13
+ };
14
+ function toDateTime(value, zone) {
15
+ if (value == null) return null;
16
+ const dt = value instanceof Date ? luxon.DateTime.fromJSDate(value, { zone }) : luxon.DateTime.fromISO(value, { zone });
17
+ return dt.isValid ? dt : null;
18
+ }
19
+ var accentClasses = {
20
+ primary: {
21
+ tint: "bg-primary-500/10",
22
+ border: "border-primary-500/40",
23
+ marker: "bg-primary-500"
24
+ },
25
+ success: {
26
+ tint: "bg-success/10",
27
+ border: "border-success/40",
28
+ marker: "bg-success"
29
+ },
30
+ warning: {
31
+ tint: "bg-warning/10",
32
+ border: "border-warning/40",
33
+ marker: "bg-warning"
34
+ },
35
+ destructive: {
36
+ tint: "bg-destructive/10",
37
+ border: "border-destructive/40",
38
+ marker: "bg-destructive"
39
+ },
40
+ info: {
41
+ tint: "bg-info/10",
42
+ border: "border-info/40",
43
+ marker: "bg-info"
44
+ },
45
+ neutral: {
46
+ tint: "bg-muted",
47
+ border: "border-border",
48
+ marker: "bg-muted-foreground"
49
+ }
50
+ };
51
+
52
+ exports.accentClasses = accentClasses;
53
+ exports.defaultViewLabels = defaultViewLabels;
54
+ exports.toDateTime = toDateTime;
55
+ //# sourceMappingURL=chunk-4NCDU5IG.cjs.map
56
+ //# sourceMappingURL=chunk-4NCDU5IG.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/views/types.ts"],"names":["DateTime"],"mappings":";;;;;AAmFO,IAAM,iBAAA,GAAg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","file":"chunk-4NCDU5IG.cjs","sourcesContent":["/**\n * The contract every component in the `Modules/Views` family reads through.\n *\n * A page describes its collection once — which field is the id, the title, the\n * status, the start date — and every view understands it. That is the whole\n * reason the family exists: without it each view needs its own adapter and you\n * end up re-implementing the same board per entity.\n *\n * Views are headless. Nothing here fetches, subscribes, or navigates.\n * See CONTRIBUTING → \"Modules: headless data components\".\n */\nimport type * as React from 'react';\nimport { DateTime } from 'luxon';\n\n/**\n * Which layout is on screen. `overview` and `table` are rendered by the host\n * through `ViewSet` slots rather than by a component in this family — a tabular\n * collection is `DataVisNitroGrid`, and an overview is domain content.\n */\nexport type ViewId =\n | 'overview'\n | 'list'\n | 'board'\n | 'calendar'\n | 'gantt'\n | 'roadmap'\n | 'table';\n\n/**\n * A semantic colour name, resolved to `--mieweb-*` tokens by each view.\n *\n * Accessors return one of these rather than a class string so a caller cannot\n * hardcode a palette that breaks under another brand or in dark mode.\n */\nexport type Accent =\n | 'primary'\n | 'success'\n | 'warning'\n | 'destructive'\n | 'info'\n | 'neutral';\n\n/** A named stage: a board column, and the segments of a stage bar. */\nexport interface Stage {\n id: string;\n label: string;\n accent?: Accent;\n}\n\n/**\n * How a view reads one item. Only `getId` and `getTitle` are always required;\n * each view documents which of the rest it needs (a board needs `getStatus`, a\n * Gantt needs `getStart`) and renders an explanatory empty state without them.\n */\nexport interface ViewAccessors<T> {\n getId: (item: T) => string;\n getTitle: (item: T) => string;\n /** Secondary line under the title. */\n getSubtitle?: (item: T) => string | undefined;\n /** Board column and list group; matched against `Stage['id']`. */\n getStatus?: (item: T) => string;\n /** Gantt bar start, calendar placement. */\n getStart?: (item: T) => Date | string | null | undefined;\n /** Gantt bar end, calendar span. Falls back to the start when absent. */\n getEnd?: (item: T) => Date | string | null | undefined;\n /** Swimlane in a roadmap, row group in a Gantt. */\n getGroup?: (item: T) => string | undefined;\n getAccent?: (item: T) => Accent;\n}\n\n/** Strings a view renders. Every one is overridable; the defaults are English. */\nexport interface ViewLabels {\n /** Accessible name of the view switcher group. */\n viewSwitcher: string;\n loading: string;\n empty: string;\n error: string;\n /** Action on the error state. */\n retry: string;\n /** Heading for the group a record with no status or group falls into. */\n ungrouped: string;\n}\n\nexport const defaultViewLabels: ViewLabels = {\n viewSwitcher: 'View',\n loading: 'Loading',\n empty: 'Nothing to show',\n error: 'Could not load this view',\n retry: 'Try again',\n ungrouped: 'Ungrouped',\n};\n\n/**\n * Props every view accepts. Views are controlled: selection, the active view and\n * filter state live in the page, and every change is handed back.\n */\nexport interface ViewBaseProps<T> {\n items: T[];\n accessors: ViewAccessors<T>;\n loading?: boolean;\n error?: Error | null;\n selectedId?: string | null;\n /** Called when the user activates an item. */\n onOpen?: (id: string, item: T) => void;\n /** Return a URL to render each item as a real anchor — middle-clickable and crawlable. */\n getHref?: (id: string, item: T) => string;\n /** Render one item. Receives the active view so one function can serve several. */\n renderItem?: (item: T, context: { view: ViewId }) => React.ReactNode;\n /** Replaces the built-in empty state. */\n emptyState?: React.ReactNode;\n labels?: Partial<ViewLabels>;\n /** Pins \"today\" so stories, tests and visual snapshots stay deterministic. */\n now?: Date;\n className?: string;\n}\n\n/**\n * Reads an accessor's date in the view's zone.\n *\n * `DateTime.fromISO` is what makes this correct for both shapes an accessor may\n * return. A date-only string is a wall date — `2026-03-10` means that calendar\n * day where the collection lives, not UTC midnight, which is the 9th in the\n * Americas — while a full timestamp is an instant and gets converted. Going via\n * `new Date()` would collapse the first case into the second and shift the item\n * onto the previous day in every zone behind UTC.\n */\nexport function toDateTime(\n value: Date | string | null | undefined,\n zone: string\n): DateTime | null {\n if (value == null) return null;\n const dt =\n value instanceof Date\n ? DateTime.fromJSDate(value, { zone })\n : DateTime.fromISO(value, { zone });\n return dt.isValid ? dt : null;\n}\n\n/**\n * Tailwind classes per accent, so every view tints the same way.\n *\n * There is deliberately no text colour here. `--mieweb-success` and friends are\n * fill tokens: as ink on a surface — even their own 10% wash — they fail WCAG AA\n * contrast, which axe catches as a serious violation. So an accent is carried by\n * a wash, a border and a solid marker, and label text always uses a foreground\n * token. That also means colour is never the only signal.\n */\nexport const accentClasses: Record<\n Accent,\n { tint: string; border: string; marker: string }\n> = {\n primary: {\n tint: 'bg-primary-500/10',\n border: 'border-primary-500/40',\n marker: 'bg-primary-500',\n },\n success: {\n tint: 'bg-success/10',\n border: 'border-success/40',\n marker: 'bg-success',\n },\n warning: {\n tint: 'bg-warning/10',\n border: 'border-warning/40',\n marker: 'bg-warning',\n },\n destructive: {\n tint: 'bg-destructive/10',\n border: 'border-destructive/40',\n marker: 'bg-destructive',\n },\n info: {\n tint: 'bg-info/10',\n border: 'border-info/40',\n marker: 'bg-info',\n },\n neutral: {\n tint: 'bg-muted',\n border: 'border-border',\n marker: 'bg-muted-foreground',\n },\n};\n"]}
@@ -0,0 +1,166 @@
1
+ import { ViewSwitcher } from './chunk-IT775BYG.js';
2
+ import { ListView } from './chunk-DZ5HFLRC.js';
3
+ import { GanttView } from './chunk-Y4QNLW7W.js';
4
+ import { BoardView } from './chunk-XVW5DPPP.js';
5
+ import { CalendarView } from './chunk-G4D6CLBT.js';
6
+ import { cn } from './chunk-TQONQSJO.js';
7
+ import * as React from 'react';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ var FIRST_ID = (views) => {
11
+ const first = views[0];
12
+ return (typeof first === "string" ? first : first?.id) ?? "list";
13
+ };
14
+ var readStored = (key) => {
15
+ try {
16
+ return globalThis.localStorage?.getItem(key) ?? null;
17
+ } catch {
18
+ return null;
19
+ }
20
+ };
21
+ var writeStored = (key, value) => {
22
+ try {
23
+ globalThis.localStorage?.setItem(key, value);
24
+ } catch {
25
+ }
26
+ };
27
+ function ViewSet({
28
+ views,
29
+ view,
30
+ defaultView,
31
+ onViewChange,
32
+ storageKey,
33
+ stages,
34
+ onMove,
35
+ toolbar,
36
+ filters,
37
+ overview,
38
+ table,
39
+ detail,
40
+ listProps,
41
+ boardProps,
42
+ calendarProps,
43
+ ganttProps,
44
+ className,
45
+ classNames,
46
+ ...shared
47
+ }) {
48
+ const [internalView, setInternalView] = React.useState(
49
+ () => defaultView ?? FIRST_ID(views)
50
+ );
51
+ const offered = React.useMemo(
52
+ () => views.filter((v) => {
53
+ const id = typeof v === "string" ? v : v.id;
54
+ if (id === "overview") return overview != null;
55
+ if (id === "table") return table != null;
56
+ return true;
57
+ }),
58
+ [views, overview, table]
59
+ );
60
+ React.useEffect(() => {
61
+ if (!storageKey || view) return;
62
+ const stored = readStored(storageKey);
63
+ if (stored && offered.some((v) => (typeof v === "string" ? v : v.id) === stored))
64
+ setInternalView(stored);
65
+ }, [storageKey, view, offered]);
66
+ const requested = view ?? internalView;
67
+ const active = offered.some(
68
+ (v) => (typeof v === "string" ? v : v.id) === requested
69
+ ) ? requested : FIRST_ID(offered);
70
+ const changeView = (next) => {
71
+ if (!view) setInternalView(next);
72
+ if (storageKey && !view) writeStored(storageKey, next);
73
+ onViewChange?.(next);
74
+ };
75
+ const body = (() => {
76
+ switch (active) {
77
+ case "overview":
78
+ return overview ?? null;
79
+ case "table":
80
+ return table ?? null;
81
+ case "board":
82
+ return /* @__PURE__ */ jsx(
83
+ BoardView,
84
+ {
85
+ ...shared,
86
+ stages: stages ?? [],
87
+ onMove,
88
+ ...boardProps
89
+ }
90
+ );
91
+ case "calendar":
92
+ return /* @__PURE__ */ jsx(CalendarView, { ...shared, ...calendarProps });
93
+ case "gantt":
94
+ return /* @__PURE__ */ jsx(GanttView, { ...shared, ...ganttProps });
95
+ case "roadmap":
96
+ return /* @__PURE__ */ jsx(
97
+ GanttView,
98
+ {
99
+ ...shared,
100
+ ...ganttProps,
101
+ cadence: "quarter",
102
+ groupByLane: true
103
+ }
104
+ );
105
+ case "list":
106
+ default:
107
+ return /* @__PURE__ */ jsx(ListView, { ...shared, stages, ...listProps });
108
+ }
109
+ })();
110
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "view-set", className: cn("flex flex-col gap-3", className), children: [
111
+ /* @__PURE__ */ jsxs(
112
+ "div",
113
+ {
114
+ "data-slot": "view-set-toolbar",
115
+ className: cn("flex flex-wrap items-center gap-2", classNames?.toolbar),
116
+ children: [
117
+ toolbar,
118
+ /* @__PURE__ */ jsx(
119
+ "div",
120
+ {
121
+ "data-slot": "view-set-switcher",
122
+ className: cn("ms-auto", classNames?.switcher),
123
+ children: /* @__PURE__ */ jsx(
124
+ ViewSwitcher,
125
+ {
126
+ views: offered,
127
+ value: active,
128
+ onValueChange: changeView,
129
+ label: shared.labels?.viewSwitcher
130
+ }
131
+ )
132
+ }
133
+ )
134
+ ]
135
+ }
136
+ ),
137
+ filters,
138
+ /* @__PURE__ */ jsxs(
139
+ "div",
140
+ {
141
+ "data-slot": "view-set-body",
142
+ className: cn(
143
+ // Plain column spans rather than an arbitrary grid template, so a
144
+ // Tailwind 3 consumer needs no extra safelist entry.
145
+ detail && "gap-3 lg:grid lg:grid-cols-3",
146
+ classNames?.body
147
+ ),
148
+ children: [
149
+ /* @__PURE__ */ jsx("div", { className: cn("min-w-0", detail && "lg:col-span-2"), children: body }),
150
+ detail && /* @__PURE__ */ jsx(
151
+ "aside",
152
+ {
153
+ "data-slot": "view-set-detail",
154
+ className: cn("min-w-0", classNames?.detail),
155
+ children: detail
156
+ }
157
+ )
158
+ ]
159
+ }
160
+ )
161
+ ] });
162
+ }
163
+
164
+ export { ViewSet };
165
+ //# sourceMappingURL=chunk-76TBQDED.js.map
166
+ //# sourceMappingURL=chunk-76TBQDED.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ViewSet/ViewSet.tsx"],"names":[],"mappings":";;;;;;;;;AAoGA,IAAM,QAAA,GAAW,CAAC,KAAA,KAA0C;AAC1D,EAAA,MAAM,KAAA,GAAQ,MAAM,CAAC,CAAA;AACrB,EAAA,OAAA,CAAQ,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,OAAO,EAAA,KAAO,MAAA;AAC5D,CAAA;AAMA,IAAM,UAAA,GAAa,CAAC,GAAA,KAA+B;AACjD,EAAA,IA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kBACP,aAAA,EAAe,UAAA;AAAA,kBACf,KAAA,EAAO,OAAO,MAAA,EAAQ;AAAA;AAAA;AACxB;AAAA;AACF;AAAA;AAAA,KACF;AAAA,IACC,OAAA;AAAA,oBACD,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,WAAA,EAAU,eAAA;AAAA,QACV,SAAA,EAAW,EAAA;AAAA;AAAA;AAAA,UAGT,MAAA,IAAU,8BAAA;AAAA,UACV,UAAA,EAAY;AAAA,SACd;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,SAAI,SAAA,EAAW,EAAA,CAAG,WAAW,MAAA,IAAU,eAAe,GAAI,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,UAC/D,MAAA,oBACC,GAAA;AAAA,YAAC,OAAA;AAAA,YAAA;AAAA,cACC,WAAA,EAAU,iBAAA;AAAA,cACV,SAAA,EAAW,EAAA,CAAG,SAAA,EAAW,UAAA,EAAY,MAAM,CAAA;AAAA,cAE1C,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA;AAEJ,GAAA,EACF,CAAA;AAEJ","file":"chunk-76TBQDED.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../utils/cn';\nimport { ViewSwitcher, type ViewOption } from '../ViewSwitcher';\nimport { ListView, type ListViewProps } from '../ListView';\nimport { BoardView, type BoardLabels, type BoardViewProps } from '../BoardView';\nimport {\n CalendarView,\n type CalendarLabels,\n type CalendarViewProps,\n} from '../CalendarView';\nimport { GanttView, type GanttLabels, type GanttViewProps } from '../GanttView';\nimport type { Stage, ViewBaseProps, ViewId } from '../../views/types';\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Every string any layout in the set can render.\n *\n * Each view extends `ViewLabels` with its own — the calendar's month arrows and\n * \"+n more\", the board's move announcements, the Gantt's undated footnote. They\n * are all shared props, so the per-view escape hatches below exclude `labels`;\n * without widening here a non-English host could translate the common strings\n * and nothing else, which would break the contract that every user-facing\n * string is overridable. A view ignores the keys it does not know.\n */\nexport type ViewSetLabels = Partial<CalendarLabels & BoardLabels & GanttLabels>;\n\n/**\n * Props `ViewSet` passes to every layout itself, beyond `ViewBaseProps`. Named\n * here so the per-view escape hatches below can exclude them by key rather than\n * by a hand-kept list that would drift the moment a shared prop is added.\n */\ntype ViewSetOwned = 'stages' | 'onMove' | 'timeZone' | 'locale';\n\ntype ViewOverrides<P, T> = Omit<\n Partial<P>,\n keyof ViewBaseProps<T> | ViewSetOwned\n>;\n\nexport interface ViewSetProps<T> extends ViewBaseProps<T> {\n /** Every string any offered layout can render, not just the shared ones. */\n labels?: ViewSetLabels;\n /** Views to offer, in order. The first is the default when uncontrolled. */\n views: readonly (ViewId | ViewOption)[];\n view?: ViewId;\n defaultView?: ViewId;\n onViewChange?: (view: ViewId) => void;\n /**\n * Remembers the chosen view under this key. Ignored when `view` is\n * controlled — a page with its own URL state should own it there instead.\n */\n storageKey?: string;\n /** Stages for the board and for list grouping. */\n stages?: readonly Stage[];\n onMove?: BoardViewProps<T>['onMove'];\n /**\n * IANA zone the date views read day boundaries in. Shared, because a page\n * showing one collection as a calendar and as a Gantt must place it on the\n * same days in both.\n */\n timeZone?: string;\n /** Locale for date formatting in the calendar and Gantt. */\n locale?: string;\n\n /** Rendered above the switcher row. */\n toolbar?: React.ReactNode;\n /** Rendered under the switcher row, above the view. */\n filters?: React.ReactNode;\n /** The `overview` view. Domain content — the library has no opinion on it. */\n overview?: React.ReactNode;\n /** The `table` view. A tabular collection is a grid, not a view component. */\n table?: React.ReactNode;\n /** Rendered beside the view, for a list-plus-detail layout. */\n detail?: React.ReactNode;\n\n /**\n * Per-view escape hatches for props this shell does not surface. Shared props\n * are excluded: one collection rendered several ways means switching view can\n * never change the records, the selection or the load state.\n *\n * `ViewSetOwned` covers the props the shell passes itself but that are not on\n * `ViewBaseProps`. They are spread after the shared ones, so leaving them open\n * would let one layout carry different stages, a different mutation callback\n * or a different time zone from its neighbours — the same collection quietly\n * disagreeing with itself as you switch tabs.\n */\n listProps?: ViewOverrides<ListViewProps<T>, T>;\n boardProps?: ViewOverrides<BoardViewProps<T>, T>;\n calendarProps?: ViewOverrides<CalendarViewProps<T>, T>;\n ganttProps?: ViewOverrides<GanttViewProps<T>, T>;\n\n classNames?: Partial<\n Record<'toolbar' | 'switcher' | 'body' | 'detail', string>\n >;\n}\n\nconst FIRST_ID = (views: ViewSetProps<unknown>['views']) => {\n const first = views[0];\n return (typeof first === 'string' ? first : first?.id) ?? 'list';\n};\n\n// Remembering the view is an enhancement, never a requirement. `localStorage`\n// can exist and still throw — Safari private browsing and a blocked third-party\n// storage policy both raise on access — so optional chaining is not enough; an\n// unguarded read would take the whole page down to save a preference.\nconst readStored = (key: string): ViewId | null => {\n try {\n return (globalThis.localStorage?.getItem(key) as ViewId | null) ?? null;\n } catch {\n return null;\n }\n};\n\nconst writeStored = (key: string, value: ViewId) => {\n try {\n globalThis.localStorage?.setItem(key, value);\n } catch {\n // Fall back to in-memory state for the session.\n }\n};\n\n// =============================================================================\n// Component\n// =============================================================================\n\n/**\n * The page-level composition: switcher, the enabled views, and the slots a page\n * needs around them. It owns which view is showing and nothing else — items,\n * selection and every mutation stay with the caller.\n */\nexport function ViewSet<T>({\n views,\n view,\n defaultView,\n onViewChange,\n storageKey,\n stages,\n onMove,\n toolbar,\n filters,\n overview,\n table,\n detail,\n listProps,\n boardProps,\n calendarProps,\n ganttProps,\n className,\n classNames,\n ...shared\n}: ViewSetProps<T>) {\n const [internalView, setInternalView] = React.useState<ViewId>(\n () => defaultView ?? FIRST_ID(views)\n );\n\n // `overview` and `table` are the caller's content. Offering either without\n // its slot would put a dead option in the switcher that renders a blank page.\n const offered = React.useMemo(\n () =>\n views.filter((v) => {\n const id = typeof v === 'string' ? v : v.id;\n if (id === 'overview') return overview != null;\n if (id === 'table') return table != null;\n return true;\n }),\n [views, overview, table]\n );\n\n // Read storage after mount: a server render and the first client render must\n // agree, and localStorage is not available to the former.\n React.useEffect(() => {\n if (!storageKey || view) return;\n const stored = readStored(storageKey);\n if (\n stored &&\n offered.some((v) => (typeof v === 'string' ? v : v.id) === stored)\n )\n setInternalView(stored);\n }, [storageKey, view, offered]);\n\n const requested = view ?? internalView;\n const active = offered.some(\n (v) => (typeof v === 'string' ? v : v.id) === requested\n )\n ? requested\n : FIRST_ID(offered);\n\n const changeView = (next: ViewId) => {\n if (!view) setInternalView(next);\n if (storageKey && !view) writeStored(storageKey, next);\n onViewChange?.(next);\n };\n\n const body = (() => {\n switch (active) {\n case 'overview':\n return overview ?? null;\n case 'table':\n return table ?? null;\n case 'board':\n return (\n <BoardView\n {...shared}\n stages={stages ?? []}\n onMove={onMove}\n {...boardProps}\n />\n );\n case 'calendar':\n return <CalendarView {...shared} {...calendarProps} />;\n case 'gantt':\n return <GanttView {...shared} {...ganttProps} />;\n case 'roadmap':\n // A roadmap is the Gantt at a coarse cadence; see Views.mdx. The two\n // props that make it one come last: `ganttProps` is shared with the\n // plain `gantt` case, so a `cadence: 'day'` meant for that view must\n // not quietly turn the Roadmap option into a daily chart.\n return (\n <GanttView\n {...shared}\n {...ganttProps}\n cadence=\"quarter\"\n groupByLane\n />\n );\n case 'list':\n default:\n return <ListView {...shared} stages={stages} {...listProps} />;\n }\n })();\n\n return (\n <div data-slot=\"view-set\" className={cn('flex flex-col gap-3', className)}>\n <div\n data-slot=\"view-set-toolbar\"\n className={cn('flex flex-wrap items-center gap-2', classNames?.toolbar)}\n >\n {toolbar}\n <div\n data-slot=\"view-set-switcher\"\n className={cn('ms-auto', classNames?.switcher)}\n >\n <ViewSwitcher\n views={offered}\n value={active}\n onValueChange={changeView}\n label={shared.labels?.viewSwitcher}\n />\n </div>\n </div>\n {filters}\n <div\n data-slot=\"view-set-body\"\n className={cn(\n // Plain column spans rather than an arbitrary grid template, so a\n // Tailwind 3 consumer needs no extra safelist entry.\n detail && 'gap-3 lg:grid lg:grid-cols-3',\n classNames?.body\n )}\n >\n <div className={cn('min-w-0', detail && 'lg:col-span-2')}>{body}</div>\n {detail && (\n <aside\n data-slot=\"view-set-detail\"\n className={cn('min-w-0', classNames?.detail)}\n >\n {detail}\n </aside>\n )}\n </div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,258 @@
1
+ import { defaultViewLabels, accentClasses } from './chunk-3YBS4WUQ.js';
2
+ import { Spinner } from './chunk-UA7E7PDS.js';
3
+ import { ChevronRight, ChevronDown } from './chunk-BKSPDTX4.js';
4
+ import { Button } from './chunk-GOALNQZ2.js';
5
+ import { cn } from './chunk-TQONQSJO.js';
6
+ import * as React from 'react';
7
+ import { cva } from 'class-variance-authority';
8
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
+
10
+ var itemVariants = cva(
11
+ [
12
+ "flex w-full items-start gap-3 border-b border-border px-3 text-start",
13
+ "last:border-b-0",
14
+ "transition-colors",
15
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
16
+ ],
17
+ {
18
+ variants: {
19
+ density: {
20
+ comfortable: "py-3",
21
+ compact: "py-2"
22
+ },
23
+ interactive: {
24
+ true: "cursor-pointer hover:bg-muted",
25
+ false: ""
26
+ },
27
+ selected: {
28
+ true: "bg-primary-500/10",
29
+ false: ""
30
+ }
31
+ },
32
+ defaultVariants: {
33
+ density: "comfortable",
34
+ interactive: false,
35
+ selected: false
36
+ }
37
+ }
38
+ );
39
+ function buildGroups(items, groupBy, accessors, ungrouped, stages) {
40
+ if (groupBy === "none") return [{ id: "", label: "", items }];
41
+ const read = groupBy === "status" ? accessors.getStatus : accessors.getGroup;
42
+ if (!read) return [{ id: "", label: "", items }];
43
+ const buckets = /* @__PURE__ */ new Map();
44
+ for (const item of items) {
45
+ const key = read(item) ?? "";
46
+ const bucket = buckets.get(key);
47
+ if (bucket) bucket.push(item);
48
+ else buckets.set(key, [item]);
49
+ }
50
+ const groups = [];
51
+ for (const stage of (groupBy === "status" ? stages : void 0) ?? []) {
52
+ groups.push({
53
+ id: stage.id,
54
+ label: stage.label,
55
+ accent: stage.accent,
56
+ items: buckets.get(stage.id) ?? []
57
+ });
58
+ buckets.delete(stage.id);
59
+ }
60
+ for (const [key, bucket] of buckets) {
61
+ groups.push({ id: key, label: key || ungrouped, items: bucket });
62
+ }
63
+ return groups;
64
+ }
65
+ function ListView({
66
+ items,
67
+ accessors,
68
+ loading = false,
69
+ error = null,
70
+ selectedId = null,
71
+ onOpen,
72
+ getHref,
73
+ renderItem,
74
+ emptyState,
75
+ labels,
76
+ stages,
77
+ groupBy = stages ? "status" : "none",
78
+ defaultCollapsedGroups,
79
+ onRetry,
80
+ density,
81
+ className,
82
+ classNames,
83
+ headingLevel: Heading = "h3"
84
+ }) {
85
+ const text = { ...defaultViewLabels, ...labels };
86
+ const baseId = React.useId();
87
+ const [collapsed, setCollapsed] = React.useState(
88
+ () => new Set(defaultCollapsedGroups ?? [])
89
+ );
90
+ const groups = React.useMemo(
91
+ () => buildGroups(items, groupBy, accessors, text.ungrouped, stages),
92
+ [items, groupBy, accessors, text.ungrouped, stages]
93
+ );
94
+ const state = (content) => /* @__PURE__ */ jsx(
95
+ "div",
96
+ {
97
+ "data-slot": "list-view-state",
98
+ className: cn(
99
+ "text-muted-foreground flex flex-col items-center justify-center gap-2 px-4 py-10 text-center text-sm",
100
+ classNames?.state
101
+ ),
102
+ children: content
103
+ }
104
+ );
105
+ let body;
106
+ if (error) {
107
+ body = state(
108
+ /* @__PURE__ */ jsxs(Fragment, { children: [
109
+ /* @__PURE__ */ jsx("p", { role: "alert", className: "text-destructive", children: text.error }),
110
+ onRetry && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onRetry, children: text.retry })
111
+ ] })
112
+ );
113
+ } else if (loading) {
114
+ body = state(
115
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
116
+ /* @__PURE__ */ jsx(Spinner, { size: "sm", label: text.loading }),
117
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: text.loading })
118
+ ] })
119
+ );
120
+ } else if (items.length === 0) {
121
+ body = emptyState ?? state(text.empty);
122
+ } else {
123
+ body = groups.map((group, groupIndex) => {
124
+ const isCollapsed = collapsed.has(group.id);
125
+ const headerId = `${baseId}-group-${groupIndex}`;
126
+ return /* @__PURE__ */ jsxs(
127
+ "section",
128
+ {
129
+ "data-slot": "list-view-group",
130
+ className: cn(classNames?.group),
131
+ children: [
132
+ group.label && /* @__PURE__ */ jsx(Heading, { className: "sticky top-0 z-10", children: /* @__PURE__ */ jsxs(
133
+ "button",
134
+ {
135
+ type: "button",
136
+ id: headerId,
137
+ "aria-expanded": !isCollapsed,
138
+ onClick: () => setCollapsed((prev) => {
139
+ const next = new Set(prev);
140
+ if (!next.delete(group.id)) next.add(group.id);
141
+ return next;
142
+ }),
143
+ "data-slot": "list-view-group-header",
144
+ className: cn(
145
+ "border-border bg-muted text-muted-foreground flex w-full items-center gap-2 border-b px-3 py-2 text-start text-xs font-semibold tracking-wide uppercase",
146
+ "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset",
147
+ classNames?.groupHeader
148
+ ),
149
+ children: [
150
+ isCollapsed ? /* @__PURE__ */ jsx(
151
+ ChevronRight,
152
+ {
153
+ className: "size-3.5 rtl:rotate-180",
154
+ "aria-hidden": true
155
+ }
156
+ ) : /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5", "aria-hidden": true }),
157
+ group.accent && /* @__PURE__ */ jsx(
158
+ "span",
159
+ {
160
+ "aria-hidden": true,
161
+ className: cn(
162
+ "size-2 shrink-0 rounded-full",
163
+ accentClasses[group.accent].marker
164
+ )
165
+ }
166
+ ),
167
+ /* @__PURE__ */ jsx("span", { children: group.label }),
168
+ /* @__PURE__ */ jsx("span", { className: "ms-auto font-normal tabular-nums", children: group.items.length })
169
+ ]
170
+ }
171
+ ) }),
172
+ !isCollapsed && /* @__PURE__ */ jsxs("ul", { "aria-labelledby": group.label ? headerId : void 0, children: [
173
+ group.items.map((item) => {
174
+ const id = accessors.getId(item);
175
+ const selected = id === selectedId;
176
+ const accent = accessors.getAccent?.(item);
177
+ const subtitle = accessors.getSubtitle?.(item);
178
+ const content = renderItem?.(item, { view: "list" }) ?? /* @__PURE__ */ jsxs(Fragment, { children: [
179
+ accent && /* @__PURE__ */ jsx(
180
+ "span",
181
+ {
182
+ "aria-hidden": true,
183
+ className: cn(
184
+ "mt-1.5 size-2 shrink-0 rounded-full",
185
+ accentClasses[accent].marker
186
+ )
187
+ }
188
+ ),
189
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
190
+ /* @__PURE__ */ jsx("span", { className: "text-foreground block truncate font-medium", children: accessors.getTitle(item) }),
191
+ subtitle && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block truncate text-sm", children: subtitle })
192
+ ] })
193
+ ] });
194
+ const classes = cn(
195
+ itemVariants({
196
+ density,
197
+ interactive: Boolean(onOpen || getHref),
198
+ selected
199
+ }),
200
+ classNames?.item,
201
+ selected && classNames?.selectedItem
202
+ );
203
+ const href = getHref?.(id, item);
204
+ return /* @__PURE__ */ jsx("li", { children: href ? (
205
+ // An anchor, not a handler, so the row is middle-clickable
206
+ // and crawlable; onOpen still runs for router navigation.
207
+ /* @__PURE__ */ jsx(
208
+ "a",
209
+ {
210
+ href,
211
+ "aria-current": selected ? "true" : void 0,
212
+ "data-slot": "list-view-item",
213
+ className: classes,
214
+ onClick: (event) => {
215
+ if (!onOpen || event.defaultPrevented || event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
216
+ return;
217
+ event.preventDefault();
218
+ onOpen(id, item);
219
+ },
220
+ children: content
221
+ }
222
+ )
223
+ ) : onOpen ? /* @__PURE__ */ jsx(
224
+ "button",
225
+ {
226
+ type: "button",
227
+ "aria-current": selected ? "true" : void 0,
228
+ "data-slot": "list-view-item",
229
+ className: classes,
230
+ onClick: () => onOpen(id, item),
231
+ children: content
232
+ }
233
+ ) : /* @__PURE__ */ jsx("div", { "data-slot": "list-view-item", className: classes, children: content }) }, id);
234
+ }),
235
+ group.items.length === 0 && /* @__PURE__ */ jsx("li", { className: "text-muted-foreground px-3 py-2 text-sm", children: text.empty })
236
+ ] })
237
+ ]
238
+ },
239
+ group.id
240
+ );
241
+ });
242
+ }
243
+ return /* @__PURE__ */ jsx(
244
+ "div",
245
+ {
246
+ "data-slot": "list-view",
247
+ className: cn(
248
+ "border-border bg-card overflow-hidden rounded-lg border",
249
+ className
250
+ ),
251
+ children: body
252
+ }
253
+ );
254
+ }
255
+
256
+ export { ListView, itemVariants };
257
+ //# sourceMappingURL=chunk-DZ5HFLRC.js.map
258
+ //# sourceMappingURL=chunk-DZ5HFLRC.js.map