@photon-ai/pho-ui 4.20.1 → 4.22.0

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 (83) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{basic-page-B78a6jpw.js → basic-page-BYA1lkzf.js} +13 -13
  3. package/dist/chunks/basic-page-BYA1lkzf.js.map +1 -0
  4. package/dist/chunks/{chat-Dfbkf7g8.js → chat-j7XEdKEo.js} +48 -48
  5. package/dist/chunks/chat-j7XEdKEo.js.map +1 -0
  6. package/dist/chunks/{checkbox-DpWLbKVS.js → checkbox-D8smFViR.js} +2 -2
  7. package/dist/chunks/{checkbox-DpWLbKVS.js.map → checkbox-D8smFViR.js.map} +1 -1
  8. package/dist/chunks/chrome-Dyvv0FVf.js +14 -0
  9. package/dist/chunks/{chrome-Ds7WykBJ.js.map → chrome-Dyvv0FVf.js.map} +1 -1
  10. package/dist/chunks/{combobox-OQOi5hlB.js → combobox-C_yfFCFL.js} +2 -2
  11. package/dist/chunks/{combobox-OQOi5hlB.js.map → combobox-C_yfFCFL.js.map} +1 -1
  12. package/dist/chunks/{data-table-CAz_8HQw.js → data-table-C1tLUdw0.js} +4 -4
  13. package/dist/chunks/{data-table-CAz_8HQw.js.map → data-table-C1tLUdw0.js.map} +1 -1
  14. package/dist/chunks/{date-picker-vJQrTol9.js → date-picker-D-sWo3i8.js} +2 -2
  15. package/dist/chunks/{date-picker-vJQrTol9.js.map → date-picker-D-sWo3i8.js.map} +1 -1
  16. package/dist/chunks/{description-list-Duhhralt.js → description-list-DcTvBHzI.js} +6 -6
  17. package/dist/chunks/{description-list-Duhhralt.js.map → description-list-DcTvBHzI.js.map} +1 -1
  18. package/dist/chunks/{error-BObcQClz.js → error-BZU9vgnj.js} +2 -2
  19. package/dist/chunks/{error-BObcQClz.js.map → error-BZU9vgnj.js.map} +1 -1
  20. package/dist/chunks/{filter-bar-qqCZf1x4.js → filter-bar-CLLonntH.js} +2 -2
  21. package/dist/chunks/{filter-bar-qqCZf1x4.js.map → filter-bar-CLLonntH.js.map} +1 -1
  22. package/dist/chunks/{menu-CC3fhf83.js → menu-CZSn8JAX.js} +2 -2
  23. package/dist/chunks/{menu-CC3fhf83.js.map → menu-CZSn8JAX.js.map} +1 -1
  24. package/dist/chunks/{popover-B0NBrYV5.js → popover-Dtp9C6Qg.js} +4 -4
  25. package/dist/chunks/{popover-B0NBrYV5.js.map → popover-Dtp9C6Qg.js.map} +1 -1
  26. package/dist/chunks/{select-xhSvDNbw.js → select-Dux2SBVc.js} +2 -2
  27. package/dist/chunks/{select-xhSvDNbw.js.map → select-Dux2SBVc.js.map} +1 -1
  28. package/dist/chunks/{sidebar-DHYyBBUj.js → sidebar-BsBlAVM9.js} +2 -2
  29. package/dist/chunks/sidebar-BsBlAVM9.js.map +1 -0
  30. package/dist/chunks/{stat-VxA1SvS_.js → stat-DUq4roVt.js} +16 -16
  31. package/dist/chunks/{stat-VxA1SvS_.js.map → stat-DUq4roVt.js.map} +1 -1
  32. package/dist/chunks/{toast-B1GAdxXP.js → toast-K549iZEX.js} +2 -2
  33. package/dist/chunks/{toast-B1GAdxXP.js.map → toast-K549iZEX.js.map} +1 -1
  34. package/dist/chunks/{trace-D9F0sne7.js → trace-5Rh1ade9.js} +2 -2
  35. package/dist/chunks/{trace-D9F0sne7.js.map → trace-5Rh1ade9.js.map} +1 -1
  36. package/dist/components/accordion.js +1 -1
  37. package/dist/components/accordion.js.map +1 -1
  38. package/dist/components/autocomplete.js +5 -5
  39. package/dist/components/autocomplete.js.map +1 -1
  40. package/dist/components/chat.js +1 -1
  41. package/dist/components/checkbox.js +1 -1
  42. package/dist/components/combobox.js +1 -1
  43. package/dist/components/context-menu.js +5 -5
  44. package/dist/components/context-menu.js.map +1 -1
  45. package/dist/components/data-table.js +2 -2
  46. package/dist/components/date-picker.js +1 -1
  47. package/dist/components/description-list.js +1 -1
  48. package/dist/components/error.js +1 -1
  49. package/dist/components/field.js +1 -1
  50. package/dist/components/field.js.map +1 -1
  51. package/dist/components/fieldset.js +5 -5
  52. package/dist/components/fieldset.js.map +1 -1
  53. package/dist/components/filter-bar.js +1 -1
  54. package/dist/components/menu.js +1 -1
  55. package/dist/components/meter.js +12 -12
  56. package/dist/components/meter.js.map +1 -1
  57. package/dist/components/notification.js +1 -1
  58. package/dist/components/notification.js.map +1 -1
  59. package/dist/components/phone-input.js +1 -1
  60. package/dist/components/popover.js +1 -1
  61. package/dist/components/progress.js +16 -16
  62. package/dist/components/progress.js.map +1 -1
  63. package/dist/components/radio-group.js +1 -1
  64. package/dist/components/radio-group.js.map +1 -1
  65. package/dist/components/scope.js +2 -2
  66. package/dist/components/select.js +1 -1
  67. package/dist/components/slider.js +16 -16
  68. package/dist/components/slider.js.map +1 -1
  69. package/dist/components/stat.js +1 -1
  70. package/dist/components/toast.js +1 -1
  71. package/dist/components/trace.js +1 -1
  72. package/dist/index.js +10 -10
  73. package/dist/sections/basic-page.js +2 -2
  74. package/dist/sections/sidebar.js +1 -1
  75. package/dist/src/components/data-table/chrome.d.ts +1 -1
  76. package/dist/src/sections/sidebar/sidebar.d.ts +7 -2
  77. package/package.json +1 -1
  78. package/src/styles/fonts.css +50 -11
  79. package/src/styles/theme.css +9 -7
  80. package/dist/chunks/basic-page-B78a6jpw.js.map +0 -1
  81. package/dist/chunks/chat-Dfbkf7g8.js.map +0 -1
  82. package/dist/chunks/chrome-Ds7WykBJ.js +0 -14
  83. package/dist/chunks/sidebar-DHYyBBUj.js.map +0 -1
@@ -91,7 +91,7 @@ function A({ className: e, ...r }) {
91
91
  }
92
92
  function L({ className: e, ...r }) {
93
93
  return /* @__PURE__ */ o(t.GroupLabel, {
94
- className: n("text-pho-secondary px-2.5 py-1.5 text-xs font-medium", e),
94
+ className: n("text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium", e),
95
95
  ...r
96
96
  });
97
97
  }
@@ -139,4 +139,4 @@ export {
139
139
  F as t
140
140
  };
141
141
 
142
- //# sourceMappingURL=combobox-OQOi5hlB.js.map
142
+ //# sourceMappingURL=combobox-C_yfFCFL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-OQOi5hlB.js","names":["BaseCombobox","Combobox","cn","usePressPulse","usePopupAnchor","usePopupAnchorTrigger","PopupAnchorProvider","jsx","motion","Combobox","Root","props","Value","Portal","Group","Collection","InputGroup","className","Input","variant","Clear","Trigger","disabled","motionProps","anchorRef","Icon","Positioner","sideOffset","anchor","triggerAnchor","Popup","List","Empty","Item","ItemIndicator","GroupLabel","Chips","Chip","ChipRemove","Combobox$1"],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport {\n PopupAnchorProvider,\n usePopupAnchor,\n usePopupAnchorTrigger,\n} from \"../../utils/popup-anchor\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n// Holds the field trigger the popup anchors to; Base UI's own generic\n// signature is kept.\nconst Root = ((props: ComponentProps<typeof BaseCombobox.Root>) => (\n <PopupAnchorProvider>\n <BaseCombobox.Root {...props} />\n </PopupAnchorProvider>\n)) as typeof BaseCombobox.Root;\nconst Value = BaseCombobox.Value;\nconst Portal = BaseCombobox.Portal;\nconst Group = BaseCombobox.Group;\nconst Collection = BaseCombobox.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.InputGroup>) {\n return (\n <BaseCombobox.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nexport type ComboboxInputVariant = \"field\" | \"popup\";\n\nfunction Input({\n className,\n variant = \"field\",\n ...props\n}: StyledProps<typeof BaseCombobox.Input> & {\n /**\n * `field` (default) is the boxed control a list filters under. `popup`\n * is the search line at the top of the popup when a field `Trigger`\n * stands in for the input: borderless, a hairline below, spanning the\n * popup's width.\n * @default \"field\"\n */\n variant?: ComboboxInputVariant;\n}) {\n return (\n <BaseCombobox.Input\n className={cn(\n variant === \"popup\"\n ? \"border-pho-secondary text-pho-primary placeholder:text-pho-placeholder -mx-1 -mt-1 mb-1 w-[calc(100%+0.5rem)] border-b bg-transparent px-3 py-2 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n : // text-md on small viewports — iOS zooms into fields under 16px.\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Clear({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Clear>) {\n return (\n <BaseCombobox.Clear\n className={cn(\n \"combobox-clear text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type ComboboxTriggerVariant = \"icon\" | \"field\";\n\nfunction Trigger({\n className,\n variant = \"icon\",\n disabled,\n ...props\n}: StyledProps<typeof BaseCombobox.Trigger> & {\n /**\n * `icon` (default) is the small button beside the input in an\n * `InputGroup`. `field` is the whole control: `Select`'s trigger chrome\n * around a `Combobox.Value` and a `Combobox.Icon`, for a searchable\n * select whose `Input` then lives inside the popup (`variant=\"popup\"`).\n * @default \"icon\"\n */\n variant?: ComboboxTriggerVariant;\n}) {\n // The field pulses on press the way Select's trigger does.\n const { motionProps } = usePressPulse({\n scale: 0.98,\n disabled: Boolean(disabled),\n });\n // As on Select: the popup anchors to the field's laid-out box, so the\n // pulse doesn't resize the popup it opens.\n const anchorRef = usePopupAnchorTrigger();\n if (variant === \"field\") {\n return (\n <BaseCombobox.Trigger\n disabled={disabled}\n render={<motion.button ref={anchorRef} {...motionProps} />}\n className={cn(\n // Select's flat field surface, so a searchable select stands in\n // a form beside a Select and no one can tell them apart at rest.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 select-none ring-inset\",\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out focus-visible:outline-none\",\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n \"data-[placeholder]:text-pho-placeholder\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n }\n return (\n <BaseCombobox.Trigger\n disabled={disabled}\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The glyph at a field trigger's end, `IconSelector` as on `Select`. */\nfunction Icon({ className, ...props }: StyledProps<typeof BaseCombobox.Icon>) {\n return (\n <BaseCombobox.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n anchor,\n ...props\n}: StyledProps<typeof BaseCombobox.Positioner>) {\n const triggerAnchor = usePopupAnchor();\n return (\n <BaseCombobox.Positioner\n anchor={anchor ?? triggerAnchor}\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Popup>) {\n return (\n <BaseCombobox.Popup\n className={cn(\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction List({ className, ...props }: StyledProps<typeof BaseCombobox.List>) {\n return (\n <BaseCombobox.List\n className={cn(\n \"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Empty({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Empty>) {\n return (\n <BaseCombobox.Empty\n className={cn(\n \"text-pho-description px-2.5 py-6 text-center text-base empty:m-0 empty:p-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseCombobox.Item>) {\n return (\n <BaseCombobox.Item\n className={cn(\n // The selection mark has a seat of its own at the left (see\n // `ItemIndicator`), reserved by padding rather than a grid column:\n // Base UI mounts the indicator only while the item is selected, and\n // free-form children (a text node, a label with spaces) must not\n // slide into that seat and wrap there when it is empty.\n \"text-pho-secondary relative flex cursor-pointer items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-8 text-base outline-none select-none\",\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ItemIndicator>) {\n return (\n <BaseCombobox.ItemIndicator\n className={cn(\n \"text-pho-brand absolute top-1/2 left-2 flex -translate-y-1/2 items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.GroupLabel>) {\n return (\n <BaseCombobox.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chips({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Chips>) {\n return (\n <BaseCombobox.Chips\n className={cn(\n \"bg-pho-primary ring-pho-primary focus-within:ring-pho-brand rounded-base flex flex-wrap items-center gap-1.5 p-1.5 ring-1 ring-inset focus-within:ring-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chip({ className, ...props }: StyledProps<typeof BaseCombobox.Chip>) {\n return (\n <BaseCombobox.Chip\n className={cn(\n // Keyboard-highlighted chip flips to the inverse chip surface.\n \"bg-pho-secondary text-pho-secondary data-[highlighted]:bg-pho-inverse data-[highlighted]:text-pho-inverse flex items-center gap-1 rounded-sm py-0.5 pr-1 pl-2 text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ChipRemove({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ChipRemove>) {\n return (\n <BaseCombobox.ChipRemove\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover in-data-[highlighted]:text-pho-inverse flex cursor-pointer items-center rounded-sm [&>svg]:size-3.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Combobox built on Base UI `Combobox` — a text input that filters a list as\n * you type and commits to a value from it. Pass `items` to `Combobox.Root`;\n * `Combobox.List` takes a render function mapping each (filtered) item to a\n * `Combobox.Item`. Add `Combobox.Chips` for multi-select. For a searchable\n * select, `Combobox.Trigger variant=\"field\"` holds the `Value` and an\n * `Icon`, and the `Input` (`variant=\"popup\"`) moves inside the popup. For\n * free-form text with suggestions, use `Autocomplete`; for a small fixed\n * set, use `Select`.\n */\nexport const Combobox = {\n Root,\n Value,\n InputGroup,\n Input,\n Trigger,\n Icon,\n Clear,\n Portal,\n Positioner,\n Popup,\n List,\n Collection,\n Empty,\n Item,\n ItemIndicator,\n Group,\n GroupLabel,\n Chips,\n Chip,\n ChipRemove,\n};\n"],"mappings":";;;;;;;;AAqBA,IAAMU,KAAA,CAASC,MACb,gBAAAJ,EAACD,GAAD,EAAA,UACE,gBAAAC,EAACP,EAAa,MAAd,EAAmB,GAAIW,EAAQ,CAAA,EACZ,CAAA,IAEj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+ {"version":3,"file":"combobox-C_yfFCFL.js","names":["BaseCombobox","Combobox","cn","usePressPulse","usePopupAnchor","usePopupAnchorTrigger","PopupAnchorProvider","jsx","motion","Combobox","Root","props","Value","Portal","Group","Collection","InputGroup","className","Input","variant","Clear","Trigger","disabled","motionProps","anchorRef","Icon","Positioner","sideOffset","anchor","triggerAnchor","Popup","List","Empty","Item","ItemIndicator","GroupLabel","Chips","Chip","ChipRemove","Combobox$1"],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport {\n PopupAnchorProvider,\n usePopupAnchor,\n usePopupAnchorTrigger,\n} from \"../../utils/popup-anchor\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n// Holds the field trigger the popup anchors to; Base UI's own generic\n// signature is kept.\nconst Root = ((props: ComponentProps<typeof BaseCombobox.Root>) => (\n <PopupAnchorProvider>\n <BaseCombobox.Root {...props} />\n </PopupAnchorProvider>\n)) as typeof BaseCombobox.Root;\nconst Value = BaseCombobox.Value;\nconst Portal = BaseCombobox.Portal;\nconst Group = BaseCombobox.Group;\nconst Collection = BaseCombobox.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.InputGroup>) {\n return (\n <BaseCombobox.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nexport type ComboboxInputVariant = \"field\" | \"popup\";\n\nfunction Input({\n className,\n variant = \"field\",\n ...props\n}: StyledProps<typeof BaseCombobox.Input> & {\n /**\n * `field` (default) is the boxed control a list filters under. `popup`\n * is the search line at the top of the popup when a field `Trigger`\n * stands in for the input: borderless, a hairline below, spanning the\n * popup's width.\n * @default \"field\"\n */\n variant?: ComboboxInputVariant;\n}) {\n return (\n <BaseCombobox.Input\n className={cn(\n variant === \"popup\"\n ? \"border-pho-secondary text-pho-primary placeholder:text-pho-placeholder -mx-1 -mt-1 mb-1 w-[calc(100%+0.5rem)] border-b bg-transparent px-3 py-2 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n : // text-md on small viewports — iOS zooms into fields under 16px.\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Clear({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Clear>) {\n return (\n <BaseCombobox.Clear\n className={cn(\n \"combobox-clear text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type ComboboxTriggerVariant = \"icon\" | \"field\";\n\nfunction Trigger({\n className,\n variant = \"icon\",\n disabled,\n ...props\n}: StyledProps<typeof BaseCombobox.Trigger> & {\n /**\n * `icon` (default) is the small button beside the input in an\n * `InputGroup`. `field` is the whole control: `Select`'s trigger chrome\n * around a `Combobox.Value` and a `Combobox.Icon`, for a searchable\n * select whose `Input` then lives inside the popup (`variant=\"popup\"`).\n * @default \"icon\"\n */\n variant?: ComboboxTriggerVariant;\n}) {\n // The field pulses on press the way Select's trigger does.\n const { motionProps } = usePressPulse({\n scale: 0.98,\n disabled: Boolean(disabled),\n });\n // As on Select: the popup anchors to the field's laid-out box, so the\n // pulse doesn't resize the popup it opens.\n const anchorRef = usePopupAnchorTrigger();\n if (variant === \"field\") {\n return (\n <BaseCombobox.Trigger\n disabled={disabled}\n render={<motion.button ref={anchorRef} {...motionProps} />}\n className={cn(\n // Select's flat field surface, so a searchable select stands in\n // a form beside a Select and no one can tell them apart at rest.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 select-none ring-inset\",\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out focus-visible:outline-none\",\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n \"data-[placeholder]:text-pho-placeholder\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n }\n return (\n <BaseCombobox.Trigger\n disabled={disabled}\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The glyph at a field trigger's end, `IconSelector` as on `Select`. */\nfunction Icon({ className, ...props }: StyledProps<typeof BaseCombobox.Icon>) {\n return (\n <BaseCombobox.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n anchor,\n ...props\n}: StyledProps<typeof BaseCombobox.Positioner>) {\n const triggerAnchor = usePopupAnchor();\n return (\n <BaseCombobox.Positioner\n anchor={anchor ?? triggerAnchor}\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Popup>) {\n return (\n <BaseCombobox.Popup\n className={cn(\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction List({ className, ...props }: StyledProps<typeof BaseCombobox.List>) {\n return (\n <BaseCombobox.List\n className={cn(\n \"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Empty({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Empty>) {\n return (\n <BaseCombobox.Empty\n className={cn(\n \"text-pho-description px-2.5 py-6 text-center text-base empty:m-0 empty:p-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseCombobox.Item>) {\n return (\n <BaseCombobox.Item\n className={cn(\n // The selection mark has a seat of its own at the left (see\n // `ItemIndicator`), reserved by padding rather than a grid column:\n // Base UI mounts the indicator only while the item is selected, and\n // free-form children (a text node, a label with spaces) must not\n // slide into that seat and wrap there when it is empty.\n \"text-pho-secondary relative flex cursor-pointer items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-8 text-base outline-none select-none\",\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ItemIndicator>) {\n return (\n <BaseCombobox.ItemIndicator\n className={cn(\n \"text-pho-brand absolute top-1/2 left-2 flex -translate-y-1/2 items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.GroupLabel>) {\n return (\n <BaseCombobox.GroupLabel\n className={cn(\n \"text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chips({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Chips>) {\n return (\n <BaseCombobox.Chips\n className={cn(\n \"bg-pho-primary ring-pho-primary focus-within:ring-pho-brand rounded-base flex flex-wrap items-center gap-1.5 p-1.5 ring-1 ring-inset focus-within:ring-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chip({ className, ...props }: StyledProps<typeof BaseCombobox.Chip>) {\n return (\n <BaseCombobox.Chip\n className={cn(\n // Keyboard-highlighted chip flips to the inverse chip surface.\n \"bg-pho-secondary text-pho-secondary data-[highlighted]:bg-pho-inverse data-[highlighted]:text-pho-inverse flex items-center gap-1 rounded-sm py-0.5 pr-1 pl-2 text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ChipRemove({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ChipRemove>) {\n return (\n <BaseCombobox.ChipRemove\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover in-data-[highlighted]:text-pho-inverse flex cursor-pointer items-center rounded-sm [&>svg]:size-3.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Combobox built on Base UI `Combobox` — a text input that filters a list as\n * you type and commits to a value from it. Pass `items` to `Combobox.Root`;\n * `Combobox.List` takes a render function mapping each (filtered) item to a\n * `Combobox.Item`. Add `Combobox.Chips` for multi-select. For a searchable\n * select, `Combobox.Trigger variant=\"field\"` holds the `Value` and an\n * `Icon`, and the `Input` (`variant=\"popup\"`) moves inside the popup. For\n * free-form text with suggestions, use `Autocomplete`; for a small fixed\n * set, use `Select`.\n */\nexport const Combobox = {\n Root,\n Value,\n InputGroup,\n Input,\n Trigger,\n Icon,\n Clear,\n Portal,\n Positioner,\n Popup,\n List,\n Collection,\n Empty,\n Item,\n ItemIndicator,\n Group,\n GroupLabel,\n Chips,\n Chip,\n ChipRemove,\n};\n"],"mappings":";;;;;;;;AAqBA,IAAMU,KAAA,CAASC,MACb,gBAAAJ,EAACD,GAAD,EAAA,UACE,gBAAAC,EAACP,EAAa,MAAd,EAAmB,GAAIW,EAAQ,CAAA,EACZ,CAAA,IAEjBC,IAAQZ,EAAa,OACrBa,IAASb,EAAa,QACtBc,IAAQd,EAAa,OACrBe,IAAaf,EAA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,WAAWE,EACT,4FACAe,CACF;AAAA,IACA,GAAIN;AAAA,EACL,CAAA;AAEL;AAEA,SAASwB,EAAW,EAClB,WAAAlB,GACA,GAAGN,EAAA,GAC2C;AAC9C,SACE,gBAAAJ,EAACP,EAAa,YAAd;AAAA,IACE,WAAWE,EACT,qEACAe,CACF;AAAA,IACA,GAAIN;AAAA,EACL,CAAA;AAEL;AAEA,SAASyB,EAAM,EACb,WAAAnB,GACA,GAAGN,EAAA,GACsC;AACzC,SACE,gBAAAJ,EAACP,EAAa,OAAd;AAAA,IACE,WAAWE,EACT,4JACAe,CACF;AAAA,IACA,GAAIN;AAAA,EACL,CAAA;AAEL;AAEA,SAAS0B,EAAK,EAAE,WAAApB,GAAW,GAAGN,EAAA,GAAgD;AAC5E,SACE,gBAAAJ,EAACP,EAAa,MAAd;AAAA,IACE,WAAWE,EAET,2KACAe,CACF;AAAA,IACA,GAAIN;AAAA,EACL,CAAA;AAEL;AAEA,SAAS2B,EAAW,EAClB,WAAArB,GACA,GAAGN,EAAA,GAC2C;AAC9C,SACE,gBAAAJ,EAACP,EAAa,YAAd;AAAA,IACE,WAAWE,EACT,yJACAe,CACF;AAAA,IACA,GAAIN;AAAA,EACL,CAAA;AAEL;AAYA,IAAaV,IAAW;AAAA,EACtB,MAAAS;AAAA,EACA,OAAAE;AAAA,EACA,YAAAI;AAAA,EACA,OAAAE;AAAA,EACA,SAAAG;AAAA,EACA,MAAAI;AAAA,EACA,OAAAL;AAAA,EACA,QAAAP;AAAA,EACA,YAAAa;AAAA,EACA,OAAAI;AAAA,EACA,MAAAC;AAAA,EACA,YAAAhB;AAAA,EACA,OAAAiB;AAAA,EACA,MAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAApB;AAAA,EACA,YAAAqB;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC;AACF"}
@@ -7,9 +7,9 @@ import { t as Se } from "./createReactComponent-yKZn9MIX.js";
7
7
  import { t as ye } from "./IconChevronDown-Cd68NnX2.js";
8
8
  import { t as we } from "./IconChevronUp-Bxllwz8J.js";
9
9
  import { t as Ce } from "./animated-height-zr7BmFY1.js";
10
- import { r as W } from "./checkbox-DpWLbKVS.js";
10
+ import { r as W } from "./checkbox-D8smFViR.js";
11
11
  import { t as ve } from "./skeleton-CqZlGphn.js";
12
- import { i as X, n as Ne, r as Ae, t as Fe } from "./chrome-Ds7WykBJ.js";
12
+ import { i as X, n as Ne, r as Ae, t as Fe } from "./chrome-Dyvv0FVf.js";
13
13
  import { t as Te } from "./ghost-search-CMUI2UH0.js";
14
14
  import { Fragment as _e, createContext as ee, useContext as Y, useEffect as Ee, useLayoutEffect as Z, useMemo as Re, useState as L, useSyncExternalStore as De } from "react";
15
15
  import { Fragment as $, jsx as o, jsxs as h } from "react/jsx-runtime";
@@ -250,7 +250,7 @@ function Ct({ columns: t, data: s, getRowId: i, rowHref: c, onRowClick: f, curre
250
250
  "data-table-group": "",
251
251
  children: /* @__PURE__ */ o("td", {
252
252
  colSpan: G,
253
- className: "bg-pho-page text-pho-description h-9 px-5 align-middle text-xs font-medium",
253
+ className: "bg-pho-page text-pho-description font-heading h-9 px-5 align-middle text-xs font-medium",
254
254
  children: n
255
255
  })
256
256
  }), e.map(q)] }, n))] })
@@ -291,4 +291,4 @@ export {
291
291
  Ct as t
292
292
  };
293
293
 
294
- //# sourceMappingURL=data-table-CAz_8HQw.js.map
294
+ //# sourceMappingURL=data-table-C1tLUdw0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-CAz_8HQw.js","names":["_Fragment","cn","resolveVariant","useLinkComponent","SPRING_ENTRANCE","createReactComponent","IconChevronDown","IconChevronUp","AnimatedHeight","Checkbox","Skeleton","DATA_TABLE_TEXT","DATA_TABLE_HEADER_CELL","DATA_TABLE_SURFACE","DATA_TABLE_BODY","GhostSearch","Fragment","createContext","useContext","useEffect","useLayoutEffect","useMemo","useState","useSyncExternalStore","Fragment$1","jsx","jsxs","FlexRender","columnFilteringFeature","createColumnHelper","createFilteredRowModel","createSortedRowModel","filterFn_includesString","globalFilteringFeature","rowSelectionFeature","rowSortingFeature","sortFn_alphanumeric","sortFn_basic","sortFn_datetime","sortFn_text","tableFeatures","useTable","__iconNode","IconSelector","features","DATA_TABLE_SIZES","createColumns","SELECT_COLUMN","table","visible","chosen","row","all","checked","old","next","TableHostContext","createTableSearchStore","state","listeners","emit","listener","api","adopted","TableSearchContext","subscribeToNothing","DEFAULT_BONES","defaultRowId","index","id","ROW_NAV_IGNORE","shouldIgnoreRowNav","target","activateRowHref","event","href","newTab","DataTable","columns","data","getRowId","rowHref","onRowClick","current","selected","onSelectedChange","defaultSort","sort","onSortChange","search","toolbar","group","animateHeight","loading","empty","layout","size","className","props","fixed","rowSize","rowText","Link","announce","searching","query","setQuery","placeholder","searchStore","selecting","ownSelection","setOwnSelection","rowSelection","ownSort","setOwnSort","sorting","updater","rows","total","matched","leafCount","bones","renderRow","isCurrent","navigable","onActivate","onRowKeyDown","cell","align","mainRows","groupSections","byLabel","order","item","label","sectionRows","grid","headerGroup","header","sorted","sortable","SortIndicator","_","column"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs","../../src/components/data-table/data-table.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M8 9l4 -4l4 4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M16 15l-4 4l-4 -4\", \"key\": \"svg-1\" }]];\nconst IconSelector = createReactComponent(\"outline\", \"selector\", \"Selector\", __iconNode);\n\nexport { __iconNode, IconSelector as default };\n","import {\n createContext,\n Fragment,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n useSyncExternalStore,\n type ComponentProps,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n columnFilteringFeature,\n createColumnHelper,\n createFilteredRowModel,\n createSortedRowModel,\n filterFn_includesString,\n FlexRender,\n globalFilteringFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n type ColumnDef,\n type RowData,\n type SortingState,\n} from \"@tanstack/react-table\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconSelector,\n} from \"@tabler/icons-react\";\nimport { Skeleton } from \"../skeleton\";\nimport {\n DATA_TABLE_BODY,\n DATA_TABLE_HEADER_CELL,\n DATA_TABLE_SURFACE,\n DATA_TABLE_TEXT,\n} from \"./chrome\";\nimport { Checkbox } from \"../checkbox\";\nimport { SPRING_ENTRANCE } from \"../../motion\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * DataTable — a table of records with column semantics: sortable headers,\n * aligned cells, rows that are links into a subpage. TanStack Table (v9)\n * does the thinking — column defs, sorting, row identity — and renders\n * nothing; every pixel here is Pho's.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius, the\n * page's primary fill, hairline rules between rows. A table is a card of\n * rows that happen to line up in columns, so it sits in a page's `Stack`\n * as any card does.\n * - Header cells are description ink at body size — never small caps, never\n * bold. Hierarchy comes from ink alone; the header is a label row, not a\n * banner.\n * - A sortable header is a button inside the cell: the label and its\n * indicator (`IconSelector` at rest, a chevron once sorted). `aria-sort`\n * sits on the `th`.\n * - Rows that navigate stretch one link across the row (the first cell's\n * link, extended with a pseudo-element), so the whole row is one target\n * for pointer and one stop for keyboard. Hover washes the row; the row\n * whose page is open beside the table (`current`) keeps the wash — the\n * same cue `BasicPage.RowLink` gives under `aria-current`.\n * - Numbers align to the end with tabular figures (`meta.align: \"end\"`).\n * - `search` is one box over every column — plain contains matching, and\n * the body says when nothing matches. In a page, `BasicPage.Search` in\n * the section header adopts the box; alone, the table keeps one in a\n * toolbar row inside its frame. Server-side search keeps its own box\n * outside.\n * - A wide table scrolls sideways inside its own frame; the page never does.\n * `contain: inline-size` keeps the table's intrinsic width out of the\n * page's — a host that sizes to content (a scroll area's fit-content\n * pane, a grid's auto column) would otherwise grow to the widest row.\n * Left with no width of its own, the frame takes its container's\n * (`w-full`); a shrink-to-fit host (a flex row) would collapse it.\n * `layout=\"fixed\"` is the other way out: columns size from the frame,\n * and a long cell truncates instead of stretching the table.\n *\n * Reach for it when a list needs column semantics — sorting, aligned\n * figures, several fields side by side. A list where each row is one\n * label and a chevron stays `BasicPage.RowLink`.\n */\n\n/** Column metadata a `DataTable` understands. */\nexport interface DataTableColumnMeta {\n /** Cell alignment — `end` for figures (right-aligned, tabular). */\n align?: \"start\" | \"end\";\n /**\n * Extra classes on every `th` and `td` in this column. With\n * `layout=\"fixed\"`, size a short column here (`w-24`) and leave the\n * flexible ones unsaid — they share what remains. Prefer this over\n * `nth-child` width hacks on the table's `className`.\n */\n className?: string;\n}\n\n/**\n * The feature set every `DataTable` runs on — sorting with the stock sort\n * functions, the column meta above. Fixed, so column definitions written\n * once fit every table.\n */\nconst features = tableFeatures({\n rowSortingFeature,\n rowSelectionFeature,\n columnFilteringFeature,\n globalFilteringFeature,\n sortedRowModel: createSortedRowModel(),\n filteredRowModel: createFilteredRowModel(),\n filterFns: { includesString: filterFn_includesString },\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n columnMeta: {} as DataTableColumnMeta,\n});\n\nexport type DataTableFeatures = typeof features;\n\n/** Body row height — the header keeps its own `h-10` on every size. */\nexport const DATA_TABLE_SIZES = {\n sm: {\n classes: \"h-10\",\n description: \"Small — 40px at 13px; the header's height, for dense lists\",\n },\n base: {\n classes: \"h-12\",\n description: \"Base — 48px at 14px; one line of body type\",\n },\n lg: {\n classes: \"h-14\",\n description:\n \"Large — 56px at 16px; two-line cells (a number and a caption)\",\n },\n} satisfies VariantMap;\n\nexport type DataTableSize = keyof typeof DATA_TABLE_SIZES;\n\n/** A column definition for a `DataTable` of `TData` rows. */\nexport type DataTableColumn<\n TData extends RowData,\n TValue = unknown,\n> = ColumnDef<DataTableFeatures, TData, TValue>;\n\n/**\n * The column helper, bound to the table's feature set — `accessor`,\n * `display`, `group`, and `columns` to collect them with their types\n * intact.\n *\n * @example\n * const col = createColumns<Request>();\n * const columns = col.columns([\n * col.accessor(\"actor\", { header: \"Actor\" }),\n * col.accessor(\"amount\", { header: \"Amount\", meta: { align: \"end\" } }),\n * ]);\n */\nexport function createColumns<TData extends RowData>() {\n return createColumnHelper<DataTableFeatures, TData>();\n}\n\n/**\n * The leading checkbox column selection adds. The header checkbox works\n * the visible set: everything the search still shows toggles together,\n * while rows selected earlier and then hidden stay selected.\n */\nconst SELECT_COLUMN = createColumns<RowData>().display({\n id: \"select\",\n enableSorting: false,\n header: ({ table }) => {\n const visible = table.getRowModel().rows;\n const chosen = visible.filter((row) => row.getIsSelected()).length;\n const all = visible.length > 0 && chosen === visible.length;\n return (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select all\"\n checked={all}\n indeterminate={chosen > 0 && !all}\n onCheckedChange={(checked) => {\n table.setRowSelection((old) => {\n const next = { ...old };\n for (const row of visible) {\n if (checked === true) next[row.id] = true;\n else delete next[row.id];\n }\n return next;\n });\n }}\n />\n );\n },\n cell: ({ row }) => (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n ),\n});\n\nexport interface DataTableProps<TData extends RowData> extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n columns: ReadonlyArray<DataTableColumn<TData, any>>;\n data: ReadonlyArray<TData>;\n /**\n * A row's identity — what `current` is matched against, and what keeps a\n * row itself across sorts. Defaults to the row's `id` field, else its\n * index.\n */\n getRowId?: (row: TData) => string;\n /**\n * Rows that navigate: each row is one link into a subpage, through the\n * host's `LinkProvider`. Beside a `BasicPage.Aside`, the subpage opens\n * next to the table. Return nothing for a row with no page yet (one\n * still in flight) and that row stays plain.\n */\n rowHref?: (row: TData) => string | null | undefined;\n /**\n * A click on the row (not on a link, button, or other control). The\n * table still activates `rowHref` unless the handler calls\n * `preventDefault`.\n */\n onRowClick?: (\n row: TData,\n event: MouseEvent<HTMLTableRowElement> | KeyboardEvent<HTMLTableRowElement>,\n ) => void;\n /** The row whose page is open (its id) — it keeps the wash. */\n current?: string | null;\n /**\n * Sorting is on for every accessor column (`enableSorting: false` on a\n * column turns it off there). Uncontrolled by default; `defaultSort`\n * seeds it. Pass `sort` with `onSortChange` to own it — the way to sort\n * on the server.\n */\n defaultSort?: SortingState;\n sort?: SortingState;\n onSortChange?: (sort: SortingState) => void;\n /**\n * A search box on the table — `true`, or the placeholder it should\n * show. One box searches every column (a column opts out with\n * `enableGlobalFilter: false`); matching is a plain case-insensitive\n * contains, on the client. With no matches the body says so. When the\n * list doesn't all come down, keep the box outside and ask the server.\n */\n search?: boolean | string;\n /**\n * Controls in the frame's top band — a `BasicPage.Search` first, then a\n * filter or two. The band is part of the table (one surface, a hairline\n * above the header row), so nothing floats over the page and the\n * spacing above and below is the frame's own. A `Search` here adopts\n * the table's box the way a header one does.\n */\n toolbar?: ReactNode;\n /**\n * Row selection: hand either of these and rows grow a leading checkbox\n * column. The header checkbox works the visible set — everything the\n * search still shows — so select-all after a search means what it says;\n * rows selected earlier and then hidden stay selected. `selected` is\n * the selected ids (ids come from `getRowId`; pair with\n * `onSelectedChange` to own the state); `onSelectedChange` alone\n * listens while the table keeps it. The page renders its own bulk\n * actions from the ids — the table only keeps the score.\n */\n selected?: readonly string[];\n onSelectedChange?: (ids: string[]) => void;\n /**\n * File rows into labeled groups: return a label and the row renders\n * under it, `null` and it stays in the main body. Groups follow the\n * main body, in the order their labels first appear in `data`, each\n * under a quiet label row — and only while they have rows, so a group\n * a search empties simply leaves. Sorting orders rows within their\n * group.\n */\n group?: (row: TData) => string | null;\n /**\n * Glide the frame's height when the rows change — a search narrowing,\n * a filter, bones becoming rows. The height follows the content on the\n * page spring instead of jumping; reserve it for tables whose rows\n * change while mounted (same contract as `BasicPage.Card`'s).\n */\n animateHeight?: boolean;\n /** Bones while the rows are on their way — `true` for five, or a count. */\n loading?: boolean | number;\n /** What the body says when there are no rows. */\n empty?: ReactNode;\n /**\n * How columns take width. `auto` (the default) sizes them from their\n * content — a long cell grows the table and the frame scrolls sideways.\n * `fixed` sizes them from the table's width (`table-layout: fixed`):\n * short columns take a width hint on `meta.className`, the rest share\n * what remains, and cells get `min-w-0` so an inner `truncate` can\n * shrink. `width: 0` (`w-0`) is not a content-size hint here — fixed\n * layout treats it as a real zero — so give a short column a real\n * width (`w-24`) rather than the auto-layout shrink-wrap trick.\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * Body row height and the type that comes with it. `base` (the default)\n * is 48px rows at 14px — one line of body type. `sm` is 40px at 13px,\n * the header's own height, for a dense list scanned more than read.\n * `lg` is 56px at 16px, for a two-line cell (a number and a caption)\n * that would crowd `base`. The header row keeps its 40px on every size\n * and follows the type.\n */\n size?: DataTableSize;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A host that sizes itself around tables provides this; each table\n * announces itself while mounted. `BasicPage.Root` runs wide when the\n * page carries one and `width` was left unsaid.\n */\nexport const TableHostContext = createContext<\n ((present: boolean) => void) | null\n>(null);\n\n/** A searchable table's search, published for a header to adopt. */\nexport interface TableSearchApi {\n placeholder: string;\n query: string;\n setQuery: (query: string) => void;\n /** Rows still showing after the current query. */\n matched: number;\n /** Rows in the list, before search. */\n total: number;\n}\n\ninterface TableSearchState {\n api: TableSearchApi | null;\n adopted: boolean;\n}\n\n/**\n * The channel between a searchable table and a `BasicPage.Search` placed\n * in a section header: the table publishes its search (placeholder,\n * query, the setter); a mounted `Search` adopts it, and the table's own\n * box yields. Provided by `BasicPage.Root`; a table outside any page\n * keeps its built-in box. One searchable table per page — a later\n * publisher takes the slot.\n */\nexport interface TableSearchStore {\n get: () => TableSearchState;\n subscribe: (listener: () => void) => () => void;\n publish: (api: TableSearchApi | null) => void;\n adopt: (adopted: boolean) => void;\n}\n\nexport function createTableSearchStore(): TableSearchStore {\n let state: TableSearchState = { api: null, adopted: false };\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n return {\n get: () => state,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n publish(api) {\n state = { ...state, api };\n emit();\n },\n adopt(adopted) {\n state = { ...state, adopted };\n emit();\n },\n };\n}\n\nexport const TableSearchContext = createContext<TableSearchStore | null>(null);\n\nconst subscribeToNothing = () => () => {};\n\nexport { GhostSearch, type GhostSearchProps } from \"../../utils/ghost-search\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\nconst DEFAULT_BONES = 5;\n\nfunction defaultRowId(row: unknown, index: number): string {\n const id = (row as { id?: unknown } | null)?.id;\n return typeof id === \"string\" || typeof id === \"number\"\n ? String(id)\n : String(index);\n}\n\n/** Controls keep their own click; the row only navigates from empty surface. */\n// A copy view (CopyButton's children) is the copy, not the row's link.\nconst ROW_NAV_IGNORE =\n \"a, button, input, textarea, select, label, [data-copy-view]\";\n\nfunction shouldIgnoreRowNav(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest(ROW_NAV_IGNORE) != null;\n}\n\nfunction activateRowHref(event: MouseEvent<HTMLTableRowElement>, href: string) {\n const newTab =\n event.button === 1 || event.metaKey || event.ctrlKey || event.shiftKey;\n if (event.button === 1) event.preventDefault();\n if (event.button !== 0 && event.button !== 1) return;\n if (newTab) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n return;\n }\n event.currentTarget.querySelector<HTMLAnchorElement>(\"a[href]\")?.click();\n}\n\nfunction DataTable<TData extends RowData>({\n columns,\n data,\n getRowId,\n rowHref,\n onRowClick,\n current,\n selected,\n onSelectedChange,\n defaultSort,\n sort,\n onSortChange,\n search,\n toolbar,\n group,\n animateHeight,\n loading,\n empty = \"Nothing here yet.\",\n layout = \"auto\",\n size = \"base\",\n className,\n ...props\n}: DataTableProps<TData>) {\n const fixed = layout === \"fixed\";\n const rowSize = resolveVariant(DATA_TABLE_SIZES, size);\n const rowText = DATA_TABLE_TEXT[size] ?? DATA_TABLE_TEXT.base;\n const Link = useLinkComponent();\n const announce = useContext(TableHostContext);\n const searching = search === true || typeof search === \"string\";\n const [query, setQuery] = useState(\"\");\n const placeholder = typeof search === \"string\" ? search : \"Search\";\n // A `BasicPage.Search` in a section header adopts the box; the table\n // then renders no toolbar of its own.\n const searchStore = useContext(TableSearchContext);\n const adopted = useSyncExternalStore(\n searchStore?.subscribe ?? subscribeToNothing,\n () => searchStore?.get().adopted ?? false,\n () => false,\n );\n useLayoutEffect(() => {\n if (announce == null) return;\n announce(true);\n return () => announce(false);\n }, [announce]);\n const selecting = selected != null || onSelectedChange != null;\n const [ownSelection, setOwnSelection] = useState<Record<string, true>>({});\n const rowSelection: Record<string, true> =\n selected != null\n ? Object.fromEntries(selected.map((id) => [id, true as const]))\n : ownSelection;\n // Sorting mirrors selection: the component always owns a fallback state,\n // so `defaultSort` + `onSortChange` without `sort` still sorts — a custom\n // `onSortingChange` replaces the table's own updater entirely.\n const [ownSort, setOwnSort] = useState<SortingState>(defaultSort ?? []);\n const sorting: SortingState = sort ?? ownSort;\n const table = useTable<DataTableFeatures, TData>({\n features,\n columns: (selecting\n ? [SELECT_COLUMN as DataTableColumn<TData, any>, ...columns]\n : columns) as Array<DataTableColumn<TData, any>>,\n data: data as Array<TData>,\n getRowId: getRowId ? (row) => getRowId(row) : defaultRowId,\n // Keys only when meant: a present-but-undefined slice of `state` reads\n // as \"controlled, with nobody listening\".\n state: {\n sorting,\n ...(searching ? { globalFilter: query } : {}),\n ...(selecting ? { rowSelection } : {}),\n },\n ...(selecting\n ? {\n enableRowSelection: true,\n onRowSelectionChange: (\n updater:\n | Record<string, true>\n | ((old: Record<string, true>) => Record<string, true>),\n ) => {\n const next =\n typeof updater === \"function\" ? updater(rowSelection) : updater;\n if (selected == null) setOwnSelection(next);\n onSelectedChange?.(Object.keys(next));\n },\n }\n : {}),\n ...(searching\n ? {\n onGlobalFilterChange: setQuery,\n globalFilterFn: \"includesString\" as const,\n }\n : {}),\n onSortingChange: (\n updater: SortingState | ((prev: SortingState) => SortingState),\n ) => {\n const next = typeof updater === \"function\" ? updater(sorting) : updater;\n if (sort == null) setOwnSort(next);\n onSortChange?.(next);\n },\n });\n const rows = table.getRowModel().rows;\n const total = data.length;\n const matched = searching ? rows.length : total;\n useLayoutEffect(() => {\n if (!searching || searchStore == null) return;\n searchStore.publish({ placeholder, query, setQuery, matched, total });\n }, [searching, searchStore, placeholder, query, matched, total]);\n useEffect(() => {\n if (searchStore == null) return;\n return () => searchStore.publish(null);\n }, [searchStore]);\n const leafCount = table.getAllLeafColumns().length;\n const bones = useMemo(\n () =>\n loading\n ? Array.from({ length: loading === true ? DEFAULT_BONES : loading })\n : [],\n [loading],\n );\n\n const renderRow = (row: (typeof rows)[number]) => {\n const href = rowHref?.(row.original);\n const isCurrent = current != null && current === row.id;\n const navigable = href != null || onRowClick != null;\n const onActivate = (event: MouseEvent<HTMLTableRowElement>) => {\n if (event.button !== 0 && event.button !== 1) return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n onRowClick?.(row.original, event);\n if (event.defaultPrevented || href == null) return;\n activateRowHref(event, href);\n };\n const onRowKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (href != null) return;\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n event.preventDefault();\n onRowClick?.(row.original, event);\n };\n return (\n <tr\n key={row.id}\n className={cn(\n navigable &&\n \"hover:bg-pho-primary-hover outline-pho-brand cursor-pointer transition-colors has-[a:focus-visible]:outline-2 has-[a:focus-visible]:-outline-offset-2\",\n (isCurrent || row.getIsSelected()) && \"bg-pho-primary-hover\",\n )}\n tabIndex={navigable && href == null ? 0 : undefined}\n onClick={navigable ? onActivate : undefined}\n onAuxClick={navigable ? onActivate : undefined}\n onKeyDown={navigable && href == null ? onRowKeyDown : undefined}\n >\n {row.getAllCells().map((cell, index) => {\n const align = cell.column.columnDef.meta?.align ?? \"start\";\n return (\n <td\n key={cell.id}\n className={cn(\n \"text-pho-primary px-5 align-middle whitespace-nowrap\",\n rowSize,\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right tabular-nums\",\n cell.column.columnDef.meta?.className,\n )}\n >\n {/* The link lives in the first data cell; with selection on,\n cell 0 is the checkbox and must stay outside the anchor. */}\n {index === (selecting ? 1 : 0) && href != null ? (\n // One real link for keyboard and right-click; the row\n // click handler covers the rest of the surface.\n <Link\n href={href}\n aria-current={isCurrent ? \"page\" : undefined}\n className=\"outline-none\"\n >\n <FlexRender cell={cell} />\n </Link>\n ) : (\n <FlexRender cell={cell} />\n )}\n </td>\n );\n })}\n </tr>\n );\n };\n\n // Partition the (sorted, filtered) rows: the main body, then each\n // labeled group in the order labels first appear in `data`.\n let mainRows = rows;\n let groupSections: Array<[string, typeof rows]> = [];\n if (group != null) {\n mainRows = [];\n const byLabel = new Map<string, typeof rows>();\n const order: string[] = [];\n for (const item of data) {\n const label = group(item);\n if (label != null && !byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n }\n for (const row of rows) {\n const label = group(row.original);\n if (label == null) {\n mainRows.push(row);\n } else {\n if (!byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n byLabel.get(label)!.push(row);\n }\n }\n groupSections = order\n .map((label) => [label, byLabel.get(label)!] as [string, typeof rows])\n .filter(([, sectionRows]) => sectionRows.length > 0);\n }\n\n const grid = (\n <table\n className={cn(\"w-full border-collapse\", rowText, fixed && \"table-fixed\")}\n aria-busy={loading ? true : undefined}\n >\n <thead>\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => {\n const align = header.column.columnDef.meta?.align ?? \"start\";\n const sorted = header.column.getIsSorted();\n const sortable =\n !header.isPlaceholder && header.column.getCanSort();\n return (\n <th\n key={header.id}\n scope=\"col\"\n colSpan={header.colSpan}\n aria-sort={\n sorted === \"asc\"\n ? \"ascending\"\n : sorted === \"desc\"\n ? \"descending\"\n : undefined\n }\n className={cn(\n DATA_TABLE_HEADER_CELL,\n \"px-5\",\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right\",\n header.column.columnDef.meta?.className,\n )}\n >\n {header.isPlaceholder ? null : sortable ? (\n <button\n type=\"button\"\n onClick={header.column.getToggleSortingHandler()}\n className={cn(\n \"group/sort outline-pho-brand hover:text-pho-primary -mx-1 inline-flex items-center gap-1 rounded-sm px-1 transition-colors focus-visible:outline-2\",\n align === \"end\" && \"flex-row-reverse\",\n sorted && \"text-pho-primary\",\n )}\n >\n <FlexRender header={header} />\n <SortIndicator sorted={sorted} />\n </button>\n ) : (\n <FlexRender header={header} />\n )}\n </th>\n );\n })}\n </tr>\n ))}\n </thead>\n <tbody className={DATA_TABLE_BODY}>\n {bones.length > 0 ? (\n bones.map((_, index) => (\n <tr key={index}>\n {table.getAllLeafColumns().map((column) => (\n <td\n key={column.id}\n className={cn(\n \"px-5 align-middle\",\n rowSize,\n fixed && \"min-w-0\",\n column.columnDef.meta?.className,\n )}\n >\n <Skeleton\n className={cn(\n \"h-3.5 w-24\",\n column.columnDef.meta?.align === \"end\" && \"ml-auto\",\n )}\n />\n </td>\n ))}\n </tr>\n ))\n ) : rows.length === 0 ? (\n <tr>\n <td\n colSpan={leafCount}\n className=\"text-pho-description px-5 py-10 text-center\"\n >\n {searching && query !== \"\" && data.length > 0 ? (\n <>Nothing matches “{query}”.</>\n ) : (\n empty\n )}\n </td>\n </tr>\n ) : (\n <>\n {mainRows.map(renderRow)}\n {groupSections.map(([label, sectionRows]) => (\n <Fragment key={label}>\n <tr data-table-group=\"\">\n <td\n colSpan={leafCount}\n // A tinted band, not spacing: the wash marks the group\n // off, the height stays compact.\n className=\"bg-pho-page text-pho-description h-9 px-5 align-middle text-xs font-medium\"\n >\n {label}\n </td>\n </tr>\n {sectionRows.map(renderRow)}\n </Fragment>\n ))}\n </>\n )}\n </tbody>\n </table>\n );\n\n return (\n <div\n className={cn(\n DATA_TABLE_SURFACE,\n \"w-full scroll-mt-12 contain-inline-size\",\n !animateHeight && \"overflow-x-auto\",\n className,\n )}\n {...props}\n data-data-table=\"\"\n >\n {(toolbar != null || (searching && !adopted)) && (\n // The toolbar band — table chrome, like the header row: the ghost\n // search on the cells' text line (`px-5`), filters at the end.\n // Quiet ink, no boxes in the box; the hairline below is the only\n // border it brings.\n <div className=\"border-pho-secondary flex min-h-11 flex-wrap items-center gap-x-4 gap-y-1 border-b px-5 py-2\">\n {searching && !adopted && (\n <GhostSearch\n value={query}\n onChange={setQuery}\n onClear={() => setQuery(\"\")}\n placeholder={placeholder}\n aria-label={placeholder}\n />\n )}\n {toolbar}\n </div>\n )}\n {animateHeight ? (\n // The height glides on the page spring while the rows inside swap;\n // sideways scrolling moves onto the measured layer so the frame\n // clips height only.\n <AnimatedHeight\n transition={SPRING_ENTRANCE}\n className=\"overflow-x-auto\"\n >\n {grid}\n </AnimatedHeight>\n ) : (\n grid\n )}\n </div>\n );\n}\n\n/**\n * The sort cue beside a sortable header: the two-way glyph at rest (shown\n * on hover and focus, so a header reads as plain text until it matters), a\n * chevron pointing the way once the column is sorted.\n */\nfunction SortIndicator({ sorted }: { sorted: false | \"asc\" | \"desc\" }) {\n return (\n <span\n aria-hidden\n className={cn(\n \"inline-flex shrink-0 [&>svg]:size-3.5\",\n !sorted &&\n \"opacity-0 transition-opacity group-hover/sort:opacity-100 group-focus-visible/sort:opacity-100\",\n )}\n >\n {sorted === \"asc\" ? (\n <IconChevronUp />\n ) : sorted === \"desc\" ? (\n <Icon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,UAAAoI;AAAA,IACa,CAAA,IAEhBA,CAEC;AAAA,E;AAET;AAOA,SAASK,GAAc,EAAE,QAAAF,EAAA,GAA8C;AACrE,SACE,gBAAAlH,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAWxB,EACT,yCACA,CAAC0I,KACC,gGACJ;AAAA,IAEC,UAAAA,MAAW,QACV,gBAAAlH,EAAClB,IAAD,CAAgB,CAAA,IACdoI,MAAW,SACb,gBAAAlH,EAACnB,IAAD,CAAkB,CAAA,IAElB,gBAAAmB,EAACkB,IAAD,CAAe,CAAA;AAAA,EAEb,CAAA;AAEV"}
1
+ {"version":3,"file":"data-table-C1tLUdw0.js","names":["_Fragment","cn","resolveVariant","useLinkComponent","SPRING_ENTRANCE","createReactComponent","IconChevronDown","IconChevronUp","AnimatedHeight","Checkbox","Skeleton","DATA_TABLE_TEXT","DATA_TABLE_HEADER_CELL","DATA_TABLE_SURFACE","DATA_TABLE_BODY","GhostSearch","Fragment","createContext","useContext","useEffect","useLayoutEffect","useMemo","useState","useSyncExternalStore","Fragment$1","jsx","jsxs","FlexRender","columnFilteringFeature","createColumnHelper","createFilteredRowModel","createSortedRowModel","filterFn_includesString","globalFilteringFeature","rowSelectionFeature","rowSortingFeature","sortFn_alphanumeric","sortFn_basic","sortFn_datetime","sortFn_text","tableFeatures","useTable","__iconNode","IconSelector","features","DATA_TABLE_SIZES","createColumns","SELECT_COLUMN","table","visible","chosen","row","all","checked","old","next","TableHostContext","createTableSearchStore","state","listeners","emit","listener","api","adopted","TableSearchContext","subscribeToNothing","DEFAULT_BONES","defaultRowId","index","id","ROW_NAV_IGNORE","shouldIgnoreRowNav","target","activateRowHref","event","href","newTab","DataTable","columns","data","getRowId","rowHref","onRowClick","current","selected","onSelectedChange","defaultSort","sort","onSortChange","search","toolbar","group","animateHeight","loading","empty","layout","size","className","props","fixed","rowSize","rowText","Link","announce","searching","query","setQuery","placeholder","searchStore","selecting","ownSelection","setOwnSelection","rowSelection","ownSort","setOwnSort","sorting","updater","rows","total","matched","leafCount","bones","renderRow","isCurrent","navigable","onActivate","onRowKeyDown","cell","align","mainRows","groupSections","byLabel","order","item","label","sectionRows","grid","headerGroup","header","sorted","sortable","SortIndicator","_","column"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs","../../src/components/data-table/data-table.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M8 9l4 -4l4 4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M16 15l-4 4l-4 -4\", \"key\": \"svg-1\" }]];\nconst IconSelector = createReactComponent(\"outline\", \"selector\", \"Selector\", __iconNode);\n\nexport { __iconNode, IconSelector as default };\n","import {\n createContext,\n Fragment,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n useSyncExternalStore,\n type ComponentProps,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n columnFilteringFeature,\n createColumnHelper,\n createFilteredRowModel,\n createSortedRowModel,\n filterFn_includesString,\n FlexRender,\n globalFilteringFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n type ColumnDef,\n type RowData,\n type SortingState,\n} from \"@tanstack/react-table\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconSelector,\n} from \"@tabler/icons-react\";\nimport { Skeleton } from \"../skeleton\";\nimport {\n DATA_TABLE_BODY,\n DATA_TABLE_HEADER_CELL,\n DATA_TABLE_SURFACE,\n DATA_TABLE_TEXT,\n} from \"./chrome\";\nimport { Checkbox } from \"../checkbox\";\nimport { SPRING_ENTRANCE } from \"../../motion\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * DataTable — a table of records with column semantics: sortable headers,\n * aligned cells, rows that are links into a subpage. TanStack Table (v9)\n * does the thinking — column defs, sorting, row identity — and renders\n * nothing; every pixel here is Pho's.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius, the\n * page's primary fill, hairline rules between rows. A table is a card of\n * rows that happen to line up in columns, so it sits in a page's `Stack`\n * as any card does.\n * - Header cells are description ink at body size — never small caps, never\n * bold. Hierarchy comes from ink alone; the header is a label row, not a\n * banner.\n * - A sortable header is a button inside the cell: the label and its\n * indicator (`IconSelector` at rest, a chevron once sorted). `aria-sort`\n * sits on the `th`.\n * - Rows that navigate stretch one link across the row (the first cell's\n * link, extended with a pseudo-element), so the whole row is one target\n * for pointer and one stop for keyboard. Hover washes the row; the row\n * whose page is open beside the table (`current`) keeps the wash — the\n * same cue `BasicPage.RowLink` gives under `aria-current`.\n * - Numbers align to the end with tabular figures (`meta.align: \"end\"`).\n * - `search` is one box over every column — plain contains matching, and\n * the body says when nothing matches. In a page, `BasicPage.Search` in\n * the section header adopts the box; alone, the table keeps one in a\n * toolbar row inside its frame. Server-side search keeps its own box\n * outside.\n * - A wide table scrolls sideways inside its own frame; the page never does.\n * `contain: inline-size` keeps the table's intrinsic width out of the\n * page's — a host that sizes to content (a scroll area's fit-content\n * pane, a grid's auto column) would otherwise grow to the widest row.\n * Left with no width of its own, the frame takes its container's\n * (`w-full`); a shrink-to-fit host (a flex row) would collapse it.\n * `layout=\"fixed\"` is the other way out: columns size from the frame,\n * and a long cell truncates instead of stretching the table.\n *\n * Reach for it when a list needs column semantics — sorting, aligned\n * figures, several fields side by side. A list where each row is one\n * label and a chevron stays `BasicPage.RowLink`.\n */\n\n/** Column metadata a `DataTable` understands. */\nexport interface DataTableColumnMeta {\n /** Cell alignment — `end` for figures (right-aligned, tabular). */\n align?: \"start\" | \"end\";\n /**\n * Extra classes on every `th` and `td` in this column. With\n * `layout=\"fixed\"`, size a short column here (`w-24`) and leave the\n * flexible ones unsaid — they share what remains. Prefer this over\n * `nth-child` width hacks on the table's `className`.\n */\n className?: string;\n}\n\n/**\n * The feature set every `DataTable` runs on — sorting with the stock sort\n * functions, the column meta above. Fixed, so column definitions written\n * once fit every table.\n */\nconst features = tableFeatures({\n rowSortingFeature,\n rowSelectionFeature,\n columnFilteringFeature,\n globalFilteringFeature,\n sortedRowModel: createSortedRowModel(),\n filteredRowModel: createFilteredRowModel(),\n filterFns: { includesString: filterFn_includesString },\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n columnMeta: {} as DataTableColumnMeta,\n});\n\nexport type DataTableFeatures = typeof features;\n\n/** Body row height — the header keeps its own `h-10` on every size. */\nexport const DATA_TABLE_SIZES = {\n sm: {\n classes: \"h-10\",\n description: \"Small — 40px at 13px; the header's height, for dense lists\",\n },\n base: {\n classes: \"h-12\",\n description: \"Base — 48px at 14px; one line of body type\",\n },\n lg: {\n classes: \"h-14\",\n description:\n \"Large — 56px at 16px; two-line cells (a number and a caption)\",\n },\n} satisfies VariantMap;\n\nexport type DataTableSize = keyof typeof DATA_TABLE_SIZES;\n\n/** A column definition for a `DataTable` of `TData` rows. */\nexport type DataTableColumn<\n TData extends RowData,\n TValue = unknown,\n> = ColumnDef<DataTableFeatures, TData, TValue>;\n\n/**\n * The column helper, bound to the table's feature set — `accessor`,\n * `display`, `group`, and `columns` to collect them with their types\n * intact.\n *\n * @example\n * const col = createColumns<Request>();\n * const columns = col.columns([\n * col.accessor(\"actor\", { header: \"Actor\" }),\n * col.accessor(\"amount\", { header: \"Amount\", meta: { align: \"end\" } }),\n * ]);\n */\nexport function createColumns<TData extends RowData>() {\n return createColumnHelper<DataTableFeatures, TData>();\n}\n\n/**\n * The leading checkbox column selection adds. The header checkbox works\n * the visible set: everything the search still shows toggles together,\n * while rows selected earlier and then hidden stay selected.\n */\nconst SELECT_COLUMN = createColumns<RowData>().display({\n id: \"select\",\n enableSorting: false,\n header: ({ table }) => {\n const visible = table.getRowModel().rows;\n const chosen = visible.filter((row) => row.getIsSelected()).length;\n const all = visible.length > 0 && chosen === visible.length;\n return (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select all\"\n checked={all}\n indeterminate={chosen > 0 && !all}\n onCheckedChange={(checked) => {\n table.setRowSelection((old) => {\n const next = { ...old };\n for (const row of visible) {\n if (checked === true) next[row.id] = true;\n else delete next[row.id];\n }\n return next;\n });\n }}\n />\n );\n },\n cell: ({ row }) => (\n <Checkbox\n size=\"sm\"\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n ),\n});\n\nexport interface DataTableProps<TData extends RowData> extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n columns: ReadonlyArray<DataTableColumn<TData, any>>;\n data: ReadonlyArray<TData>;\n /**\n * A row's identity — what `current` is matched against, and what keeps a\n * row itself across sorts. Defaults to the row's `id` field, else its\n * index.\n */\n getRowId?: (row: TData) => string;\n /**\n * Rows that navigate: each row is one link into a subpage, through the\n * host's `LinkProvider`. Beside a `BasicPage.Aside`, the subpage opens\n * next to the table. Return nothing for a row with no page yet (one\n * still in flight) and that row stays plain.\n */\n rowHref?: (row: TData) => string | null | undefined;\n /**\n * A click on the row (not on a link, button, or other control). The\n * table still activates `rowHref` unless the handler calls\n * `preventDefault`.\n */\n onRowClick?: (\n row: TData,\n event: MouseEvent<HTMLTableRowElement> | KeyboardEvent<HTMLTableRowElement>,\n ) => void;\n /** The row whose page is open (its id) — it keeps the wash. */\n current?: string | null;\n /**\n * Sorting is on for every accessor column (`enableSorting: false` on a\n * column turns it off there). Uncontrolled by default; `defaultSort`\n * seeds it. Pass `sort` with `onSortChange` to own it — the way to sort\n * on the server.\n */\n defaultSort?: SortingState;\n sort?: SortingState;\n onSortChange?: (sort: SortingState) => void;\n /**\n * A search box on the table — `true`, or the placeholder it should\n * show. One box searches every column (a column opts out with\n * `enableGlobalFilter: false`); matching is a plain case-insensitive\n * contains, on the client. With no matches the body says so. When the\n * list doesn't all come down, keep the box outside and ask the server.\n */\n search?: boolean | string;\n /**\n * Controls in the frame's top band — a `BasicPage.Search` first, then a\n * filter or two. The band is part of the table (one surface, a hairline\n * above the header row), so nothing floats over the page and the\n * spacing above and below is the frame's own. A `Search` here adopts\n * the table's box the way a header one does.\n */\n toolbar?: ReactNode;\n /**\n * Row selection: hand either of these and rows grow a leading checkbox\n * column. The header checkbox works the visible set — everything the\n * search still shows — so select-all after a search means what it says;\n * rows selected earlier and then hidden stay selected. `selected` is\n * the selected ids (ids come from `getRowId`; pair with\n * `onSelectedChange` to own the state); `onSelectedChange` alone\n * listens while the table keeps it. The page renders its own bulk\n * actions from the ids — the table only keeps the score.\n */\n selected?: readonly string[];\n onSelectedChange?: (ids: string[]) => void;\n /**\n * File rows into labeled groups: return a label and the row renders\n * under it, `null` and it stays in the main body. Groups follow the\n * main body, in the order their labels first appear in `data`, each\n * under a quiet label row — and only while they have rows, so a group\n * a search empties simply leaves. Sorting orders rows within their\n * group.\n */\n group?: (row: TData) => string | null;\n /**\n * Glide the frame's height when the rows change — a search narrowing,\n * a filter, bones becoming rows. The height follows the content on the\n * page spring instead of jumping; reserve it for tables whose rows\n * change while mounted (same contract as `BasicPage.Card`'s).\n */\n animateHeight?: boolean;\n /** Bones while the rows are on their way — `true` for five, or a count. */\n loading?: boolean | number;\n /** What the body says when there are no rows. */\n empty?: ReactNode;\n /**\n * How columns take width. `auto` (the default) sizes them from their\n * content — a long cell grows the table and the frame scrolls sideways.\n * `fixed` sizes them from the table's width (`table-layout: fixed`):\n * short columns take a width hint on `meta.className`, the rest share\n * what remains, and cells get `min-w-0` so an inner `truncate` can\n * shrink. `width: 0` (`w-0`) is not a content-size hint here — fixed\n * layout treats it as a real zero — so give a short column a real\n * width (`w-24`) rather than the auto-layout shrink-wrap trick.\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * Body row height and the type that comes with it. `base` (the default)\n * is 48px rows at 14px — one line of body type. `sm` is 40px at 13px,\n * the header's own height, for a dense list scanned more than read.\n * `lg` is 56px at 16px, for a two-line cell (a number and a caption)\n * that would crowd `base`. The header row keeps its 40px on every size\n * and follows the type.\n */\n size?: DataTableSize;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A host that sizes itself around tables provides this; each table\n * announces itself while mounted. `BasicPage.Root` runs wide when the\n * page carries one and `width` was left unsaid.\n */\nexport const TableHostContext = createContext<\n ((present: boolean) => void) | null\n>(null);\n\n/** A searchable table's search, published for a header to adopt. */\nexport interface TableSearchApi {\n placeholder: string;\n query: string;\n setQuery: (query: string) => void;\n /** Rows still showing after the current query. */\n matched: number;\n /** Rows in the list, before search. */\n total: number;\n}\n\ninterface TableSearchState {\n api: TableSearchApi | null;\n adopted: boolean;\n}\n\n/**\n * The channel between a searchable table and a `BasicPage.Search` placed\n * in a section header: the table publishes its search (placeholder,\n * query, the setter); a mounted `Search` adopts it, and the table's own\n * box yields. Provided by `BasicPage.Root`; a table outside any page\n * keeps its built-in box. One searchable table per page — a later\n * publisher takes the slot.\n */\nexport interface TableSearchStore {\n get: () => TableSearchState;\n subscribe: (listener: () => void) => () => void;\n publish: (api: TableSearchApi | null) => void;\n adopt: (adopted: boolean) => void;\n}\n\nexport function createTableSearchStore(): TableSearchStore {\n let state: TableSearchState = { api: null, adopted: false };\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n return {\n get: () => state,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n publish(api) {\n state = { ...state, api };\n emit();\n },\n adopt(adopted) {\n state = { ...state, adopted };\n emit();\n },\n };\n}\n\nexport const TableSearchContext = createContext<TableSearchStore | null>(null);\n\nconst subscribeToNothing = () => () => {};\n\nexport { GhostSearch, type GhostSearchProps } from \"../../utils/ghost-search\";\nimport { GhostSearch } from \"../../utils/ghost-search\";\n\nconst DEFAULT_BONES = 5;\n\nfunction defaultRowId(row: unknown, index: number): string {\n const id = (row as { id?: unknown } | null)?.id;\n return typeof id === \"string\" || typeof id === \"number\"\n ? String(id)\n : String(index);\n}\n\n/** Controls keep their own click; the row only navigates from empty surface. */\n// A copy view (CopyButton's children) is the copy, not the row's link.\nconst ROW_NAV_IGNORE =\n \"a, button, input, textarea, select, label, [data-copy-view]\";\n\nfunction shouldIgnoreRowNav(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest(ROW_NAV_IGNORE) != null;\n}\n\nfunction activateRowHref(event: MouseEvent<HTMLTableRowElement>, href: string) {\n const newTab =\n event.button === 1 || event.metaKey || event.ctrlKey || event.shiftKey;\n if (event.button === 1) event.preventDefault();\n if (event.button !== 0 && event.button !== 1) return;\n if (newTab) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n return;\n }\n event.currentTarget.querySelector<HTMLAnchorElement>(\"a[href]\")?.click();\n}\n\nfunction DataTable<TData extends RowData>({\n columns,\n data,\n getRowId,\n rowHref,\n onRowClick,\n current,\n selected,\n onSelectedChange,\n defaultSort,\n sort,\n onSortChange,\n search,\n toolbar,\n group,\n animateHeight,\n loading,\n empty = \"Nothing here yet.\",\n layout = \"auto\",\n size = \"base\",\n className,\n ...props\n}: DataTableProps<TData>) {\n const fixed = layout === \"fixed\";\n const rowSize = resolveVariant(DATA_TABLE_SIZES, size);\n const rowText = DATA_TABLE_TEXT[size] ?? DATA_TABLE_TEXT.base;\n const Link = useLinkComponent();\n const announce = useContext(TableHostContext);\n const searching = search === true || typeof search === \"string\";\n const [query, setQuery] = useState(\"\");\n const placeholder = typeof search === \"string\" ? search : \"Search\";\n // A `BasicPage.Search` in a section header adopts the box; the table\n // then renders no toolbar of its own.\n const searchStore = useContext(TableSearchContext);\n const adopted = useSyncExternalStore(\n searchStore?.subscribe ?? subscribeToNothing,\n () => searchStore?.get().adopted ?? false,\n () => false,\n );\n useLayoutEffect(() => {\n if (announce == null) return;\n announce(true);\n return () => announce(false);\n }, [announce]);\n const selecting = selected != null || onSelectedChange != null;\n const [ownSelection, setOwnSelection] = useState<Record<string, true>>({});\n const rowSelection: Record<string, true> =\n selected != null\n ? Object.fromEntries(selected.map((id) => [id, true as const]))\n : ownSelection;\n // Sorting mirrors selection: the component always owns a fallback state,\n // so `defaultSort` + `onSortChange` without `sort` still sorts — a custom\n // `onSortingChange` replaces the table's own updater entirely.\n const [ownSort, setOwnSort] = useState<SortingState>(defaultSort ?? []);\n const sorting: SortingState = sort ?? ownSort;\n const table = useTable<DataTableFeatures, TData>({\n features,\n columns: (selecting\n ? [SELECT_COLUMN as DataTableColumn<TData, any>, ...columns]\n : columns) as Array<DataTableColumn<TData, any>>,\n data: data as Array<TData>,\n getRowId: getRowId ? (row) => getRowId(row) : defaultRowId,\n // Keys only when meant: a present-but-undefined slice of `state` reads\n // as \"controlled, with nobody listening\".\n state: {\n sorting,\n ...(searching ? { globalFilter: query } : {}),\n ...(selecting ? { rowSelection } : {}),\n },\n ...(selecting\n ? {\n enableRowSelection: true,\n onRowSelectionChange: (\n updater:\n | Record<string, true>\n | ((old: Record<string, true>) => Record<string, true>),\n ) => {\n const next =\n typeof updater === \"function\" ? updater(rowSelection) : updater;\n if (selected == null) setOwnSelection(next);\n onSelectedChange?.(Object.keys(next));\n },\n }\n : {}),\n ...(searching\n ? {\n onGlobalFilterChange: setQuery,\n globalFilterFn: \"includesString\" as const,\n }\n : {}),\n onSortingChange: (\n updater: SortingState | ((prev: SortingState) => SortingState),\n ) => {\n const next = typeof updater === \"function\" ? updater(sorting) : updater;\n if (sort == null) setOwnSort(next);\n onSortChange?.(next);\n },\n });\n const rows = table.getRowModel().rows;\n const total = data.length;\n const matched = searching ? rows.length : total;\n useLayoutEffect(() => {\n if (!searching || searchStore == null) return;\n searchStore.publish({ placeholder, query, setQuery, matched, total });\n }, [searching, searchStore, placeholder, query, matched, total]);\n useEffect(() => {\n if (searchStore == null) return;\n return () => searchStore.publish(null);\n }, [searchStore]);\n const leafCount = table.getAllLeafColumns().length;\n const bones = useMemo(\n () =>\n loading\n ? Array.from({ length: loading === true ? DEFAULT_BONES : loading })\n : [],\n [loading],\n );\n\n const renderRow = (row: (typeof rows)[number]) => {\n const href = rowHref?.(row.original);\n const isCurrent = current != null && current === row.id;\n const navigable = href != null || onRowClick != null;\n const onActivate = (event: MouseEvent<HTMLTableRowElement>) => {\n if (event.button !== 0 && event.button !== 1) return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n onRowClick?.(row.original, event);\n if (event.defaultPrevented || href == null) return;\n activateRowHref(event, href);\n };\n const onRowKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (href != null) return;\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n if (event.defaultPrevented || shouldIgnoreRowNav(event.target)) return;\n event.preventDefault();\n onRowClick?.(row.original, event);\n };\n return (\n <tr\n key={row.id}\n className={cn(\n navigable &&\n \"hover:bg-pho-primary-hover outline-pho-brand cursor-pointer transition-colors has-[a:focus-visible]:outline-2 has-[a:focus-visible]:-outline-offset-2\",\n (isCurrent || row.getIsSelected()) && \"bg-pho-primary-hover\",\n )}\n tabIndex={navigable && href == null ? 0 : undefined}\n onClick={navigable ? onActivate : undefined}\n onAuxClick={navigable ? onActivate : undefined}\n onKeyDown={navigable && href == null ? onRowKeyDown : undefined}\n >\n {row.getAllCells().map((cell, index) => {\n const align = cell.column.columnDef.meta?.align ?? \"start\";\n return (\n <td\n key={cell.id}\n className={cn(\n \"text-pho-primary px-5 align-middle whitespace-nowrap\",\n rowSize,\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right tabular-nums\",\n cell.column.columnDef.meta?.className,\n )}\n >\n {/* The link lives in the first data cell; with selection on,\n cell 0 is the checkbox and must stay outside the anchor. */}\n {index === (selecting ? 1 : 0) && href != null ? (\n // One real link for keyboard and right-click; the row\n // click handler covers the rest of the surface.\n <Link\n href={href}\n aria-current={isCurrent ? \"page\" : undefined}\n className=\"outline-none\"\n >\n <FlexRender cell={cell} />\n </Link>\n ) : (\n <FlexRender cell={cell} />\n )}\n </td>\n );\n })}\n </tr>\n );\n };\n\n // Partition the (sorted, filtered) rows: the main body, then each\n // labeled group in the order labels first appear in `data`.\n let mainRows = rows;\n let groupSections: Array<[string, typeof rows]> = [];\n if (group != null) {\n mainRows = [];\n const byLabel = new Map<string, typeof rows>();\n const order: string[] = [];\n for (const item of data) {\n const label = group(item);\n if (label != null && !byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n }\n for (const row of rows) {\n const label = group(row.original);\n if (label == null) {\n mainRows.push(row);\n } else {\n if (!byLabel.has(label)) {\n byLabel.set(label, []);\n order.push(label);\n }\n byLabel.get(label)!.push(row);\n }\n }\n groupSections = order\n .map((label) => [label, byLabel.get(label)!] as [string, typeof rows])\n .filter(([, sectionRows]) => sectionRows.length > 0);\n }\n\n const grid = (\n <table\n className={cn(\"w-full border-collapse\", rowText, fixed && \"table-fixed\")}\n aria-busy={loading ? true : undefined}\n >\n <thead>\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => {\n const align = header.column.columnDef.meta?.align ?? \"start\";\n const sorted = header.column.getIsSorted();\n const sortable =\n !header.isPlaceholder && header.column.getCanSort();\n return (\n <th\n key={header.id}\n scope=\"col\"\n colSpan={header.colSpan}\n aria-sort={\n sorted === \"asc\"\n ? \"ascending\"\n : sorted === \"desc\"\n ? \"descending\"\n : undefined\n }\n className={cn(\n DATA_TABLE_HEADER_CELL,\n \"px-5\",\n fixed && \"min-w-0\",\n align === \"end\" && \"text-right\",\n header.column.columnDef.meta?.className,\n )}\n >\n {header.isPlaceholder ? null : sortable ? (\n <button\n type=\"button\"\n onClick={header.column.getToggleSortingHandler()}\n className={cn(\n \"group/sort outline-pho-brand hover:text-pho-primary -mx-1 inline-flex items-center gap-1 rounded-sm px-1 transition-colors focus-visible:outline-2\",\n align === \"end\" && \"flex-row-reverse\",\n sorted && \"text-pho-primary\",\n )}\n >\n <FlexRender header={header} />\n <SortIndicator sorted={sorted} />\n </button>\n ) : (\n <FlexRender header={header} />\n )}\n </th>\n );\n })}\n </tr>\n ))}\n </thead>\n <tbody className={DATA_TABLE_BODY}>\n {bones.length > 0 ? (\n bones.map((_, index) => (\n <tr key={index}>\n {table.getAllLeafColumns().map((column) => (\n <td\n key={column.id}\n className={cn(\n \"px-5 align-middle\",\n rowSize,\n fixed && \"min-w-0\",\n column.columnDef.meta?.className,\n )}\n >\n <Skeleton\n className={cn(\n \"h-3.5 w-24\",\n column.columnDef.meta?.align === \"end\" && \"ml-auto\",\n )}\n />\n </td>\n ))}\n </tr>\n ))\n ) : rows.length === 0 ? (\n <tr>\n <td\n colSpan={leafCount}\n className=\"text-pho-description px-5 py-10 text-center\"\n >\n {searching && query !== \"\" && data.length > 0 ? (\n <>Nothing matches “{query}”.</>\n ) : (\n empty\n )}\n </td>\n </tr>\n ) : (\n <>\n {mainRows.map(renderRow)}\n {groupSections.map(([label, sectionRows]) => (\n <Fragment key={label}>\n <tr data-table-group=\"\">\n <td\n colSpan={leafCount}\n // A tinted band, not spacing: the wash marks the group\n // off, the height stays compact.\n className=\"bg-pho-page text-pho-description font-heading h-9 px-5 align-middle text-xs font-medium\"\n >\n {label}\n </td>\n </tr>\n {sectionRows.map(renderRow)}\n </Fragment>\n ))}\n </>\n )}\n </tbody>\n </table>\n );\n\n return (\n <div\n className={cn(\n DATA_TABLE_SURFACE,\n \"w-full scroll-mt-12 contain-inline-size\",\n !animateHeight && \"overflow-x-auto\",\n className,\n )}\n {...props}\n data-data-table=\"\"\n >\n {(toolbar != null || (searching && !adopted)) && (\n // The toolbar band — table chrome, like the header row: the ghost\n // search on the cells' text line (`px-5`), filters at the end.\n // Quiet ink, no boxes in the box; the hairline below is the only\n // border it brings.\n <div className=\"border-pho-secondary flex min-h-11 flex-wrap items-center gap-x-4 gap-y-1 border-b px-5 py-2\">\n {searching && !adopted && (\n <GhostSearch\n value={query}\n onChange={setQuery}\n onClear={() => setQuery(\"\")}\n placeholder={placeholder}\n aria-label={placeholder}\n />\n )}\n {toolbar}\n </div>\n )}\n {animateHeight ? (\n // The height glides on the page spring while the rows inside swap;\n // sideways scrolling moves onto the measured layer so the frame\n // clips height only.\n <AnimatedHeight\n transition={SPRING_ENTRANCE}\n className=\"overflow-x-auto\"\n >\n {grid}\n </AnimatedHeight>\n ) : (\n grid\n )}\n </div>\n );\n}\n\n/**\n * The sort cue beside a sortable header: the two-way glyph at rest (shown\n * on hover and focus, so a header reads as plain text until it matters), a\n * chevron pointing the way once the column is sorted.\n */\nfunction SortIndicator({ sorted }: { sorted: false | \"asc\" | \"desc\" }) {\n return (\n <span\n aria-hidden\n className={cn(\n \"inline-flex shrink-0 [&>svg]:size-3.5\",\n !sorted &&\n \"opacity-0 transition-opacity group-hover/sort:opacity-100 group-focus-visible/sort:opacity-100\",\n )}\n >\n {sorted === \"asc\" ? (\n <IconChevronUp />\n ) : sorted === \"desc\" ? (\n <IconChevronDown />\n ) : (\n <IconSelector />\n )}\n </span>\n );\n}\n\nexport { DataTable, DATA_TABLE_SURFACE };\n"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AASA,IAAM0C,KAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAiB,KAAO;AAAQ,CAAC,GAAG,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAqB,KAAO;AAAQ,CAAC,CAAC,GACxHC,KAAetC,GAAqB,WAAW,YAAY,YAAYqC,EAAU,GCwGjFE,KAAWJ,GAAc;AAAA,EAC7B,mBAAAL;AAAA,EACA,qBAAAD;AAAA,EACA,wBAAAN;AAAA,EACA,wBAAAK;AAAA,EACA,gBAAgBF,GAAqB;AAAA,EACrC,kBAAkBD,GAAuB;AAAA,EACzC,WAAW,EAAE,gBAAgBE,GAAwB;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,WAAU;AAAA,UAET,UAAAc;AAAA,QACC,CAAA;AAAA,MACF,CAAA,GACHC,EAAY,IAAIb,CAAS,CAClB,EAAA,GAZKY,CAYL,CACX,CACD,EAAA,CAAA;AAAA,IAEC,CAAA,CACF;AAAA,E;AAGT,SACE,gBAAA5G,EAAC,OAAD;AAAA,IACE,WAAWzB,EACTY,IACA,2CACA,CAAC+E,KAAiB,mBAClBK,EACF;AAAA,IACA,GAAIC;AAAA,IACJ,mBAAgB;AAAA,IARlB,UAAA,EAUIR,KAAW,QAASc,KAAa,CAACzC,MAKlC,gBAAArC,EAAC,OAAD;AAAA,MAAK,WAAU;AAAA,MAAf,UAAA,CACG8E,KAAa,CAACzC,KACb,gBAAAtC,EAACV,IAAD;AAAA,QACE,OAAO0F;AAAA,QACP,UAAUC;AAAA,QACV,SAAA,MAAeA,EAAS,EAAE;AAAA,QACb,aAAAC;AAAA,QACb,cAAYA;AAAA,MACb,CAAA,GAEFjB,CACE;AAAA,IAEN,CAAA,GAAAE,IAIC,gBAAAnE,EAACjB,IAAD;AAAA,MACE,YAAYJ;AAAA,MACZ,WAAU;AAAA,MAET,UAAAoI;AAAA,IACa,CAAA,IAEhBA,CAEC;AAAA,E;AAET;AAOA,SAASK,GAAc,EAAE,QAAAF,EAAA,GAA8C;AACrE,SACE,gBAAAlH,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAWxB,EACT,yCACA,CAAC0I,KACC,gGACJ;AAAA,IAEC,UAAAA,MAAW,QACV,gBAAAlH,EAAClB,IAAD,CAAgB,CAAA,IACdoI,MAAW,SACb,gBAAAlH,EAACnB,IAAD,CAAkB,CAAA,IAElB,gBAAAmB,EAACkB,IAAD,CAAe,CAAA;AAAA,EAEb,CAAA;AAEV"}
@@ -2,7 +2,7 @@
2
2
  import { t as p } from "./cn-CPbhpG1q.js";
3
3
  import { t as Ue } from "./createReactComponent-yKZn9MIX.js";
4
4
  import { t as me } from "./calendar-DDWITGo4.js";
5
- import { t as V } from "./popover-B0NBrYV5.js";
5
+ import { t as V } from "./popover-Dtp9C6Qg.js";
6
6
  import { useCallback as Ze, useEffect as We, useId as Je, useRef as Q, useState as x, useSyncExternalStore as Qe } from "react";
7
7
  import { Fragment as te, jsx as f, jsxs as y } from "react/jsx-runtime";
8
8
  var Xe = [
@@ -425,4 +425,4 @@ export {
425
425
  vt as t
426
426
  };
427
427
 
428
- //# sourceMappingURL=date-picker-vJQrTol9.js.map
428
+ //# sourceMappingURL=date-picker-D-sWo3i8.js.map