@abpjs/ui 0.2.0-next.30 → 0.2.0-next.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -316,7 +316,7 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
316
316
  });
317
317
  var panelSlotRecipe = defineSlotRecipe({
318
318
  className: "abp-panel",
319
- slots: ["root", "header", "titleGroup", "title", "description", "actions", "body", "footer"],
319
+ slots: ["root", "header", "titleGroup", "title", "description", "actions", "body", "footer", "toggle", "chevron", "summary"],
320
320
  base: {
321
321
  root: {
322
322
  layerStyle: "panel",
@@ -341,6 +341,44 @@ var panelSlotRecipe = defineSlotRecipe({
341
341
  title: { textStyle: "heading.section", color: "fg", display: "flex", alignItems: "center", gap: "2" },
342
342
  description: { textStyle: "caption", color: "fg.muted" },
343
343
  actions: { display: "flex", alignItems: "center", gap: "2", flexWrap: "wrap" },
344
+ // A collapsible panel's header: the whole title line folds it, the chevron first (the design canvas's settings card).
345
+ toggle: {
346
+ display: "flex",
347
+ alignItems: "center",
348
+ gap: "2",
349
+ flex: "1",
350
+ minW: "0",
351
+ mx: "-1.5",
352
+ px: "1.5",
353
+ py: "1",
354
+ borderRadius: "l2",
355
+ bg: "transparent",
356
+ color: "inherit",
357
+ textAlign: "start",
358
+ cursor: "pointer",
359
+ _hover: { bg: "bg.muted" },
360
+ focusVisibleRing: "inside"
361
+ },
362
+ chevron: {
363
+ flex: "none",
364
+ display: "inline-flex",
365
+ color: "fg.muted",
366
+ transition: "transform 150ms ease",
367
+ _rtl: { transform: "scaleX(-1)" },
368
+ "&[data-open]": { transform: "rotate(90deg)" },
369
+ _motionReduce: { transition: "none" }
370
+ },
371
+ summary: {
372
+ flex: "none",
373
+ maxW: "40%",
374
+ ms: "auto",
375
+ textStyle: "sm",
376
+ color: "fg.muted",
377
+ overflow: "hidden",
378
+ textOverflow: "ellipsis",
379
+ whiteSpace: "nowrap",
380
+ hideBelow: "md"
381
+ },
344
382
  body: { p: "panel", flex: "1", minW: "0" },
345
383
  footer: {
346
384
  display: "flex",
@@ -359,6 +397,11 @@ var panelSlotRecipe = defineSlotRecipe({
359
397
  true: { body: { p: "0", overflow: "hidden", borderBottomRadius: "l3" } },
360
398
  false: {}
361
399
  },
400
+ /** Folded (`collapsible`): only the header, without its rule. */
401
+ collapsed: {
402
+ true: { header: { borderBottomWidth: "0" } },
403
+ false: {}
404
+ },
362
405
  /**
363
406
  * `card`: the bordered surface. `section`: no box, a heading over a rule and its content under it, for pages where
364
407
  * blocks follow one another in one column (the record's page, UI round 8) and a stack of boxes reads heavy.
@@ -374,7 +417,7 @@ var panelSlotRecipe = defineSlotRecipe({
374
417
  }
375
418
  },
376
419
  compoundVariants: [{ flush: true, tone: "section", css: { body: { borderBottomRadius: "0", pt: "1" } } }],
377
- defaultVariants: { flush: false, tone: "card" }
420
+ defaultVariants: { flush: false, tone: "card", collapsed: false }
378
421
  });
379
422
  var statusPillSlotRecipe = defineSlotRecipe({
380
423
  className: "abp-status-pill",
@@ -1560,7 +1603,7 @@ function useTokenVar() {
1560
1603
  }
1561
1604
 
1562
1605
  // src/version.ts
1563
- var ABP_UI_VERSION = true ? "0.2.0-next.30" : "0.0.0-dev";
1606
+ var ABP_UI_VERSION = true ? "0.2.0-next.32" : "0.0.0-dev";
1564
1607
 
1565
1608
  // src/provider/time-zone.tsx
1566
1609
  import { createContext, useContext } from "react";
@@ -1683,6 +1726,21 @@ var defaultQueryListLabels = {
1683
1726
  exportExcel: "Excel (.xlsx)",
1684
1727
  exporting: "Exporting\u2026",
1685
1728
  exportCut: "The file holds {rows} of {total} rows: an export stops at {limit}. Narrow the query to get the rest.",
1729
+ exportTitleCsv: "Export to CSV",
1730
+ exportTitleExcel: "Export to Excel",
1731
+ exportRows: "Rows",
1732
+ exportFound: "Filtered ({count})",
1733
+ exportAll: "All",
1734
+ exportColumns: "Columns",
1735
+ exportSeparator: "Separator",
1736
+ exportComma: "Comma ( , )",
1737
+ exportSemicolon: "Semicolon ( ; )",
1738
+ exportTab: "Tab",
1739
+ exportPreview: "Preview",
1740
+ exportRun: "Export",
1741
+ exportCancel: "Cancel",
1742
+ exportPreparing: "Preparing the file\u2026 You can keep working.",
1743
+ exportReady: "Your file is ready",
1686
1744
  exportFailed: "The export failed",
1687
1745
  dismiss: "Dismiss",
1688
1746
  operators: {
@@ -1709,6 +1767,10 @@ var defaultLabels = {
1709
1767
  close: "Close",
1710
1768
  typeToConfirm: "Type {value} to confirm",
1711
1769
  preview: "Preview",
1770
+ saveBar: "Save your changes?",
1771
+ unsavedChanges: "{count, plural, one {# change isn't saved yet} other {# changes aren't saved yet}}",
1772
+ discard: "Discard",
1773
+ save: "Save",
1712
1774
  cancel: "Cancel",
1713
1775
  confirm: "Confirm",
1714
1776
  retry: "Retry",
@@ -4482,7 +4544,7 @@ function Nudge({ on, children }) {
4482
4544
 
4483
4545
  // src/components/AppShell.tsx
4484
4546
  import { Fragment as Fragment7, useCallback as useCallback8, useState as useState12 } from "react";
4485
- import { chakra as chakra12, Drawer, Portal as Portal7, SkipNavContent, SkipNavLink, useSlotRecipe } from "@chakra-ui/react";
4547
+ import { chakra as chakra12, Drawer, Menu, Portal as Portal7, SkipNavContent, SkipNavLink, useSlotRecipe } from "@chakra-ui/react";
4486
4548
  import { ChevronDown, Menu as MenuIcon, PanelLeftClose, PanelLeftOpen, X } from "lucide-react";
4487
4549
 
4488
4550
  // src/components/Tooltip.tsx
@@ -4599,10 +4661,24 @@ function AppShell({
4599
4661
  }
4600
4662
  function TopNavItem({ item, styles }) {
4601
4663
  const Link = useLinkComponent();
4602
- return /* @__PURE__ */ jsx26(chakra12.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */ jsxs18(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, children: [
4664
+ const link = /* @__PURE__ */ jsx26(chakra12.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */ jsxs18(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, children: [
4603
4665
  item.current && /* @__PURE__ */ jsx26(Indicator, { group: "abp-top-nav", css: styles.topNavIndicator }),
4604
4666
  /* @__PURE__ */ jsx26(chakra12.span, { css: styles.topNavLabel, children: item.label })
4605
4667
  ] }) });
4668
+ if (!item.children?.length) return link;
4669
+ return /* @__PURE__ */ jsxs18(chakra12.span, { display: "inline-flex", alignItems: "center", "data-top-nav-menu": "", children: [
4670
+ link,
4671
+ /* @__PURE__ */ jsxs18(Menu.Root, { positioning: { placement: "bottom-start" }, lazyMount: true, unmountOnExit: true, children: [
4672
+ /* @__PURE__ */ jsx26(Menu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx26(IconButton, { size: "xs", variant: "ghost", color: "fg.muted", ms: "-1", "aria-label": item.childrenLabel ?? item.label, children: /* @__PURE__ */ jsx26(ChevronDown, {}) }) }),
4673
+ /* @__PURE__ */ jsx26(Portal7, { children: /* @__PURE__ */ jsx26(Menu.Positioner, { children: /* @__PURE__ */ jsx26(Menu.Content, { minW: "56", maxW: "80", children: /* @__PURE__ */ jsxs18(Menu.ItemGroup, { children: [
4674
+ item.childrenTitle != null && /* @__PURE__ */ jsx26(Menu.ItemGroupLabel, { children: item.childrenTitle }),
4675
+ item.children.map((child) => /* @__PURE__ */ jsx26(Menu.Item, { value: child.id, asChild: true, children: /* @__PURE__ */ jsxs18(Link, { href: child.href, "aria-current": child.current ? "page" : void 0, children: [
4676
+ child.icon,
4677
+ /* @__PURE__ */ jsx26(chakra12.span, { truncate: true, children: child.label })
4678
+ ] }) }, child.id))
4679
+ ] }) }) }) })
4680
+ ] })
4681
+ ] });
4606
4682
  }
4607
4683
  function SidebarContents({
4608
4684
  styles,
@@ -4959,20 +5035,20 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
4959
5035
 
4960
5036
  // src/components/RowMenu.tsx
4961
5037
  import { Fragment as Fragment12 } from "react";
4962
- import { Menu, Portal as Portal10, Text as Text8 } from "@chakra-ui/react";
5038
+ import { Menu as Menu2, Portal as Portal10, Text as Text8 } from "@chakra-ui/react";
4963
5039
  import { MoreHorizontal } from "lucide-react";
4964
5040
  import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
4965
5041
  var isSeparator = (e) => "separator" in e;
4966
5042
  var isNote = (e) => "note" in e;
4967
5043
  function RowMenu({ label, items, size = "sm" }) {
4968
- return /* @__PURE__ */ jsxs21(Menu.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
4969
- /* @__PURE__ */ jsx29(Menu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx29(IconButton, { "aria-label": label, size, variant: "ghost", color: "fg.muted", "data-row-menu": "", children: /* @__PURE__ */ jsx29(MoreHorizontal, {}) }) }),
4970
- /* @__PURE__ */ jsx29(Portal10, { children: /* @__PURE__ */ jsx29(Menu.Positioner, { children: /* @__PURE__ */ jsx29(Menu.Content, { minW: "48", maxW: "18rem", css: { "& [role=menuitem] svg": { width: "4", height: "4", flexShrink: 0 } }, children: items.map(
4971
- (e, i) => isSeparator(e) ? /* @__PURE__ */ jsx29(Menu.Separator, {}, `sep-${i}`) : isNote(e) ? /* @__PURE__ */ jsxs21(Fragment12, { children: [
4972
- /* @__PURE__ */ jsx29(Menu.Separator, {}),
5044
+ return /* @__PURE__ */ jsxs21(Menu2.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
5045
+ /* @__PURE__ */ jsx29(Menu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx29(IconButton, { "aria-label": label, size, variant: "ghost", color: "fg.muted", "data-row-menu": "", children: /* @__PURE__ */ jsx29(MoreHorizontal, {}) }) }),
5046
+ /* @__PURE__ */ jsx29(Portal10, { children: /* @__PURE__ */ jsx29(Menu2.Positioner, { children: /* @__PURE__ */ jsx29(Menu2.Content, { minW: "48", maxW: "18rem", css: { "& [role=menuitem] svg": { width: "4", height: "4", flexShrink: 0 } }, children: items.map(
5047
+ (e, i) => isSeparator(e) ? /* @__PURE__ */ jsx29(Menu2.Separator, {}, `sep-${i}`) : isNote(e) ? /* @__PURE__ */ jsxs21(Fragment12, { children: [
5048
+ /* @__PURE__ */ jsx29(Menu2.Separator, {}),
4973
5049
  /* @__PURE__ */ jsx29(Text8, { px: "2", py: "1.5", textStyle: "caption", color: "fg.muted", children: e.note })
4974
5050
  ] }, `note-${i}`) : /* @__PURE__ */ jsxs21(
4975
- Menu.Item,
5051
+ Menu2.Item,
4976
5052
  {
4977
5053
  value: e.id,
4978
5054
  disabled: e.disabled,
@@ -4992,7 +5068,7 @@ function RowMenu({ label, items, size = "sm" }) {
4992
5068
 
4993
5069
  // src/components/DataTable.tsx
4994
5070
  import { Fragment as Fragment13, useMemo as useMemo7, useRef as useRef11, useState as useState14 } from "react";
4995
- import { chakra as chakra18, Menu as Menu2, Portal as Portal11, Table, useSlotRecipe as useSlotRecipe3 } from "@chakra-ui/react";
5071
+ import { chakra as chakra18, Menu as Menu3, Portal as Portal11, Table, useSlotRecipe as useSlotRecipe3 } from "@chakra-ui/react";
4996
5072
  import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2, ChevronRight as ChevronRight2, ChevronsUpDown, GripVertical } from "lucide-react";
4997
5073
 
4998
5074
  // src/components/EmptyState.tsx
@@ -5862,7 +5938,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
5862
5938
  const place = move.place;
5863
5939
  const steps = place ? [prev && { value: UP, label: place.up }, next && { value: DOWN, label: place.down }].filter((x) => Boolean(x)) : [];
5864
5940
  return /* @__PURE__ */ jsxs25(
5865
- Menu2.Root,
5941
+ Menu3.Root,
5866
5942
  {
5867
5943
  lazyMount: true,
5868
5944
  unmountOnExit: true,
@@ -5873,7 +5949,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
5873
5949
  else move.onMove(row, e.value);
5874
5950
  },
5875
5951
  children: [
5876
- /* @__PURE__ */ jsx34(Menu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx34(
5952
+ /* @__PURE__ */ jsx34(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx34(
5877
5953
  chakra18.button,
5878
5954
  {
5879
5955
  type: "button",
@@ -5909,15 +5985,15 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
5909
5985
  children: /* @__PURE__ */ jsx34(GripVertical, {})
5910
5986
  }
5911
5987
  ) }),
5912
- /* @__PURE__ */ jsx34(Portal11, { children: /* @__PURE__ */ jsx34(Menu2.Positioner, { children: /* @__PURE__ */ jsxs25(Menu2.Content, { minW: "44", onClick: (e) => e.stopPropagation(), children: [
5913
- steps.length > 0 && /* @__PURE__ */ jsx34(Menu2.ItemGroup, { children: steps.map((x) => /* @__PURE__ */ jsxs25(Menu2.Item, { value: x.value, children: [
5988
+ /* @__PURE__ */ jsx34(Portal11, { children: /* @__PURE__ */ jsx34(Menu3.Positioner, { children: /* @__PURE__ */ jsxs25(Menu3.Content, { minW: "44", onClick: (e) => e.stopPropagation(), children: [
5989
+ steps.length > 0 && /* @__PURE__ */ jsx34(Menu3.ItemGroup, { children: steps.map((x) => /* @__PURE__ */ jsxs25(Menu3.Item, { value: x.value, children: [
5914
5990
  x.value === UP ? /* @__PURE__ */ jsx34(ArrowUp, {}) : /* @__PURE__ */ jsx34(ArrowDown, {}),
5915
5991
  x.label
5916
5992
  ] }, x.value)) }),
5917
- steps.length > 0 && targets.length > 0 && /* @__PURE__ */ jsx34(Menu2.Separator, {}),
5918
- targets.length > 0 && /* @__PURE__ */ jsxs25(Menu2.ItemGroup, { children: [
5919
- /* @__PURE__ */ jsx34(Menu2.ItemGroupLabel, { children: move.menuTitle }),
5920
- targets.map((x) => /* @__PURE__ */ jsx34(Menu2.Item, { value: x.group, children: x.label }, x.group))
5993
+ steps.length > 0 && targets.length > 0 && /* @__PURE__ */ jsx34(Menu3.Separator, {}),
5994
+ targets.length > 0 && /* @__PURE__ */ jsxs25(Menu3.ItemGroup, { children: [
5995
+ /* @__PURE__ */ jsx34(Menu3.ItemGroupLabel, { children: move.menuTitle }),
5996
+ targets.map((x) => /* @__PURE__ */ jsx34(Menu3.Item, { value: x.group, children: x.label }, x.group))
5921
5997
  ] })
5922
5998
  ] }) }) })
5923
5999
  ]
@@ -7052,34 +7128,71 @@ function PreviewCard({ media, title, subtitle, items = [] }) {
7052
7128
  ] });
7053
7129
  }
7054
7130
 
7131
+ // src/components/SaveBar.tsx
7132
+ import { useId as useId6 } from "react";
7133
+ import { Box as Box9, chakra as chakra27, Stack as Stack9, Text as Text13 } from "@chakra-ui/react";
7134
+ import { FilePen } from "lucide-react";
7135
+ import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
7136
+ var UNSAVED = "{count, plural, one {# change isn't saved yet} other {# changes aren't saved yet}}";
7137
+ function SaveBar({ open, onSave, onDiscard, count = 1, message, title, saveLabel, busy, saveDisabled }) {
7138
+ const labels = useAbpLabels();
7139
+ const { locale } = useAbpLocale();
7140
+ const heading = useId6();
7141
+ return /* @__PURE__ */ jsx45(Box9, { position: "fixed", insetInline: "0", bottom: "6", zIndex: "sticky", display: "flex", justifyContent: "center", px: "4", pointerEvents: "none", children: /* @__PURE__ */ jsx45(Presence, { show: open, from: "rise", maxW: "full", children: /* @__PURE__ */ jsxs33(
7142
+ chakra27.section,
7143
+ {
7144
+ "aria-labelledby": heading,
7145
+ "data-testid": "save-bar",
7146
+ pointerEvents: "auto",
7147
+ display: "flex",
7148
+ flexWrap: { base: "wrap", sm: "nowrap" },
7149
+ alignItems: "center",
7150
+ gap: "3",
7151
+ p: "2",
7152
+ borderRadius: "l3",
7153
+ bg: "bg.selected",
7154
+ color: "accent.fg",
7155
+ children: [
7156
+ /* @__PURE__ */ jsx45(Box9, { flex: "none", display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: "8", borderRadius: "l2", bg: "bg.panel", "aria-hidden": true, children: /* @__PURE__ */ jsx45(FilePen, { size: 18, strokeWidth: 1.75 }) }),
7157
+ /* @__PURE__ */ jsxs33(Stack9, { gap: "0", flex: "1", minW: { base: "0", sm: "11.25rem" }, me: { sm: "4" }, "aria-live": "polite", children: [
7158
+ /* @__PURE__ */ jsx45(Text13, { id: heading, textStyle: "body.sm", fontWeight: "bold", color: "fg", children: title ?? labels.saveBar ?? "Save your changes?" }),
7159
+ /* @__PURE__ */ jsx45(Text13, { textStyle: "caption", children: message ?? formatMessage(locale, labels.unsavedChanges ?? UNSAVED, { count }) })
7160
+ ] }),
7161
+ /* @__PURE__ */ jsx45(Button, { variant: "ghost", color: "accent.fg", fontWeight: "bold", _hover: { bg: "accent.emphasized" }, onClick: onDiscard, disabled: busy, children: labels.discard ?? "Discard" }),
7162
+ /* @__PURE__ */ jsx45(Button, { variant: "primary", onClick: onSave, loading: busy, disabled: saveDisabled, children: saveLabel ?? labels.save ?? "Save" })
7163
+ ]
7164
+ }
7165
+ ) }) });
7166
+ }
7167
+
7055
7168
  // src/settings/SettingsLayout.tsx
7056
7169
  import { useState as useState19 } from "react";
7057
- import { Text as Text13 } from "@chakra-ui/react";
7170
+ import { Text as Text14 } from "@chakra-ui/react";
7058
7171
 
7059
7172
  // src/components/SearchInput.tsx
7060
7173
  import { forwardRef as forwardRef7 } from "react";
7061
7174
  import { Input as Input5, InputGroup } from "@chakra-ui/react";
7062
7175
  import { Search as Search3 } from "lucide-react";
7063
- import { jsx as jsx45 } from "react/jsx-runtime";
7176
+ import { jsx as jsx46 } from "react/jsx-runtime";
7064
7177
  var SearchInput = forwardRef7(function SearchInput2({ size = "md", maxW, ...rest }, ref) {
7065
7178
  const skeleton = useLoading();
7066
- return /* @__PURE__ */ jsx45(
7179
+ return /* @__PURE__ */ jsx46(
7067
7180
  InputGroup,
7068
7181
  {
7069
- startElement: /* @__PURE__ */ jsx45(Search3, {}),
7182
+ startElement: /* @__PURE__ */ jsx46(Search3, {}),
7070
7183
  startOffset: "-0.25rem",
7071
7184
  startElementProps: { color: "fg.subtle", _icon: { boxSize: "4" } },
7072
7185
  maxW,
7073
7186
  borderRadius: "l2",
7074
7187
  "aria-hidden": skeleton || void 0,
7075
7188
  css: skeleton ? ghostCss : void 0,
7076
- children: /* @__PURE__ */ jsx45(Input5, { ref, type: "search", size, ...rest })
7189
+ children: /* @__PURE__ */ jsx46(Input5, { ref, type: "search", size, ...rest })
7077
7190
  }
7078
7191
  );
7079
7192
  });
7080
7193
 
7081
7194
  // src/settings/SettingsLayout.tsx
7082
- import { jsx as jsx46 } from "react/jsx-runtime";
7195
+ import { jsx as jsx47 } from "react/jsx-runtime";
7083
7196
  var isCurrent = (pathname, href) => pathname === href || pathname.startsWith(`${href}/`);
7084
7197
  function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav = [], children, ...shell }) {
7085
7198
  const [find, setFind] = useState19("");
@@ -7090,17 +7203,17 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
7090
7203
  items: pages.map((p) => ({ id: p.id, href: p.href, icon: p.icon, label: p.title, current: isCurrent(pathname, p.href) })).filter((i) => !q || i.label.toLocaleLowerCase().includes(q) || section.title.toLocaleLowerCase().includes(q))
7091
7204
  }));
7092
7205
  const found = !q || sections.some((s) => s.items.length > 0);
7093
- return /* @__PURE__ */ jsx46(
7206
+ return /* @__PURE__ */ jsx47(
7094
7207
  AppShell,
7095
7208
  {
7096
7209
  ...shell,
7097
7210
  topNav,
7098
7211
  sidebar: {
7099
7212
  id: sidebarId,
7100
- top: /* @__PURE__ */ jsx46(SearchInput, { size: "sm", value: find, onChange: (e) => setFind(e.target.value), placeholder: labels.find, "aria-label": labels.find }),
7213
+ top: /* @__PURE__ */ jsx47(SearchInput, { size: "sm", value: find, onChange: (e) => setFind(e.target.value), placeholder: labels.find, "aria-label": labels.find }),
7101
7214
  sections
7102
7215
  },
7103
- navFooter: !found ? /* @__PURE__ */ jsx46(Text13, { textStyle: "caption", color: "fg.muted", px: "2", children: labels.noSetting }) : void 0,
7216
+ navFooter: !found ? /* @__PURE__ */ jsx47(Text14, { textStyle: "caption", color: "fg.muted", px: "2", children: labels.noSetting }) : void 0,
7104
7217
  children
7105
7218
  }
7106
7219
  );
@@ -7108,7 +7221,7 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
7108
7221
 
7109
7222
  // src/components/SegmentedControl.tsx
7110
7223
  import { SegmentGroup } from "@chakra-ui/react";
7111
- import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
7224
+ import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
7112
7225
  function SegmentedControl({
7113
7226
  "aria-label": ariaLabel,
7114
7227
  items,
@@ -7120,7 +7233,7 @@ function SegmentedControl({
7120
7233
  }) {
7121
7234
  const loading = useLoading(own);
7122
7235
  const h = size === "sm" ? "7" : "8";
7123
- return /* @__PURE__ */ jsxs33(
7236
+ return /* @__PURE__ */ jsxs34(
7124
7237
  SegmentGroup.Root,
7125
7238
  {
7126
7239
  size: size === "sm" ? "sm" : "md",
@@ -7137,8 +7250,8 @@ function SegmentedControl({
7137
7250
  w: fitted ? "full" : void 0,
7138
7251
  "data-segmented": "",
7139
7252
  children: [
7140
- /* @__PURE__ */ jsx47(SegmentGroup.Indicator, {}),
7141
- items.map((item) => /* @__PURE__ */ jsxs33(
7253
+ /* @__PURE__ */ jsx48(SegmentGroup.Indicator, {}),
7254
+ items.map((item) => /* @__PURE__ */ jsxs34(
7142
7255
  SegmentGroup.Item,
7143
7256
  {
7144
7257
  value: item.value,
@@ -7159,9 +7272,9 @@ function SegmentedControl({
7159
7272
  _icon: { boxSize: "4", flexShrink: 0 },
7160
7273
  children: [
7161
7274
  item.icon,
7162
- /* @__PURE__ */ jsx47(SegmentGroup.ItemText, { children: item.label }),
7163
- item.count != null && /* @__PURE__ */ jsx47(CountBadge, { value: item.count, tone: item.value === value ? "accent" : "neutral" }),
7164
- /* @__PURE__ */ jsx47(SegmentGroup.ItemHiddenInput, {})
7275
+ /* @__PURE__ */ jsx48(SegmentGroup.ItemText, { children: item.label }),
7276
+ item.count != null && /* @__PURE__ */ jsx48(CountBadge, { value: item.count, tone: item.value === value ? "accent" : "neutral" }),
7277
+ /* @__PURE__ */ jsx48(SegmentGroup.ItemHiddenInput, {})
7165
7278
  ]
7166
7279
  },
7167
7280
  item.value
@@ -7173,7 +7286,7 @@ function SegmentedControl({
7173
7286
 
7174
7287
  // src/components/KanbanBoard.tsx
7175
7288
  import { useEffect as useEffect14, useLayoutEffect as useLayoutEffect3, useMemo as useMemo10, useRef as useRef17, useState as useState20 } from "react";
7176
- import { Box as Box9, chakra as chakra27, HStack as HStack9, Stack as Stack9, Text as Text14 } from "@chakra-ui/react";
7289
+ import { Box as Box10, chakra as chakra28, HStack as HStack9, Stack as Stack10, Text as Text15 } from "@chakra-ui/react";
7177
7290
  import { Check as Check2, ChevronsLeft, ChevronsRight, GripVertical as GripVertical3 } from "lucide-react";
7178
7291
  import {
7179
7292
  DndContext as DndContext2,
@@ -7209,13 +7322,13 @@ function between(cell, from, to) {
7209
7322
  }
7210
7323
 
7211
7324
  // src/components/KanbanBoard.tsx
7212
- import { Fragment as Fragment17, jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
7325
+ import { Fragment as Fragment17, jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
7213
7326
  var SKELETON_CARDS = [3, 2, 4, 1, 2];
7214
7327
  function PlaceholderCard({ index }) {
7215
- return /* @__PURE__ */ jsxs34(Box9, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
7216
- /* @__PURE__ */ jsx48(Box9, { mb: "1", children: /* @__PURE__ */ jsx48(RecordKey, { loading: true }) }),
7217
- /* @__PURE__ */ jsx48(Text14, { textStyle: "body.sm", children: /* @__PURE__ */ jsx48(TextBone, { width: boneWidth(index, 14, 34) }) }),
7218
- /* @__PURE__ */ jsx48(HStack9, { mt: "2", children: /* @__PURE__ */ jsx48(StatusPill, { loading: true, skeletonWidth: boneWidth(index, 5, 9) }) })
7328
+ return /* @__PURE__ */ jsxs35(Box10, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
7329
+ /* @__PURE__ */ jsx49(Box10, { mb: "1", children: /* @__PURE__ */ jsx49(RecordKey, { loading: true }) }),
7330
+ /* @__PURE__ */ jsx49(Text15, { textStyle: "body.sm", children: /* @__PURE__ */ jsx49(TextBone, { width: boneWidth(index, 14, 34) }) }),
7331
+ /* @__PURE__ */ jsx49(HStack9, { mt: "2", children: /* @__PURE__ */ jsx49(StatusPill, { loading: true, skeletonWidth: boneWidth(index, 5, 9) }) })
7219
7332
  ] });
7220
7333
  }
7221
7334
  var cellId = (lane, column) => `cell:${lane}::${column}`;
@@ -7261,7 +7374,7 @@ function KanbanBoard({
7261
7374
  ids.splice(to, 0, id);
7262
7375
  onReorderColumns(ids);
7263
7376
  };
7264
- const shownColumns = loading && columns.length === 0 ? Array.from({ length: skeletonColumns }, (_, n) => ({ id: `skeleton-${n}`, title: /* @__PURE__ */ jsx48(TextBone, { width: boneWidth(n, 6, 12) }) })) : columns;
7377
+ const shownColumns = loading && columns.length === 0 ? Array.from({ length: skeletonColumns }, (_, n) => ({ id: `skeleton-${n}`, title: /* @__PURE__ */ jsx49(TextBone, { width: boneWidth(n, 6, 12) }) })) : columns;
7265
7378
  const rows2 = lanes && lanes.length > 0 ? lanes : [{ id: "", title: null }];
7266
7379
  const sensors = useSensors2(
7267
7380
  useSensor2(PointerSensor2, { activationConstraint: { distance: 6 } }),
@@ -7373,7 +7486,7 @@ function KanbanBoard({
7373
7486
  document.addEventListener("keydown", key);
7374
7487
  return () => document.removeEventListener("keydown", key);
7375
7488
  }, [onSelect, selected, active]);
7376
- return /* @__PURE__ */ jsxs34(
7489
+ return /* @__PURE__ */ jsxs35(
7377
7490
  DndContext2,
7378
7491
  {
7379
7492
  sensors,
@@ -7386,8 +7499,8 @@ function KanbanBoard({
7386
7499
  },
7387
7500
  accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
7388
7501
  children: [
7389
- /* @__PURE__ */ jsx48(
7390
- Box9,
7502
+ /* @__PURE__ */ jsx49(
7503
+ Box10,
7391
7504
  {
7392
7505
  ref: region,
7393
7506
  role: "region",
@@ -7399,8 +7512,8 @@ function KanbanBoard({
7399
7512
  if (Date.now() - draggedAt.current < 300) return;
7400
7513
  if (e.target instanceof Element && !e.target.closest("[data-card], a, button, input, select, textarea")) clear();
7401
7514
  },
7402
- children: /* @__PURE__ */ jsx48(Loading, { when: loading, children: /* @__PURE__ */ jsxs34(
7403
- Box9,
7515
+ children: /* @__PURE__ */ jsx49(Loading, { when: loading, children: /* @__PURE__ */ jsxs35(
7516
+ Box10,
7404
7517
  {
7405
7518
  display: "grid",
7406
7519
  gridTemplateColumns: shownColumns.map((c2) => folded.has(c2.id) ? "3rem" : "minmax(288px, 1fr)").join(" "),
@@ -7410,8 +7523,8 @@ function KanbanBoard({
7410
7523
  shownColumns.map((c2) => {
7411
7524
  const isFolded = folded.has(c2.id);
7412
7525
  const name = c2.name ?? (typeof c2.title === "string" ? c2.title : c2.id);
7413
- return /* @__PURE__ */ jsxs34(
7414
- Box9,
7526
+ return /* @__PURE__ */ jsxs35(
7527
+ Box10,
7415
7528
  {
7416
7529
  position: "sticky",
7417
7530
  top: "0",
@@ -7435,8 +7548,8 @@ function KanbanBoard({
7435
7548
  }
7436
7549
  } : {},
7437
7550
  children: [
7438
- overColumn === c2.id && movingColumn && movingColumn !== c2.id && /* @__PURE__ */ jsx48(
7439
- Box9,
7551
+ overColumn === c2.id && movingColumn && movingColumn !== c2.id && /* @__PURE__ */ jsx49(
7552
+ Box10,
7440
7553
  {
7441
7554
  position: "absolute",
7442
7555
  inset: "0",
@@ -7452,11 +7565,11 @@ function KanbanBoard({
7452
7565
  roundedTop: "l3",
7453
7566
  bg: "bg.panel",
7454
7567
  "data-drop-column": "",
7455
- children: /* @__PURE__ */ jsx48(Text14, { textStyle: "caption", fontWeight: "bold", color: "fg.accent", truncate: true, children: dropColumnLabel(movingName) })
7568
+ children: /* @__PURE__ */ jsx49(Text15, { textStyle: "caption", fontWeight: "bold", color: "fg.accent", truncate: true, children: dropColumnLabel(movingName) })
7456
7569
  }
7457
7570
  ),
7458
- isFolded ? /* @__PURE__ */ jsx48(
7459
- Stack9,
7571
+ isFolded ? /* @__PURE__ */ jsx49(
7572
+ Stack10,
7460
7573
  {
7461
7574
  align: "center",
7462
7575
  gap: "2",
@@ -7468,9 +7581,9 @@ function KanbanBoard({
7468
7581
  roundedTop: "l3",
7469
7582
  bg: c2.over ? "red.subtle" : "bg.subtle",
7470
7583
  h: "full",
7471
- children: /* @__PURE__ */ jsx48(FoldButton, { folded: true, label: foldLabel(name, true), onClick: () => fold(c2.id) })
7584
+ children: /* @__PURE__ */ jsx49(FoldButton, { folded: true, label: foldLabel(name, true), onClick: () => fold(c2.id) })
7472
7585
  }
7473
- ) : /* @__PURE__ */ jsxs34(
7586
+ ) : /* @__PURE__ */ jsxs35(
7474
7587
  HStack9,
7475
7588
  {
7476
7589
  justify: "space-between",
@@ -7487,8 +7600,8 @@ function KanbanBoard({
7487
7600
  h: "full",
7488
7601
  align: "start",
7489
7602
  children: [
7490
- /* @__PURE__ */ jsxs34(HStack9, { gap: "2", minW: "0", children: [
7491
- onReorderColumns && !loading && /* @__PURE__ */ jsx48(
7603
+ /* @__PURE__ */ jsxs35(HStack9, { gap: "2", minW: "0", children: [
7604
+ onReorderColumns && !loading && /* @__PURE__ */ jsx49(
7492
7605
  ColumnGrip,
7493
7606
  {
7494
7607
  label: reorderLabel(name, columns.findIndex((x) => x.id === c2.id) + 1, columns.length),
@@ -7501,11 +7614,11 @@ function KanbanBoard({
7501
7614
  onStep: (by) => reorder(c2.id, columns.findIndex((x) => x.id === c2.id) + by)
7502
7615
  }
7503
7616
  ),
7504
- /* @__PURE__ */ jsx48(Text14, { as: "span", textStyle: "label", truncate: true, display: "inline-flex", minW: "0", children: c2.title }),
7505
- c2.count != null && /* @__PURE__ */ jsx48(CountBadge, { value: c2.count }),
7506
- c2.meta && /* @__PURE__ */ jsx48(Text14, { textStyle: "caption", color: c2.over ? "fg.error" : "fg.muted", flexShrink: 0, children: c2.meta })
7617
+ /* @__PURE__ */ jsx49(Text15, { as: "span", textStyle: "label", truncate: true, display: "inline-flex", minW: "0", children: c2.title }),
7618
+ c2.count != null && /* @__PURE__ */ jsx49(CountBadge, { value: c2.count }),
7619
+ c2.meta && /* @__PURE__ */ jsx49(Text15, { textStyle: "caption", color: c2.over ? "fg.error" : "fg.muted", flexShrink: 0, children: c2.meta })
7507
7620
  ] }),
7508
- !loading && /* @__PURE__ */ jsx48(FoldButton, { folded: false, label: foldLabel(name, false), onClick: () => fold(c2.id) })
7621
+ !loading && /* @__PURE__ */ jsx49(FoldButton, { folded: false, label: foldLabel(name, false), onClick: () => fold(c2.id) })
7509
7622
  ]
7510
7623
  }
7511
7624
  )
@@ -7514,20 +7627,20 @@ function KanbanBoard({
7514
7627
  c2.id
7515
7628
  );
7516
7629
  }),
7517
- rows2.map((lane) => /* @__PURE__ */ jsx48(LaneRow, { lane, showTitle: !!lanes && lanes.length > 0, columns: shownColumns, span: shownColumns.length, children: shownColumns.map((c2, ci2) => {
7630
+ rows2.map((lane) => /* @__PURE__ */ jsx49(LaneRow, { lane, showTitle: !!lanes && lanes.length > 0, columns: shownColumns, span: shownColumns.length, children: shownColumns.map((c2, ci2) => {
7518
7631
  const id = cellId(lane.id, c2.id);
7519
7632
  const list = byCell.get(id) ?? [];
7520
7633
  const allowed = active ? canDrop?.(active, c2.id, lane.id) !== false : true;
7521
7634
  const last = lane.id === rows2[rows2.length - 1].id;
7522
7635
  if (folded.has(c2.id)) {
7523
- return /* @__PURE__ */ jsxs34(Cell, { id, allowed, dragging: !!active, items: [], column: c2.id, lane: lane.id, folded: true, last, children: [
7524
- lane.id === rows2[0].id && c2.count != null && /* @__PURE__ */ jsx48(Box9, { alignSelf: "center", children: /* @__PURE__ */ jsx48(CountBadge, { value: c2.count }) }),
7525
- lane.id === rows2[0].id && /* @__PURE__ */ jsx48(Box9, { css: { writingMode: "vertical-rl" }, alignSelf: "center", maxH: "56", overflow: "hidden", textStyle: "sm", title: c2.name, children: c2.title })
7636
+ return /* @__PURE__ */ jsxs35(Cell, { id, allowed, dragging: !!active, items: [], column: c2.id, lane: lane.id, folded: true, last, children: [
7637
+ lane.id === rows2[0].id && c2.count != null && /* @__PURE__ */ jsx49(Box10, { alignSelf: "center", children: /* @__PURE__ */ jsx49(CountBadge, { value: c2.count }) }),
7638
+ lane.id === rows2[0].id && /* @__PURE__ */ jsx49(Box10, { css: { writingMode: "vertical-rl" }, alignSelf: "center", maxH: "56", overflow: "hidden", textStyle: "sm", title: c2.name, children: c2.title })
7526
7639
  ] }, id);
7527
7640
  }
7528
7641
  const footer = last && !loading ? columnFooter?.(c2.id) : null;
7529
- return /* @__PURE__ */ jsxs34(Cell, { id, allowed, dragging: !!active, items: list.map((i) => i.id), column: c2.id, lane: lane.id, last, children: [
7530
- list.map((item) => /* @__PURE__ */ jsx48(
7642
+ return /* @__PURE__ */ jsxs35(Cell, { id, allowed, dragging: !!active, items: list.map((i) => i.id), column: c2.id, lane: lane.id, last, children: [
7643
+ list.map((item) => /* @__PURE__ */ jsx49(
7531
7644
  SortableCard,
7532
7645
  {
7533
7646
  id: item.id,
@@ -7539,8 +7652,8 @@ function KanbanBoard({
7539
7652
  item.id
7540
7653
  )),
7541
7654
  loading && list.length === 0 && // Not the board's cards: no data-slide, and not in its placement (ADR 0058's slides skip them).
7542
- Array.from({ length: SKELETON_CARDS[ci2 % SKELETON_CARDS.length] }, (_, n) => /* @__PURE__ */ jsx48(Box9, { "aria-hidden": "true", children: skeletonCard ? skeletonCard(ci2 * 5 + n) : /* @__PURE__ */ jsx48(PlaceholderCard, { index: ci2 * 5 + n }) }, `skeleton-${n}`)),
7543
- !loading && list.length === 0 && empty && (typeof empty === "function" ? /* @__PURE__ */ jsx48(EmptyState, { size: "xs", ...empty(c2.id) }) : /* @__PURE__ */ jsx48(EmptyState, { size: "xs", title: empty })),
7655
+ Array.from({ length: SKELETON_CARDS[ci2 % SKELETON_CARDS.length] }, (_, n) => /* @__PURE__ */ jsx49(Box10, { "aria-hidden": "true", children: skeletonCard ? skeletonCard(ci2 * 5 + n) : /* @__PURE__ */ jsx49(PlaceholderCard, { index: ci2 * 5 + n }) }, `skeleton-${n}`)),
7656
+ !loading && list.length === 0 && empty && (typeof empty === "function" ? /* @__PURE__ */ jsx49(EmptyState, { size: "xs", ...empty(c2.id) }) : /* @__PURE__ */ jsx49(EmptyState, { size: "xs", title: empty })),
7544
7657
  footer
7545
7658
  ] }, id);
7546
7659
  }) }, lane.id))
@@ -7549,24 +7662,24 @@ function KanbanBoard({
7549
7662
  ) })
7550
7663
  }
7551
7664
  ),
7552
- /* @__PURE__ */ jsx48(DragOverlay2, { dropAnimation: reduce ? null : landing, children: active ? /* @__PURE__ */ jsx48(Lifted, { carried: carried.length, reduce, count: carried.length > 1 ? carrying ? carrying(carried.length) : String(carried.length) : void 0, children: renderCard(active, { dragging: true }) }) : null })
7665
+ /* @__PURE__ */ jsx49(DragOverlay2, { dropAnimation: reduce ? null : landing, children: active ? /* @__PURE__ */ jsx49(Lifted, { carried: carried.length, reduce, count: carried.length > 1 ? carrying ? carrying(carried.length) : String(carried.length) : void 0, children: renderCard(active, { dragging: true }) }) : null })
7553
7666
  ]
7554
7667
  }
7555
7668
  );
7556
7669
  }
7557
7670
  function LaneRow({ lane, showTitle, span, children }) {
7558
- return /* @__PURE__ */ jsxs34(Fragment17, { children: [
7559
- showTitle && /* @__PURE__ */ jsxs34(HStack9, { gridColumn: `1 / span ${span}`, gap: "2", pt: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-lane": lane.id, children: [
7560
- /* @__PURE__ */ jsx48(Text14, { textStyle: "label", children: lane.title }),
7561
- lane.meta && /* @__PURE__ */ jsx48(Text14, { textStyle: "caption", color: "fg.muted", children: lane.meta })
7671
+ return /* @__PURE__ */ jsxs35(Fragment17, { children: [
7672
+ showTitle && /* @__PURE__ */ jsxs35(HStack9, { gridColumn: `1 / span ${span}`, gap: "2", pt: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-lane": lane.id, children: [
7673
+ /* @__PURE__ */ jsx49(Text15, { textStyle: "label", children: lane.title }),
7674
+ lane.meta && /* @__PURE__ */ jsx49(Text15, { textStyle: "caption", color: "fg.muted", children: lane.meta })
7562
7675
  ] }),
7563
7676
  children
7564
7677
  ] });
7565
7678
  }
7566
7679
  function Cell({ id, items, allowed, dragging, column, lane, folded = false, last = true, children }) {
7567
7680
  const { setNodeRef, isOver } = useDroppable2({ id, disabled: !allowed });
7568
- return /* @__PURE__ */ jsx48(SortableContext, { id, items, strategy: verticalListSortingStrategy, children: /* @__PURE__ */ jsx48(
7569
- Stack9,
7681
+ return /* @__PURE__ */ jsx49(SortableContext, { id, items, strategy: verticalListSortingStrategy, children: /* @__PURE__ */ jsx49(
7682
+ Stack10,
7570
7683
  {
7571
7684
  ref: setNodeRef,
7572
7685
  gap: "2",
@@ -7594,8 +7707,8 @@ function SortableCard({
7594
7707
  children
7595
7708
  }) {
7596
7709
  const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable({ id, animateLayoutChanges: () => false });
7597
- return /* @__PURE__ */ jsxs34(
7598
- Box9,
7710
+ return /* @__PURE__ */ jsxs35(
7711
+ Box10,
7599
7712
  {
7600
7713
  ref: setNodeRef,
7601
7714
  position: "relative",
@@ -7613,8 +7726,8 @@ function SortableCard({
7613
7726
  cursor: "grab",
7614
7727
  _focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", rounded: "l2" },
7615
7728
  children: [
7616
- /* @__PURE__ */ jsx48(Box9, { "data-slide": id, children: children(isDragging) }),
7617
- selected && !isDragging && !riding && /* @__PURE__ */ jsx48(Mark, {})
7729
+ /* @__PURE__ */ jsx49(Box10, { "data-slide": id, children: children(isDragging) }),
7730
+ selected && !isDragging && !riding && /* @__PURE__ */ jsx49(Mark, {})
7618
7731
  ]
7619
7732
  }
7620
7733
  );
@@ -7642,9 +7755,9 @@ function Lifted({ carried, count, reduce, children }) {
7642
7755
  held.current?.animate?.([{ transform: "none", boxShadow: tv("shadows.sm") }, { transform: HELD, boxShadow: tv("shadows.xl") }], { duration: 160, easing: OUT2 });
7643
7756
  }, []);
7644
7757
  const layers = Math.min(2, Math.max(0, carried - 1));
7645
- return /* @__PURE__ */ jsxs34(Box9, { position: "relative", cursor: "grabbing", "data-testid": "drag-preview", children: [
7646
- Array.from({ length: layers }, (_, i) => /* @__PURE__ */ jsx48(
7647
- Box9,
7758
+ return /* @__PURE__ */ jsxs35(Box10, { position: "relative", cursor: "grabbing", "data-testid": "drag-preview", children: [
7759
+ Array.from({ length: layers }, (_, i) => /* @__PURE__ */ jsx49(
7760
+ Box10,
7648
7761
  {
7649
7762
  "data-layer": true,
7650
7763
  position: "absolute",
@@ -7658,8 +7771,8 @@ function Lifted({ carried, count, reduce, children }) {
7658
7771
  },
7659
7772
  i
7660
7773
  )),
7661
- /* @__PURE__ */ jsx48(Box9, { ref: held, "data-held": true, rounded: "l2", shadow: reduce ? "lg" : "xl", style: { transform: reduce ? void 0 : HELD, transformOrigin: "50% 40%" }, children }),
7662
- count != null && /* @__PURE__ */ jsx48(Count, { children: count })
7774
+ /* @__PURE__ */ jsx49(Box10, { ref: held, "data-held": true, rounded: "l2", shadow: reduce ? "lg" : "xl", style: { transform: reduce ? void 0 : HELD, transformOrigin: "50% 40%" }, children }),
7775
+ count != null && /* @__PURE__ */ jsx49(Count, { children: count })
7663
7776
  ] });
7664
7777
  }
7665
7778
  function Mark() {
@@ -7672,8 +7785,8 @@ function Mark() {
7672
7785
  easing: OUT2
7673
7786
  });
7674
7787
  }, []);
7675
- return /* @__PURE__ */ jsx48(
7676
- chakra27.span,
7788
+ return /* @__PURE__ */ jsx49(
7789
+ chakra28.span,
7677
7790
  {
7678
7791
  ref,
7679
7792
  position: "absolute",
@@ -7689,13 +7802,13 @@ function Mark() {
7689
7802
  pointerEvents: "none",
7690
7803
  "aria-hidden": "true",
7691
7804
  _icon: { boxSize: "3" },
7692
- children: /* @__PURE__ */ jsx48(Check2, { strokeWidth: 3 })
7805
+ children: /* @__PURE__ */ jsx49(Check2, { strokeWidth: 3 })
7693
7806
  }
7694
7807
  );
7695
7808
  }
7696
7809
  function Count({ children }) {
7697
- return /* @__PURE__ */ jsx48(
7698
- chakra27.span,
7810
+ return /* @__PURE__ */ jsx49(
7811
+ chakra28.span,
7699
7812
  {
7700
7813
  position: "absolute",
7701
7814
  top: "-3.5",
@@ -7717,8 +7830,8 @@ function Count({ children }) {
7717
7830
  );
7718
7831
  }
7719
7832
  function FoldButton({ folded, label, onClick }) {
7720
- return /* @__PURE__ */ jsx48(
7721
- chakra27.button,
7833
+ return /* @__PURE__ */ jsx49(
7834
+ chakra28.button,
7722
7835
  {
7723
7836
  type: "button",
7724
7837
  display: "inline-flex",
@@ -7738,7 +7851,7 @@ function FoldButton({ folded, label, onClick }) {
7738
7851
  title: label,
7739
7852
  "aria-expanded": !folded,
7740
7853
  onClick,
7741
- children: /* @__PURE__ */ jsx48(DirectionalIcon, { children: folded ? /* @__PURE__ */ jsx48(ChevronsRight, { size: 16 }) : /* @__PURE__ */ jsx48(ChevronsLeft, { size: 16 }) })
7854
+ children: /* @__PURE__ */ jsx49(DirectionalIcon, { children: folded ? /* @__PURE__ */ jsx49(ChevronsRight, { size: 16 }) : /* @__PURE__ */ jsx49(ChevronsLeft, { size: 16 }) })
7742
7855
  }
7743
7856
  );
7744
7857
  }
@@ -7768,8 +7881,8 @@ function useFolded(key) {
7768
7881
  return [folded, fold];
7769
7882
  }
7770
7883
  function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
7771
- return /* @__PURE__ */ jsx48(
7772
- chakra27.button,
7884
+ return /* @__PURE__ */ jsx49(
7885
+ chakra28.button,
7773
7886
  {
7774
7887
  type: "button",
7775
7888
  draggable: true,
@@ -7802,27 +7915,27 @@ function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
7802
7915
  onDragStart();
7803
7916
  },
7804
7917
  onDragEnd,
7805
- children: /* @__PURE__ */ jsx48(GripVertical3, {})
7918
+ children: /* @__PURE__ */ jsx49(GripVertical3, {})
7806
7919
  }
7807
7920
  );
7808
7921
  }
7809
7922
 
7810
7923
  // src/components/LoadingState.tsx
7811
- import { Box as Box10, VisuallyHidden as VisuallyHidden2 } from "@chakra-ui/react";
7812
- import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
7924
+ import { Box as Box11, VisuallyHidden as VisuallyHidden2 } from "@chakra-ui/react";
7925
+ import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
7813
7926
  function LoadingState({ lines = 3, label }) {
7814
7927
  const labels = useAbpLabels();
7815
- return /* @__PURE__ */ jsxs35(Box10, { "aria-busy": "true", role: "status", children: [
7816
- /* @__PURE__ */ jsx49(VisuallyHidden2, { children: label ?? labels.loading }),
7817
- /* @__PURE__ */ jsx49(TextBone, { lines, width: "full" })
7928
+ return /* @__PURE__ */ jsxs36(Box11, { "aria-busy": "true", role: "status", children: [
7929
+ /* @__PURE__ */ jsx50(VisuallyHidden2, { children: label ?? labels.loading }),
7930
+ /* @__PURE__ */ jsx50(TextBone, { lines, width: "full" })
7818
7931
  ] });
7819
7932
  }
7820
7933
 
7821
7934
  // src/components/PageHeader.tsx
7822
7935
  import { Fragment as Fragment18 } from "react";
7823
- import { Breadcrumb, chakra as chakra28, Menu as Menu3, Portal as Portal13, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
7936
+ import { Breadcrumb, chakra as chakra29, Menu as Menu4, Portal as Portal13, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
7824
7937
  import { ChevronRight as ChevronRight3 } from "lucide-react";
7825
- import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
7938
+ import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
7826
7939
  var textOf = (label) => typeof label === "string" || typeof label === "number" ? String(label) : void 0;
7827
7940
  function PageHeader({ title, description, breadcrumbs, meta, count, adornments, actions, loading: own, titleWidth = 24, documentTitle }) {
7828
7941
  const recipe = useSlotRecipe4({ key: "abpPageHeader" });
@@ -7831,33 +7944,33 @@ function PageHeader({ title, description, breadcrumbs, meta, count, adornments,
7831
7944
  usePageTitle(documentTitle !== void 0 ? documentTitle : text ? [text, where] : null);
7832
7945
  const styles = recipe({});
7833
7946
  const loading = useLoading(own);
7834
- return /* @__PURE__ */ jsxs36(chakra28.div, { css: styles.root, children: [
7835
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx50(Breadcrumbs, { items: breadcrumbs }),
7836
- /* @__PURE__ */ jsxs36(chakra28.div, { css: styles.row, children: [
7837
- /* @__PURE__ */ jsxs36(chakra28.div, { css: styles.titleGroup, children: [
7838
- count != null || adornments != null ? /* @__PURE__ */ jsxs36(chakra28.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
7839
- /* @__PURE__ */ jsx50(chakra28.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx50(TextBone, { width: titleWidth }) : title }),
7840
- count != null && /* @__PURE__ */ jsx50(CountBadge, { value: count, size: "md" }),
7947
+ return /* @__PURE__ */ jsxs37(chakra29.div, { css: styles.root, children: [
7948
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx51(Breadcrumbs, { items: breadcrumbs }),
7949
+ /* @__PURE__ */ jsxs37(chakra29.div, { css: styles.row, children: [
7950
+ /* @__PURE__ */ jsxs37(chakra29.div, { css: styles.titleGroup, children: [
7951
+ count != null || adornments != null ? /* @__PURE__ */ jsxs37(chakra29.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
7952
+ /* @__PURE__ */ jsx51(chakra29.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx51(TextBone, { width: titleWidth }) : title }),
7953
+ count != null && /* @__PURE__ */ jsx51(CountBadge, { value: count, size: "md" }),
7841
7954
  adornments
7842
- ] }) : /* @__PURE__ */ jsx50(chakra28.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx50(TextBone, { width: titleWidth }) : title }),
7843
- meta != null && /* @__PURE__ */ jsx50(chakra28.div, { css: styles.meta, children: meta }),
7844
- description != null && /* @__PURE__ */ jsx50(chakra28.p, { css: styles.description, children: description })
7955
+ ] }) : /* @__PURE__ */ jsx51(chakra29.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx51(TextBone, { width: titleWidth }) : title }),
7956
+ meta != null && /* @__PURE__ */ jsx51(chakra29.div, { css: styles.meta, children: meta }),
7957
+ description != null && /* @__PURE__ */ jsx51(chakra29.p, { css: styles.description, children: description })
7845
7958
  ] }),
7846
- actions != null && /* @__PURE__ */ jsx50(chakra28.div, { css: styles.actions, children: actions })
7959
+ actions != null && /* @__PURE__ */ jsx51(chakra29.div, { css: styles.actions, children: actions })
7847
7960
  ] })
7848
7961
  ] });
7849
7962
  }
7850
7963
  function Breadcrumbs({ items, loading: own }) {
7851
7964
  const labels = useAbpLabels();
7852
7965
  const loading = useLoading(own);
7853
- const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx50(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
7966
+ const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx51(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
7854
7967
  const Link = useLinkComponent();
7855
7968
  const { shown, hidden } = foldBreadcrumbs(items);
7856
- return /* @__PURE__ */ jsx50(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx50(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs36(Fragment18, { children: [
7857
- n > 0 && /* @__PURE__ */ jsx50(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx50(ChevronRight3, {}) }),
7858
- entry == null ? /* @__PURE__ */ jsx50(Breadcrumb.Item, { children: /* @__PURE__ */ jsxs36(Menu3.Root, { positioning: { placement: "bottom-start" }, children: [
7859
- /* @__PURE__ */ jsx50(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx50(
7860
- chakra28.button,
7969
+ return /* @__PURE__ */ jsx51(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx51(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs37(Fragment18, { children: [
7970
+ n > 0 && /* @__PURE__ */ jsx51(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx51(ChevronRight3, {}) }),
7971
+ entry == null ? /* @__PURE__ */ jsx51(Breadcrumb.Item, { children: /* @__PURE__ */ jsxs37(Menu4.Root, { positioning: { placement: "bottom-start" }, children: [
7972
+ /* @__PURE__ */ jsx51(Menu4.Trigger, { asChild: true, children: /* @__PURE__ */ jsx51(
7973
+ chakra29.button,
7861
7974
  {
7862
7975
  type: "button",
7863
7976
  px: "1",
@@ -7871,74 +7984,108 @@ function Breadcrumbs({ items, loading: own }) {
7871
7984
  children: "\u2026"
7872
7985
  }
7873
7986
  ) }),
7874
- /* @__PURE__ */ jsx50(Portal13, { children: /* @__PURE__ */ jsx50(Menu3.Positioner, { children: /* @__PURE__ */ jsx50(Menu3.Content, { minW: "40", children: hidden.map((h, k) => /* @__PURE__ */ jsx50(Menu3.Item, { value: String(k), asChild: Boolean(h.href), children: h.href ? /* @__PURE__ */ jsx50(Link, { href: h.href, children: h.label }) : /* @__PURE__ */ jsx50("span", { children: h.label }) }, k)) }) }) })
7875
- ] }) }) : /* @__PURE__ */ jsx50(Breadcrumb.Item, { children: entry.item.href && entry.index < items.length - 1 ? /* @__PURE__ */ jsx50(Breadcrumb.Link, { asChild: true, children: /* @__PURE__ */ jsx50(Link, { href: entry.item.href, children: label(entry.item, entry.index) }) }) : /* @__PURE__ */ jsx50(Breadcrumb.CurrentLink, { children: label(entry.item, entry.index) }) })
7987
+ /* @__PURE__ */ jsx51(Portal13, { children: /* @__PURE__ */ jsx51(Menu4.Positioner, { children: /* @__PURE__ */ jsx51(Menu4.Content, { minW: "40", children: hidden.map((h, k) => /* @__PURE__ */ jsx51(Menu4.Item, { value: String(k), asChild: Boolean(h.href), children: h.href ? /* @__PURE__ */ jsx51(Link, { href: h.href, children: h.label }) : /* @__PURE__ */ jsx51("span", { children: h.label }) }, k)) }) }) })
7988
+ ] }) }) : /* @__PURE__ */ jsx51(Breadcrumb.Item, { children: entry.item.href && entry.index < items.length - 1 ? /* @__PURE__ */ jsx51(Breadcrumb.Link, { asChild: true, children: /* @__PURE__ */ jsx51(Link, { href: entry.item.href, children: label(entry.item, entry.index) }) }) : /* @__PURE__ */ jsx51(Breadcrumb.CurrentLink, { children: label(entry.item, entry.index) }) })
7876
7989
  ] }, entry ? entry.index : "more")) }) });
7877
7990
  }
7878
7991
 
7879
7992
  // src/components/Panel.tsx
7880
- import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11 } from "react";
7881
- import { chakra as chakra29, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
7882
- import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
7993
+ import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11, useId as useId7, useState as useState21 } from "react";
7994
+ import { chakra as chakra30, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
7995
+ import { ChevronRight as ChevronRight4 } from "lucide-react";
7996
+ import { Fragment as Fragment19, jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
7883
7997
  var ToneContext = createContext11("card");
7884
7998
  function PanelTone({ tone, children }) {
7885
- return /* @__PURE__ */ jsx51(ToneContext.Provider, { value: tone, children });
7999
+ return /* @__PURE__ */ jsx52(ToneContext.Provider, { value: tone, children });
7886
8000
  }
7887
- var Panel = forwardRef8(function Panel2({ title, description, actions, footer, flush = false, headingAs = "h2", loading, tone, children, css, ...rest }, ref) {
8001
+ var Panel = forwardRef8(function Panel2({
8002
+ title,
8003
+ description,
8004
+ actions,
8005
+ footer,
8006
+ flush = false,
8007
+ headingAs = "h2",
8008
+ loading,
8009
+ tone,
8010
+ collapsible = false,
8011
+ defaultCollapsed = false,
8012
+ collapsed: collapsedProp,
8013
+ onCollapsedChange,
8014
+ summary,
8015
+ children,
8016
+ css,
8017
+ ...rest
8018
+ }, ref) {
7888
8019
  const recipe = useSlotRecipe5({ key: "abpPanel" });
7889
8020
  const inherited = useContext11(ToneContext);
7890
- const styles = recipe({ flush, tone: tone ?? inherited });
8021
+ const [ownCollapsed, setOwnCollapsed] = useState21(defaultCollapsed);
8022
+ const folded = collapsible && (collapsedProp ?? ownCollapsed);
8023
+ const styles = recipe({ flush, tone: tone ?? inherited, collapsed: folded });
8024
+ const bodyId = useId7();
7891
8025
  const hasHeader = title != null || actions != null || description != null;
7892
- return /* @__PURE__ */ jsxs37(chakra29.section, { ref, css: [styles.root, css], ...rest, children: [
7893
- hasHeader && /* @__PURE__ */ jsxs37(chakra29.header, { css: styles.header, children: [
7894
- /* @__PURE__ */ jsxs37(chakra29.div, { css: styles.titleGroup, children: [
7895
- title != null && /* @__PURE__ */ jsx51(chakra29.h2, { as: headingAs, css: styles.title, children: title }),
7896
- description != null && /* @__PURE__ */ jsx51(chakra29.p, { css: styles.description, children: description })
7897
- ] }),
7898
- actions != null && /* @__PURE__ */ jsx51(chakra29.div, { css: styles.actions, children: actions })
8026
+ const toggle = () => {
8027
+ const next = !folded;
8028
+ if (collapsedProp === void 0) setOwnCollapsed(next);
8029
+ onCollapsedChange?.(next);
8030
+ };
8031
+ const heading = /* @__PURE__ */ jsxs38(chakra30.div, { css: styles.titleGroup, children: [
8032
+ title != null && /* @__PURE__ */ jsx52(chakra30.h2, { as: headingAs, css: styles.title, children: title }),
8033
+ description != null && !folded && /* @__PURE__ */ jsx52(chakra30.p, { css: styles.description, children: description })
8034
+ ] });
8035
+ const content = /* @__PURE__ */ jsxs38(Fragment19, { children: [
8036
+ /* @__PURE__ */ jsx52(chakra30.div, { css: styles.body, children: loading === void 0 ? children : /* @__PURE__ */ jsx52(Loading, { when: loading, children }) }),
8037
+ footer != null && /* @__PURE__ */ jsx52(chakra30.footer, { css: styles.footer, children: footer })
8038
+ ] });
8039
+ return /* @__PURE__ */ jsxs38(chakra30.section, { ref, css: [styles.root, css], "data-collapsed": folded ? "" : void 0, ...rest, children: [
8040
+ hasHeader && /* @__PURE__ */ jsxs38(chakra30.header, { css: styles.header, children: [
8041
+ collapsible ? /* @__PURE__ */ jsxs38(chakra30.button, { type: "button", css: styles.toggle, "aria-expanded": !folded, "aria-controls": bodyId, onClick: toggle, children: [
8042
+ /* @__PURE__ */ jsx52(chakra30.span, { css: styles.chevron, "data-open": folded ? void 0 : "", "aria-hidden": true, children: /* @__PURE__ */ jsx52(ChevronRight4, { size: 16 }) }),
8043
+ heading,
8044
+ folded && summary != null && /* @__PURE__ */ jsx52(chakra30.span, { css: styles.summary, children: summary })
8045
+ ] }) : heading,
8046
+ actions != null && /* @__PURE__ */ jsx52(chakra30.div, { css: styles.actions, children: actions })
7899
8047
  ] }),
7900
- /* @__PURE__ */ jsx51(chakra29.div, { css: styles.body, children: loading === void 0 ? children : /* @__PURE__ */ jsx51(Loading, { when: loading, children }) }),
7901
- footer != null && /* @__PURE__ */ jsx51(chakra29.footer, { css: styles.footer, children: footer })
8048
+ collapsible ? /* @__PURE__ */ jsx52(Collapse, { open: !folded, id: bodyId, display: "flex", flexDirection: "column", flex: "1", minW: "0", children: content }) : content
7902
8049
  ] });
7903
8050
  });
7904
8051
 
7905
8052
  // src/components/PathChips.tsx
7906
- import { chakra as chakra30, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
7907
- import { ChevronRight as ChevronRight4 } from "lucide-react";
7908
- import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
8053
+ import { chakra as chakra31, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
8054
+ import { ChevronRight as ChevronRight5 } from "lucide-react";
8055
+ import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
7909
8056
  function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3, css, ...rest }) {
7910
8057
  const labels = useAbpLabels();
7911
8058
  const recipe = useSlotRecipe6({ key: "abpPathChips" });
7912
8059
  const styles = recipe({});
7913
8060
  const loading = useLoading(own) && path.length === 0;
7914
8061
  const segments = loading ? Array.from({ length: skeletonCount }, (_, i) => "\xA0".repeat(boneWidth(i, 6, 12))) : path;
7915
- return /* @__PURE__ */ jsx52(chakra30.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs38(chakra30.li, { css: styles.item, children: [
7916
- i > 0 && /* @__PURE__ */ jsx52(chakra30.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx52(ChevronRight4, {}) }),
7917
- /* @__PURE__ */ jsx52(chakra30.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
8062
+ return /* @__PURE__ */ jsx53(chakra31.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs39(chakra31.li, { css: styles.item, children: [
8063
+ i > 0 && /* @__PURE__ */ jsx53(chakra31.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx53(ChevronRight5, {}) }),
8064
+ /* @__PURE__ */ jsx53(chakra31.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
7918
8065
  ] }, `${i}:${segment}`)) });
7919
8066
  }
7920
8067
 
7921
8068
  // src/components/PropertyList.tsx
7922
- import { chakra as chakra31, DataList } from "@chakra-ui/react";
7923
- import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
8069
+ import { chakra as chakra32, DataList } from "@chakra-ui/react";
8070
+ import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
7924
8071
  function PropertyList({ items, size = "md", loading: own }) {
7925
8072
  const loading = useLoading(own);
7926
8073
  const arriving = useArriving(loading);
7927
- return /* @__PURE__ */ jsx53(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */ jsxs39(DataList.Item, { children: [
7928
- /* @__PURE__ */ jsx53(DataList.ItemLabel, { children: item.label }),
7929
- /* @__PURE__ */ jsx53(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx53(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx53(chakra31.span, { css: arriveCss, children: item.value }) : item.value })
8074
+ return /* @__PURE__ */ jsx54(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */ jsxs40(DataList.Item, { children: [
8075
+ /* @__PURE__ */ jsx54(DataList.ItemLabel, { children: item.label }),
8076
+ /* @__PURE__ */ jsx54(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx54(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx54(chakra32.span, { css: arriveCss, children: item.value }) : item.value })
7930
8077
  ] }, item.id ?? i)) });
7931
8078
  }
7932
8079
 
7933
8080
  // src/components/QueryableList.tsx
7934
- import { useEffect as useEffect16, useId as useId7, useMemo as useMemo12, useRef as useRef19, useState as useState22 } from "react";
8081
+ import { useEffect as useEffect17, useId as useId9, useMemo as useMemo13, useRef as useRef19, useState as useState24 } from "react";
7935
8082
  import { createPortal } from "react-dom";
7936
- import { Box as Box11, chakra as chakra33, HStack as HStack12, Input as Input7, Menu as Menu4, Portal as Portal16, Stack as Stack12, Text as Text17 } from "@chakra-ui/react";
8083
+ import { Box as Box12, chakra as chakra35, HStack as HStack12, Input as Input7, Menu as Menu5, Portal as Portal17, Stack as Stack14, Text as Text19 } from "@chakra-ui/react";
7937
8084
  import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter, Rows3, Save, Trash2 as Trash22, X as X2 } from "lucide-react";
7938
8085
 
7939
8086
  // src/components/query/ColumnsPopover.tsx
7940
8087
  import { useMemo as useMemo11 } from "react";
7941
- import { chakra as chakra32, HStack as HStack10, Popover as Popover3, Portal as Portal14, Stack as Stack10, Switch as Switch2, Text as Text15 } from "@chakra-ui/react";
8088
+ import { chakra as chakra33, HStack as HStack10, Popover as Popover3, Portal as Portal14, Stack as Stack11, Switch as Switch2, Text as Text16 } from "@chakra-ui/react";
7942
8089
  import {
7943
8090
  closestCenter,
7944
8091
  DndContext as DndContext3,
@@ -7950,7 +8097,7 @@ import {
7950
8097
  import { arrayMove, SortableContext as SortableContext2, sortableKeyboardCoordinates as sortableKeyboardCoordinates2, useSortable as useSortable2, verticalListSortingStrategy as verticalListSortingStrategy2 } from "@dnd-kit/sortable";
7951
8098
  import { CSS as CSS3 } from "@dnd-kit/utilities";
7952
8099
  import { Columns3, GripVertical as GripVertical4 } from "lucide-react";
7953
- import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
8100
+ import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
7954
8101
  function fill2(template, values) {
7955
8102
  return template.replace(/\{(\w+)\}/g, (_, k) => values[k] ?? `{${k}}`);
7956
8103
  }
@@ -7967,19 +8114,19 @@ function ColumnsPopover({ fields, columns, onChange }) {
7967
8114
  if (from < 0 || to < 0) return;
7968
8115
  onChange(arrayMove(columns, from, to));
7969
8116
  }
7970
- return /* @__PURE__ */ jsxs40(Popover3.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
7971
- /* @__PURE__ */ jsx54(Popover3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs40(Button, { size: "sm", variant: "secondary", disabled: fields.length === 0, children: [
7972
- /* @__PURE__ */ jsx54(Columns3, {}),
8117
+ return /* @__PURE__ */ jsxs41(Popover3.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
8118
+ /* @__PURE__ */ jsx55(Popover3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs41(Button, { size: "sm", variant: "secondary", disabled: fields.length === 0, children: [
8119
+ /* @__PURE__ */ jsx55(Columns3, {}),
7973
8120
  labels.columns
7974
8121
  ] }) }),
7975
- /* @__PURE__ */ jsx54(Portal14, { children: /* @__PURE__ */ jsx54(Popover3.Positioner, { children: /* @__PURE__ */ jsx54(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */ jsxs40(Popover3.Body, { p: "0", children: [
7976
- /* @__PURE__ */ jsxs40(HStack10, { justify: "space-between", px: "3.5", pt: "3", pb: "1", children: [
7977
- /* @__PURE__ */ jsx54(Text15, { textStyle: "sm", fontWeight: "semibold", children: labels.visibleColumns }),
7978
- /* @__PURE__ */ jsx54(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
8122
+ /* @__PURE__ */ jsx55(Portal14, { children: /* @__PURE__ */ jsx55(Popover3.Positioner, { children: /* @__PURE__ */ jsx55(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */ jsxs41(Popover3.Body, { p: "0", children: [
8123
+ /* @__PURE__ */ jsxs41(HStack10, { justify: "space-between", px: "3.5", pt: "3", pb: "1", children: [
8124
+ /* @__PURE__ */ jsx55(Text16, { textStyle: "sm", fontWeight: "semibold", children: labels.visibleColumns }),
8125
+ /* @__PURE__ */ jsx55(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
7979
8126
  ] }),
7980
- /* @__PURE__ */ jsx54(Text15, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
7981
- /* @__PURE__ */ jsxs40(chakra32.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
7982
- /* @__PURE__ */ jsx54(DndContext3, { sensors, collisionDetection: closestCenter, onDragEnd, children: /* @__PURE__ */ jsx54(SortableContext2, { items: shown, strategy: verticalListSortingStrategy2, children: /* @__PURE__ */ jsx54(Stack10, { gap: "0", role: "list", "aria-label": labels.visibleColumns, children: shown.map((id) => /* @__PURE__ */ jsx54(
8127
+ /* @__PURE__ */ jsx55(Text16, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
8128
+ /* @__PURE__ */ jsxs41(chakra33.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
8129
+ /* @__PURE__ */ jsx55(DndContext3, { sensors, collisionDetection: closestCenter, onDragEnd, children: /* @__PURE__ */ jsx55(SortableContext2, { items: shown, strategy: verticalListSortingStrategy2, children: /* @__PURE__ */ jsx55(Stack11, { gap: "0", role: "list", "aria-label": labels.visibleColumns, children: shown.map((id) => /* @__PURE__ */ jsx55(
7983
8130
  ColumnRow,
7984
8131
  {
7985
8132
  id,
@@ -7990,7 +8137,7 @@ function ColumnsPopover({ fields, columns, onChange }) {
7990
8137
  },
7991
8138
  id
7992
8139
  )) }) }) }),
7993
- hidden.length > 0 && /* @__PURE__ */ jsx54(Stack10, { gap: "0", borderTopWidth: "1px", borderColor: "border.muted", mt: "1", pt: "1", role: "list", "aria-label": labels.hiddenColumns, children: hidden.map((f) => /* @__PURE__ */ jsx54(ColumnRow, { id: f.id, label: f.label, checked: false, onCheckedChange: () => onChange([...columns, f.id]) }, f.id)) })
8140
+ hidden.length > 0 && /* @__PURE__ */ jsx55(Stack11, { gap: "0", borderTopWidth: "1px", borderColor: "border.muted", mt: "1", pt: "1", role: "list", "aria-label": labels.hiddenColumns, children: hidden.map((f) => /* @__PURE__ */ jsx55(ColumnRow, { id: f.id, label: f.label, checked: false, onCheckedChange: () => onChange([...columns, f.id]) }, f.id)) })
7994
8141
  ] })
7995
8142
  ] }) }) }) })
7996
8143
  ] });
@@ -7999,7 +8146,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
7999
8146
  const labels = useAbpLabels().queryList;
8000
8147
  const sortable = useSortable2({ id, disabled: !checked });
8001
8148
  const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = sortable;
8002
- return /* @__PURE__ */ jsxs40(
8149
+ return /* @__PURE__ */ jsxs41(
8003
8150
  HStack10,
8004
8151
  {
8005
8152
  ref: setNodeRef,
@@ -8016,8 +8163,8 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
8016
8163
  style: { transform: CSS3.Transform.toString(transform), transition },
8017
8164
  _hover: { bg: "bg.subtle" },
8018
8165
  children: [
8019
- checked ? /* @__PURE__ */ jsx54(
8020
- chakra32.button,
8166
+ checked ? /* @__PURE__ */ jsx55(
8167
+ chakra33.button,
8021
8168
  {
8022
8169
  type: "button",
8023
8170
  display: "inline-flex",
@@ -8029,13 +8176,13 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
8029
8176
  "aria-label": fill2(labels.dragColumn, { field: label }),
8030
8177
  ...attributes,
8031
8178
  ...listeners2,
8032
- children: /* @__PURE__ */ jsx54(GripVertical4, { size: 16 })
8179
+ children: /* @__PURE__ */ jsx55(GripVertical4, { size: 16 })
8033
8180
  }
8034
- ) : /* @__PURE__ */ jsx54(chakra32.span, { w: "4", flexShrink: 0 }),
8035
- /* @__PURE__ */ jsx54(Text15, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
8036
- /* @__PURE__ */ jsxs40(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
8037
- /* @__PURE__ */ jsx54(Switch2.HiddenInput, {}),
8038
- /* @__PURE__ */ jsx54(Switch2.Control, { children: /* @__PURE__ */ jsx54(Switch2.Thumb, {}) })
8181
+ ) : /* @__PURE__ */ jsx55(chakra33.span, { w: "4", flexShrink: 0 }),
8182
+ /* @__PURE__ */ jsx55(Text16, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
8183
+ /* @__PURE__ */ jsxs41(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
8184
+ /* @__PURE__ */ jsx55(Switch2.HiddenInput, {}),
8185
+ /* @__PURE__ */ jsx55(Switch2.Control, { children: /* @__PURE__ */ jsx55(Switch2.Thumb, {}) })
8039
8186
  ] })
8040
8187
  ]
8041
8188
  }
@@ -8043,10 +8190,10 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
8043
8190
  }
8044
8191
 
8045
8192
  // src/components/query/FilterBuilder.tsx
8046
- import { useEffect as useEffect15, useId as useId6, useRef as useRef18, useState as useState21 } from "react";
8047
- import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack11, Input as Input6, Portal as Portal15, Stack as Stack11, Text as Text16 } from "@chakra-ui/react";
8193
+ import { useEffect as useEffect15, useId as useId8, useRef as useRef18, useState as useState22 } from "react";
8194
+ import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack11, Input as Input6, Portal as Portal15, Stack as Stack12, Text as Text17 } from "@chakra-ui/react";
8048
8195
  import { Trash2 } from "lucide-react";
8049
- import { Fragment as Fragment19, jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
8196
+ import { Fragment as Fragment20, jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
8050
8197
  function fill3(template, values) {
8051
8198
  return template.replace(/\{(\w+)\}/g, (_, k) => String(values[k] ?? `{${k}}`));
8052
8199
  }
@@ -8059,9 +8206,9 @@ function conditionOf(d, field, own) {
8059
8206
  }
8060
8207
  function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, countMatches, onApply, onClose }) {
8061
8208
  const labels = useAbpLabels().queryList;
8062
- const [seq, setSeq] = useState21(initial.length + 1);
8063
- const [rows2, setRows] = useState21(() => initial.flatMap((c2, i) => c2.op === "in" && Array.isArray(c2.value) && fields.find((f) => f.id === c2.field)?.operators.includes("eq") ? c2.value.map((v, j) => ({ id: i * 100 + j + 1, field: c2.field, op: "eq", text: valueText(v), chosen: v })) : [{ id: i * 100 + 1, field: c2.field, op: c2.op, text: valueText(c2.value), chosen: c2.value }]));
8064
- const [touched, setTouched] = useState21(false);
8209
+ const [seq, setSeq] = useState22(initial.length + 1);
8210
+ const [rows2, setRows] = useState22(() => initial.flatMap((c2, i) => c2.op === "in" && Array.isArray(c2.value) && fields.find((f) => f.id === c2.field)?.operators.includes("eq") ? c2.value.map((v, j) => ({ id: i * 100 + j + 1, field: c2.field, op: "eq", text: valueText(v), chosen: v })) : [{ id: i * 100 + 1, field: c2.field, op: c2.op, text: valueText(c2.value), chosen: c2.value }]));
8211
+ const [touched, setTouched] = useState22(false);
8065
8212
  const own = (d) => {
8066
8213
  const f = fields.find((x) => x.id === d.field);
8067
8214
  return Boolean(f && renderValueEditor && !NO_VALUE_OPS.has(d.op) && renderValueEditor({ field: f, op: d.op, value: d.chosen, onChange: () => void 0 }) != null);
@@ -8075,8 +8222,8 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
8075
8222
  counter.current = countMatches;
8076
8223
  });
8077
8224
  const counts = Boolean(countMatches);
8078
- const [count, setCount] = useState21(null);
8079
- const [total, setTotal] = useState21(null);
8225
+ const [count, setCount] = useState22(null);
8226
+ const [total, setTotal] = useState22(null);
8080
8227
  useEffect15(() => {
8081
8228
  if (!counts) return;
8082
8229
  let gone = false;
@@ -8102,23 +8249,23 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
8102
8249
  setSeq((n) => n + 1);
8103
8250
  };
8104
8251
  const change = (id, patch) => setRows((r) => r.map((d) => d.id === id ? { ...d, ...patch, dirty: true } : d));
8105
- return /* @__PURE__ */ jsx55(Dialog5.Root, { open: true, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs41(Portal15, { children: [
8106
- /* @__PURE__ */ jsx55(Dialog5.Backdrop, {}),
8107
- /* @__PURE__ */ jsx55(Dialog5.Positioner, { children: /* @__PURE__ */ jsxs41(Dialog5.Content, { "data-filter-builder": "", children: [
8108
- /* @__PURE__ */ jsx55(Dialog5.Header, { children: /* @__PURE__ */ jsxs41(HStack11, { justify: "space-between", w: "full", gap: "3", children: [
8109
- /* @__PURE__ */ jsx55(Dialog5.Title, { children: labels.buildFilters }),
8110
- /* @__PURE__ */ jsx55(Button, { size: "xs", variant: "ghost", onClick: () => setRows([]), disabled: rows2.length === 0, children: labels.clearAll })
8252
+ return /* @__PURE__ */ jsx56(Dialog5.Root, { open: true, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs42(Portal15, { children: [
8253
+ /* @__PURE__ */ jsx56(Dialog5.Backdrop, {}),
8254
+ /* @__PURE__ */ jsx56(Dialog5.Positioner, { children: /* @__PURE__ */ jsxs42(Dialog5.Content, { "data-filter-builder": "", children: [
8255
+ /* @__PURE__ */ jsx56(Dialog5.Header, { children: /* @__PURE__ */ jsxs42(HStack11, { justify: "space-between", w: "full", gap: "3", children: [
8256
+ /* @__PURE__ */ jsx56(Dialog5.Title, { children: labels.buildFilters }),
8257
+ /* @__PURE__ */ jsx56(Button, { size: "xs", variant: "ghost", onClick: () => setRows([]), disabled: rows2.length === 0, children: labels.clearAll })
8111
8258
  ] }) }),
8112
- /* @__PURE__ */ jsx55(Dialog5.Body, { children: /* @__PURE__ */ jsxs41(Stack11, { gap: "3", children: [
8113
- /* @__PURE__ */ jsxs41(Text16, { textStyle: "sm", color: "fg.muted", children: [
8259
+ /* @__PURE__ */ jsx56(Dialog5.Body, { children: /* @__PURE__ */ jsxs42(Stack12, { gap: "3", children: [
8260
+ /* @__PURE__ */ jsxs42(Text17, { textStyle: "sm", color: "fg.muted", children: [
8114
8261
  labels.matchAll,
8115
- repeats && /* @__PURE__ */ jsxs41(Fragment19, { children: [
8262
+ repeats && /* @__PURE__ */ jsxs42(Fragment20, { children: [
8116
8263
  " ",
8117
8264
  labels.sameFieldAny
8118
8265
  ] })
8119
8266
  ] }),
8120
- rows2.length === 0 && /* @__PURE__ */ jsx55(Text16, { textStyle: "sm", color: "fg.muted", py: "2", children: labels.noConditions }),
8121
- rows2.map((d) => /* @__PURE__ */ jsx55(
8267
+ rows2.length === 0 && /* @__PURE__ */ jsx56(Text17, { textStyle: "sm", color: "fg.muted", py: "2", children: labels.noConditions }),
8268
+ rows2.map((d) => /* @__PURE__ */ jsx56(
8122
8269
  ConditionRow,
8123
8270
  {
8124
8271
  draft: d,
@@ -8131,29 +8278,29 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
8131
8278
  },
8132
8279
  d.id
8133
8280
  )),
8134
- /* @__PURE__ */ jsx55(HStack11, { children: /* @__PURE__ */ jsx55(AddButton, { onClick: add, disabled: fields.length === 0, children: labels.addCondition }) }),
8135
- /* @__PURE__ */ jsxs41(Stack11, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
8136
- /* @__PURE__ */ jsx55(Text16, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
8137
- /* @__PURE__ */ jsx55(Text16, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
8281
+ /* @__PURE__ */ jsx56(HStack11, { children: /* @__PURE__ */ jsx56(AddButton, { onClick: add, disabled: fields.length === 0, children: labels.addCondition }) }),
8282
+ /* @__PURE__ */ jsxs42(Stack12, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
8283
+ /* @__PURE__ */ jsx56(Text17, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
8284
+ /* @__PURE__ */ jsx56(Text17, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
8138
8285
  ] })
8139
8286
  ] }) }),
8140
- /* @__PURE__ */ jsx55(Dialog5.Footer, { children: /* @__PURE__ */ jsxs41(HStack11, { justify: "space-between", w: "full", wrap: "wrap", gap: "2", children: [
8141
- /* @__PURE__ */ jsxs41(Text16, { textStyle: "sm", color: "fg.muted", "aria-live": "polite", "data-filter-count": "", children: [
8287
+ /* @__PURE__ */ jsx56(Dialog5.Footer, { children: /* @__PURE__ */ jsxs42(HStack11, { justify: "space-between", w: "full", wrap: "wrap", gap: "2", children: [
8288
+ /* @__PURE__ */ jsxs42(Text17, { textStyle: "sm", color: "fg.muted", "aria-live": "polite", "data-filter-count": "", children: [
8142
8289
  count != null && fill3(total != null ? labels.matchCount : labels.matchCountOnly, { count, total: total ?? "" }),
8143
- incomplete > 0 && /* @__PURE__ */ jsxs41(Fragment19, { children: [
8290
+ incomplete > 0 && /* @__PURE__ */ jsxs42(Fragment20, { children: [
8144
8291
  " \xB7 ",
8145
8292
  labels.incompleteSkipped
8146
8293
  ] })
8147
8294
  ] }),
8148
- /* @__PURE__ */ jsxs41(HStack11, { gap: "2", children: [
8149
- /* @__PURE__ */ jsx55(Button, { size: "sm", variant: "ghost", onClick: onClose, children: labels.cancel }),
8150
- /* @__PURE__ */ jsx55(Button, { size: "sm", variant: "primary", onClick: () => {
8295
+ /* @__PURE__ */ jsxs42(HStack11, { gap: "2", children: [
8296
+ /* @__PURE__ */ jsx56(Button, { size: "sm", variant: "ghost", onClick: onClose, children: labels.cancel }),
8297
+ /* @__PURE__ */ jsx56(Button, { size: "sm", variant: "primary", onClick: () => {
8151
8298
  setTouched(true);
8152
8299
  onApply(mergeSameField(complete, fields));
8153
8300
  }, children: labels.applyFilters })
8154
8301
  ] })
8155
8302
  ] }) }),
8156
- /* @__PURE__ */ jsx55(Dialog5.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(CloseButton3, { size: "sm" }) })
8303
+ /* @__PURE__ */ jsx56(Dialog5.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx56(CloseButton3, { size: "sm" }) })
8157
8304
  ] }) })
8158
8305
  ] }) });
8159
8306
  }
@@ -8164,10 +8311,10 @@ function describe(c2, fields, labels) {
8164
8311
  }
8165
8312
  function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChange, onRemove }) {
8166
8313
  const labels = useAbpLabels().queryList;
8167
- const listId = useId6();
8314
+ const listId = useId8();
8168
8315
  const field = fields.find((f) => f.id === draft.field);
8169
8316
  const { op, text } = draft;
8170
- const [options, setOptions] = useState21([]);
8317
+ const [options, setOptions] = useState22([]);
8171
8318
  const own = field && renderValueEditor && !NO_VALUE_OPS.has(op) ? renderValueEditor({ field, op, value: draft.chosen, onChange: (v) => onChange({ chosen: v }) }) : null;
8172
8319
  useEffect15(() => {
8173
8320
  if (!suggest || !field || NO_VALUE_OPS.has(op) || own != null) return;
@@ -8182,9 +8329,9 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
8182
8329
  clearTimeout(timer);
8183
8330
  };
8184
8331
  }, [suggest, field, op, text, own]);
8185
- return /* @__PURE__ */ jsxs41(Stack11, { gap: "1", "data-condition": "", children: [
8186
- /* @__PURE__ */ jsxs41(HStack11, { gap: "1.5", wrap: "wrap", align: "start", children: [
8187
- /* @__PURE__ */ jsx55(
8332
+ return /* @__PURE__ */ jsxs42(Stack12, { gap: "1", "data-condition": "", children: [
8333
+ /* @__PURE__ */ jsxs42(HStack11, { gap: "1.5", wrap: "wrap", align: "start", children: [
8334
+ /* @__PURE__ */ jsx56(
8188
8335
  SelectField,
8189
8336
  {
8190
8337
  width: "auto",
@@ -8198,7 +8345,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
8198
8345
  options: fields.map((f) => ({ value: f.id, label: f.label }))
8199
8346
  }
8200
8347
  ),
8201
- /* @__PURE__ */ jsx55(
8348
+ /* @__PURE__ */ jsx56(
8202
8349
  SelectField,
8203
8350
  {
8204
8351
  width: "auto",
@@ -8210,8 +8357,8 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
8210
8357
  }
8211
8358
  ),
8212
8359
  own,
8213
- !NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs41(Fragment19, { children: [
8214
- /* @__PURE__ */ jsx55(
8360
+ !NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs42(Fragment20, { children: [
8361
+ /* @__PURE__ */ jsx56(
8215
8362
  Input6,
8216
8363
  {
8217
8364
  size: "sm",
@@ -8225,16 +8372,137 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
8225
8372
  onChange: (e) => onChange({ text: e.target.value })
8226
8373
  }
8227
8374
  ),
8228
- /* @__PURE__ */ jsx55("datalist", { id: listId, children: options.filter((o) => o.kind !== "keyword").map((o) => /* @__PURE__ */ jsx55("option", { value: o.text.replace(/^"|"$/g, ""), children: o.label }, o.text)) })
8375
+ /* @__PURE__ */ jsx56("datalist", { id: listId, children: options.filter((o) => o.kind !== "keyword").map((o) => /* @__PURE__ */ jsx56("option", { value: o.text.replace(/^"|"$/g, ""), children: o.label }, o.text)) })
8229
8376
  ] }),
8230
- /* @__PURE__ */ jsx55(IconButton, { size: "sm", variant: "ghost", remove: true, "aria-label": fill3(labels.removeFilter, { field: field?.label ?? draft.field }), onClick: onRemove, children: /* @__PURE__ */ jsx55(Trash2, {}) })
8377
+ /* @__PURE__ */ jsx56(IconButton, { size: "sm", variant: "ghost", remove: true, "aria-label": fill3(labels.removeFilter, { field: field?.label ?? draft.field }), onClick: onRemove, children: /* @__PURE__ */ jsx56(Trash2, {}) })
8231
8378
  ] }),
8232
- warn && /* @__PURE__ */ jsx55(Text16, { textStyle: "xs", color: "fg.error", children: labels.incomplete })
8379
+ warn && /* @__PURE__ */ jsx56(Text17, { textStyle: "xs", color: "fg.error", children: labels.incomplete })
8233
8380
  ] });
8234
8381
  }
8235
8382
 
8383
+ // src/components/query/ExportDialog.tsx
8384
+ import { useEffect as useEffect16, useMemo as useMemo12, useState as useState23 } from "react";
8385
+ import { chakra as chakra34, CloseButton as CloseButton4, Dialog as Dialog6, Portal as Portal16, Stack as Stack13, Text as Text18 } from "@chakra-ui/react";
8386
+
8387
+ // src/components/query/exportText.ts
8388
+ function exportText(value) {
8389
+ if (value == null) return "";
8390
+ if (Array.isArray(value)) return value.map(exportText).filter(Boolean).join("; ");
8391
+ if (typeof value === "object") {
8392
+ const v = value;
8393
+ for (const k of ["displayName", "name", "title", "label", "key"]) if (typeof v[k] === "string") return v[k];
8394
+ return "";
8395
+ }
8396
+ return String(value);
8397
+ }
8398
+ function csvField(text, separator) {
8399
+ return text.includes(separator) || /["\r\n]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
8400
+ }
8401
+
8402
+ // src/components/query/ExportDialog.tsx
8403
+ import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
8404
+ var SEPARATORS = { comma: ",", semicolon: ";", tab: " " };
8405
+ function ExportDialog({ format, onClose, fields, shown, columnLabels, found, filtered, sample, onExport }) {
8406
+ const labels = useAbpLabels();
8407
+ const q = labels.queryList;
8408
+ const { locale } = useAbpLocale();
8409
+ const fmt = useFormatters();
8410
+ const ordered = useMemo12(() => {
8411
+ const byId = new Map(fields.map((f) => [f.id, f]));
8412
+ const first = shown.filter((id) => byId.has(id));
8413
+ return [...first, ...fields.map((f) => f.id).filter((id) => !first.includes(id))];
8414
+ }, [fields, shown]);
8415
+ const [picked, setPicked] = useState23(new Set(shown));
8416
+ const [all, setAll] = useState23(false);
8417
+ const [separator, setSeparator] = useState23("comma");
8418
+ useEffect16(() => {
8419
+ if (format) {
8420
+ setPicked(new Set(shown));
8421
+ setAll(false);
8422
+ }
8423
+ }, [format, shown]);
8424
+ const name = (id) => {
8425
+ const own = columnLabels?.[id];
8426
+ return typeof own === "string" ? own : fields.find((f) => f.id === id)?.label ?? id;
8427
+ };
8428
+ const columns = ordered.filter((id) => picked.has(id));
8429
+ const rows2 = sample.slice(0, 3);
8430
+ const sep = SEPARATORS[separator];
8431
+ const csv = [columns.map((id) => csvField(name(id), sep)), ...rows2.map((r) => columns.map((id) => csvField(exportText(r.values[id]), sep)))].map((cells) => cells.join(sep === " " ? " " : sep)).join("\n");
8432
+ return /* @__PURE__ */ jsx57(Dialog6.Root, { open: format != null, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs43(Portal16, { children: [
8433
+ /* @__PURE__ */ jsx57(Dialog6.Backdrop, {}),
8434
+ /* @__PURE__ */ jsx57(Dialog6.Positioner, { children: /* @__PURE__ */ jsxs43(Dialog6.Content, { "data-export-dialog": "", children: [
8435
+ /* @__PURE__ */ jsx57(Dialog6.Header, { children: /* @__PURE__ */ jsx57(Dialog6.Title, { children: format === "xlsx" ? q.exportTitleExcel ?? "Export to Excel" : q.exportTitleCsv ?? "Export to CSV" }) }),
8436
+ /* @__PURE__ */ jsx57(Dialog6.Body, { children: /* @__PURE__ */ jsxs43(Stack13, { gap: "5", children: [
8437
+ filtered && /* @__PURE__ */ jsxs43(Stack13, { gap: "1.5", children: [
8438
+ /* @__PURE__ */ jsx57(Text18, { textStyle: "label", children: q.exportRows ?? "Rows" }),
8439
+ /* @__PURE__ */ jsx57(
8440
+ SegmentedControl,
8441
+ {
8442
+ size: "sm",
8443
+ "aria-label": q.exportRows ?? "Rows",
8444
+ value: all ? "all" : "found",
8445
+ onValueChange: (v) => setAll(v === "all"),
8446
+ items: [
8447
+ { value: "found", label: formatMessage(locale, q.exportFound ?? "Filtered ({count})", { count: fmt.number(found) }) },
8448
+ { value: "all", label: q.exportAll ?? "All" }
8449
+ ]
8450
+ }
8451
+ )
8452
+ ] }),
8453
+ /* @__PURE__ */ jsxs43(Stack13, { gap: "1.5", role: "group", "aria-labelledby": "export-columns", children: [
8454
+ /* @__PURE__ */ jsx57(Text18, { id: "export-columns", textStyle: "label", children: q.exportColumns ?? "Columns" }),
8455
+ /* @__PURE__ */ jsx57(chakra34.div, { display: "grid", gridTemplateColumns: { base: "1fr", sm: "repeat(2, minmax(0, 1fr))" }, gap: "2", children: ordered.map((id) => /* @__PURE__ */ jsx57(
8456
+ CheckboxField,
8457
+ {
8458
+ label: name(id),
8459
+ checked: picked.has(id),
8460
+ onCheckedChange: (on) => setPicked((p) => {
8461
+ const next = new Set(p);
8462
+ if (on) next.add(id);
8463
+ else next.delete(id);
8464
+ return next;
8465
+ })
8466
+ },
8467
+ id
8468
+ )) })
8469
+ ] }),
8470
+ format === "csv" && /* @__PURE__ */ jsxs43(Stack13, { gap: "1.5", children: [
8471
+ /* @__PURE__ */ jsx57(chakra34.label, { textStyle: "label", htmlFor: "export-separator", children: q.exportSeparator ?? "Separator" }),
8472
+ /* @__PURE__ */ jsx57(
8473
+ SelectField,
8474
+ {
8475
+ id: "export-separator",
8476
+ value: separator,
8477
+ onChange: (e) => setSeparator(e.target.value),
8478
+ maxW: "16rem",
8479
+ options: [
8480
+ { value: "comma", label: q.exportComma ?? "Comma ( , )" },
8481
+ { value: "semicolon", label: q.exportSemicolon ?? "Semicolon ( ; )" },
8482
+ { value: "tab", label: q.exportTab ?? "Tab" }
8483
+ ]
8484
+ }
8485
+ )
8486
+ ] }),
8487
+ columns.length > 0 && rows2.length > 0 && /* @__PURE__ */ jsxs43(Stack13, { gap: "1.5", children: [
8488
+ /* @__PURE__ */ jsx57(Text18, { textStyle: "label", children: q.exportPreview ?? "Preview" }),
8489
+ format === "csv" ? /* @__PURE__ */ jsx57(chakra34.pre, { dir: "ltr", textAlign: "start", m: "0", p: "3", bg: "bg.subtle", borderRadius: "l2", textStyle: "code", overflowX: "auto", whiteSpace: "pre", "data-export-preview": "", children: csv }) : /* @__PURE__ */ jsx57(chakra34.div, { overflowX: "auto", bg: "bg.subtle", borderRadius: "l2", "data-export-preview": "", children: /* @__PURE__ */ jsxs43(chakra34.table, { textStyle: "body.sm", borderCollapse: "collapse", w: "full", children: [
8490
+ /* @__PURE__ */ jsx57("thead", { children: /* @__PURE__ */ jsx57("tr", { children: columns.map((id) => /* @__PURE__ */ jsx57(chakra34.th, { textAlign: "start", fontWeight: "bold", px: "3", py: "1.5", borderBottomWidth: "1px", whiteSpace: "nowrap", children: name(id) }, id)) }) }),
8491
+ /* @__PURE__ */ jsx57("tbody", { children: rows2.map((r) => /* @__PURE__ */ jsx57("tr", { children: columns.map((id) => /* @__PURE__ */ jsx57(chakra34.td, { px: "3", py: "1.5", whiteSpace: "nowrap", maxW: "16rem", truncate: true, children: exportText(r.values[id]) }, id)) }, r.id)) })
8492
+ ] }) })
8493
+ ] })
8494
+ ] }) }),
8495
+ /* @__PURE__ */ jsxs43(Dialog6.Footer, { children: [
8496
+ /* @__PURE__ */ jsx57(Dialog6.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(Button, { variant: "cancel", children: labels.cancel }) }),
8497
+ /* @__PURE__ */ jsx57(Button, { variant: "primary", disabled: columns.length === 0, onClick: () => onExport({ columns, all, separator }), children: q.exportRun ?? "Export" })
8498
+ ] }),
8499
+ /* @__PURE__ */ jsx57(Dialog6.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(CloseButton4, { size: "sm" }) })
8500
+ ] }) })
8501
+ ] }) });
8502
+ }
8503
+
8236
8504
  // src/components/QueryableList.tsx
8237
- import { Fragment as Fragment20, jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
8505
+ import { Fragment as Fragment21, jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
8238
8506
  var PAIR = "";
8239
8507
  var pairKey = (first, second) => `${first}${PAIR}${second}`;
8240
8508
  var condition = (field, value) => value == null ? { field, op: "isEmpty" } : { field, op: "eq", value };
@@ -8295,17 +8563,18 @@ function QueryableList({
8295
8563
  }) {
8296
8564
  const labels = useAbpLabels().queryList;
8297
8565
  const fmt = useFormatters();
8298
- const byId = useMemo12(() => new Map((fields ?? []).map((f) => [f.id, f])), [fields]);
8566
+ const byId = useMemo13(() => new Map((fields ?? []).map((f) => [f.id, f])), [fields]);
8299
8567
  const query = result?.query ?? state.query ?? {};
8300
8568
  const conditions = basicConditions(query.where ?? null);
8301
- const [mode, setMode] = useState22(conditions === null ? "rql" : "basic");
8302
- const [adding, setAdding] = useState22(false);
8303
- const [naming, setNaming] = useState22(null);
8304
- const [exporting, setExporting] = useState22(false);
8305
- const [exported, setExported] = useState22(null);
8569
+ const [mode, setMode] = useState24(conditions === null ? "rql" : "basic");
8570
+ const [adding, setAdding] = useState24(false);
8571
+ const [naming, setNaming] = useState24(null);
8572
+ const [exporting, setExporting] = useState24(false);
8573
+ const [exportFormat, setExportFormat] = useState24(null);
8574
+ const [exported, setExported] = useState24(null);
8306
8575
  const complex = conditions === null;
8307
8576
  const failed = Boolean(error && state.rql);
8308
- useEffect16(() => {
8577
+ useEffect17(() => {
8309
8578
  if (complex || failed) setMode("rql");
8310
8579
  }, [complex, failed]);
8311
8580
  const label = (id) => byId.get(id)?.label ?? id;
@@ -8331,12 +8600,20 @@ function QueryableList({
8331
8600
  const to = Math.min(skip + take, total);
8332
8601
  const groupable = (fields ?? []).filter((f) => f.groupable);
8333
8602
  const activeView = views?.find((v) => v.id === activeViewId) ?? null;
8334
- async function runExport(format) {
8603
+ async function runExport(format, choice) {
8335
8604
  if (!onExport) return;
8605
+ setExportFormat(null);
8336
8606
  setExporting(true);
8337
8607
  setExported(null);
8608
+ const controller = new AbortController();
8609
+ const toast = toaster.create({
8610
+ type: "loading",
8611
+ title: labels.exportPreparing ?? "Preparing the file\u2026 You can keep working.",
8612
+ action: { label: labels.exportCancel ?? "Cancel", onClick: () => controller.abort() }
8613
+ });
8338
8614
  try {
8339
- const done = await onExport(format);
8615
+ const done = await onExport(format, { ...choice, signal: controller.signal });
8616
+ toaster.update(toast, { type: "success", title: labels.exportReady ?? "Your file is ready", action: void 0 });
8340
8617
  if (done?.truncated) {
8341
8618
  setExported({
8342
8619
  tone: "warning",
@@ -8344,15 +8621,20 @@ function QueryableList({
8344
8621
  });
8345
8622
  }
8346
8623
  } catch (e) {
8347
- setExported({ tone: "danger", message: e instanceof Error ? e.message : String(e) });
8624
+ if (controller.signal.aborted) {
8625
+ toaster.dismiss(toast);
8626
+ } else {
8627
+ toaster.dismiss(toast);
8628
+ setExported({ tone: "danger", message: e instanceof Error ? e.message : String(e) });
8629
+ }
8348
8630
  } finally {
8349
8631
  setExporting(false);
8350
8632
  }
8351
8633
  }
8352
8634
  const groupField = query.groupBy?.field ?? null;
8353
8635
  const thenField = groupField ? query.groupBy?.then?.field ?? null : null;
8354
- const [folded, setFolded] = useState22(() => /* @__PURE__ */ new Set());
8355
- useEffect16(() => setFolded(/* @__PURE__ */ new Set()), [groupField, thenField]);
8636
+ const [folded, setFolded] = useState24(() => /* @__PURE__ */ new Set());
8637
+ useEffect17(() => setFolded(/* @__PURE__ */ new Set()), [groupField, thenField]);
8356
8638
  const grouped = Boolean(groupField && result?.groups && result.groups.length > 0);
8357
8639
  const asTree = Boolean(tree && groupField === tree.field);
8358
8640
  const groupOf = (row) => {
@@ -8365,7 +8647,7 @@ function QueryableList({
8365
8647
  const firstOf = (key) => thenField ? key.slice(0, key.indexOf(PAIR)) : key;
8366
8648
  const { locale } = useAbpLocale();
8367
8649
  const groupName = (value, label2, period) => value == null ? labels.noGroupValue : period ? periodName(value, period, locale, { week: labels.periodWeek, quarter: labels.periodQuarter }) : label2 || value;
8368
- const groupKeys = useMemo12(() => {
8650
+ const groupKeys = useMemo13(() => {
8369
8651
  const keys = [...new Set((result?.items ?? []).map(groupOf))];
8370
8652
  return thenField ? [...keys, ...new Set(keys.map((k) => parentFoldKey(k.slice(0, k.indexOf(PAIR)))))] : keys;
8371
8653
  }, [result, groupField, thenField]);
@@ -8381,15 +8663,15 @@ function QueryableList({
8381
8663
  }
8382
8664
  const sortable = (fields ?? []).filter((f) => f.sortable);
8383
8665
  const groupLabel = groupField ? thenField ? `${label(groupField)} \xB7 ${label(thenField)}` : label(groupField) : null;
8384
- return /* @__PURE__ */ jsxs42(Stack12, { gap: "3", children: [
8385
- /* @__PURE__ */ jsxs42(chakra33.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
8386
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: [
8387
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", wrap: "wrap", minW: "0", children: [
8666
+ return /* @__PURE__ */ jsxs44(Stack14, { gap: "3", children: [
8667
+ /* @__PURE__ */ jsxs44(chakra35.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
8668
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: [
8669
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", wrap: "wrap", minW: "0", children: [
8388
8670
  leading,
8389
- leading != null && views && onSelectView && /* @__PURE__ */ jsx56(chakra33.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
8390
- views && onSelectView && /* @__PURE__ */ jsxs42(HStack12, { gap: "2", children: [
8391
- /* @__PURE__ */ jsx56(Text17, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
8392
- /* @__PURE__ */ jsx56(
8671
+ leading != null && views && onSelectView && /* @__PURE__ */ jsx58(chakra35.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
8672
+ views && onSelectView && /* @__PURE__ */ jsxs44(HStack12, { gap: "2", children: [
8673
+ /* @__PURE__ */ jsx58(Text19, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
8674
+ /* @__PURE__ */ jsx58(
8393
8675
  SelectField,
8394
8676
  {
8395
8677
  width: "auto",
@@ -8401,62 +8683,62 @@ function QueryableList({
8401
8683
  }
8402
8684
  )
8403
8685
  ] }),
8404
- onSaveView && (naming === null ? /* @__PURE__ */ jsxs42(Button, { size: "sm", variant: "ghost", color: "fg.accent", onClick: () => setNaming(activeView?.isOwner ? activeView.name : ""), children: [
8405
- /* @__PURE__ */ jsx56(Save, {}),
8686
+ onSaveView && (naming === null ? /* @__PURE__ */ jsxs44(Button, { size: "sm", variant: "ghost", color: "fg.accent", onClick: () => setNaming(activeView?.isOwner ? activeView.name : ""), children: [
8687
+ /* @__PURE__ */ jsx58(Save, {}),
8406
8688
  labels.saveView
8407
- ] }) : /* @__PURE__ */ jsxs42(HStack12, { gap: "1", as: "form", onSubmit: (e) => {
8689
+ ] }) : /* @__PURE__ */ jsxs44(HStack12, { gap: "1", as: "form", onSubmit: (e) => {
8408
8690
  e.preventDefault();
8409
8691
  if (naming.trim()) onSaveView(naming.trim(), activeView?.isOwner && naming.trim() === activeView.name ? activeView.id : null);
8410
8692
  setNaming(null);
8411
8693
  }, children: [
8412
- /* @__PURE__ */ jsx56(Input7, { size: "sm", autoFocus: true, "aria-label": labels.viewName, placeholder: labels.viewName, value: naming, onChange: (e) => setNaming(e.target.value), maxW: "56" }),
8413
- /* @__PURE__ */ jsx56(Button, { size: "sm", type: "submit", variant: "primary", disabled: !naming.trim(), children: labels.save }),
8414
- /* @__PURE__ */ jsx56(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.cancel, onClick: () => setNaming(null), children: /* @__PURE__ */ jsx56(X2, {}) })
8694
+ /* @__PURE__ */ jsx58(Input7, { size: "sm", autoFocus: true, "aria-label": labels.viewName, placeholder: labels.viewName, value: naming, onChange: (e) => setNaming(e.target.value), maxW: "56" }),
8695
+ /* @__PURE__ */ jsx58(Button, { size: "sm", type: "submit", variant: "primary", disabled: !naming.trim(), children: labels.save }),
8696
+ /* @__PURE__ */ jsx58(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.cancel, onClick: () => setNaming(null), children: /* @__PURE__ */ jsx58(X2, {}) })
8415
8697
  ] })),
8416
- activeView?.isOwner && onDeleteView && naming === null && /* @__PURE__ */ jsx56(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.deleteView, onClick: () => onDeleteView(activeView.id), children: /* @__PURE__ */ jsx56(Trash22, {}) })
8698
+ activeView?.isOwner && onDeleteView && naming === null && /* @__PURE__ */ jsx58(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.deleteView, onClick: () => onDeleteView(activeView.id), children: /* @__PURE__ */ jsx58(Trash22, {}) })
8417
8699
  ] }),
8418
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", wrap: "wrap", children: [
8419
- /* @__PURE__ */ jsxs42(Menu4.Root, { positioning: { placement: "bottom-end" }, children: [
8420
- /* @__PURE__ */ jsx56(Menu4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs42(Button, { size: "sm", variant: "secondary", "aria-label": labels.groupBy, disabled: groupable.length === 0, children: [
8421
- /* @__PURE__ */ jsx56(Rows3, {}),
8422
- /* @__PURE__ */ jsx56(Text17, { as: "span", color: "fg.muted", fontWeight: "normal", children: labels.group }),
8700
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", wrap: "wrap", children: [
8701
+ /* @__PURE__ */ jsxs44(Menu5.Root, { positioning: { placement: "bottom-end" }, children: [
8702
+ /* @__PURE__ */ jsx58(Menu5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs44(Button, { size: "sm", variant: "secondary", "aria-label": labels.groupBy, disabled: groupable.length === 0, children: [
8703
+ /* @__PURE__ */ jsx58(Rows3, {}),
8704
+ /* @__PURE__ */ jsx58(Text19, { as: "span", color: "fg.muted", fontWeight: "normal", children: labels.group }),
8423
8705
  groupLabel ?? labels.noGrouping,
8424
- /* @__PURE__ */ jsx56(ChevronDown3, {})
8706
+ /* @__PURE__ */ jsx58(ChevronDown3, {})
8425
8707
  ] }) }),
8426
- /* @__PURE__ */ jsx56(Portal16, { children: /* @__PURE__ */ jsx56(Menu4.Positioner, { children: /* @__PURE__ */ jsxs42(Menu4.Content, { minW: "48", children: [
8427
- /* @__PURE__ */ jsxs42(
8428
- Menu4.RadioItemGroup,
8708
+ /* @__PURE__ */ jsx58(Portal17, { children: /* @__PURE__ */ jsx58(Menu5.Positioner, { children: /* @__PURE__ */ jsxs44(Menu5.Content, { minW: "48", children: [
8709
+ /* @__PURE__ */ jsxs44(
8710
+ Menu5.RadioItemGroup,
8429
8711
  {
8430
8712
  value: groupField ?? "",
8431
8713
  onValueChange: (d) => change({ ...query, groupBy: d.value ? { field: d.value, aggregates: [] } : null }),
8432
8714
  children: [
8433
- /* @__PURE__ */ jsxs42(Menu4.RadioItem, { value: "", children: [
8715
+ /* @__PURE__ */ jsxs44(Menu5.RadioItem, { value: "", children: [
8434
8716
  labels.noGrouping,
8435
- /* @__PURE__ */ jsx56(Menu4.ItemIndicator, {})
8717
+ /* @__PURE__ */ jsx58(Menu5.ItemIndicator, {})
8436
8718
  ] }),
8437
- groupable.map((f) => /* @__PURE__ */ jsxs42(Menu4.RadioItem, { value: f.id, children: [
8719
+ groupable.map((f) => /* @__PURE__ */ jsxs44(Menu5.RadioItem, { value: f.id, children: [
8438
8720
  f.label,
8439
- /* @__PURE__ */ jsx56(Menu4.ItemIndicator, {})
8721
+ /* @__PURE__ */ jsx58(Menu5.ItemIndicator, {})
8440
8722
  ] }, f.id))
8441
8723
  ]
8442
8724
  }
8443
8725
  ),
8444
- groupField && groupable.length > 1 && /* @__PURE__ */ jsxs42(Fragment20, { children: [
8445
- /* @__PURE__ */ jsx56(Menu4.Separator, {}),
8446
- /* @__PURE__ */ jsxs42(
8447
- Menu4.RadioItemGroup,
8726
+ groupField && groupable.length > 1 && /* @__PURE__ */ jsxs44(Fragment21, { children: [
8727
+ /* @__PURE__ */ jsx58(Menu5.Separator, {}),
8728
+ /* @__PURE__ */ jsxs44(
8729
+ Menu5.RadioItemGroup,
8448
8730
  {
8449
8731
  value: thenField ?? "",
8450
8732
  onValueChange: (d) => change({ ...query, groupBy: { ...query.groupBy, then: d.value ? { field: d.value } : null } }),
8451
8733
  children: [
8452
- /* @__PURE__ */ jsx56(Menu4.ItemGroupLabel, { children: labels.thenBy }),
8453
- /* @__PURE__ */ jsxs42(Menu4.RadioItem, { value: "", children: [
8734
+ /* @__PURE__ */ jsx58(Menu5.ItemGroupLabel, { children: labels.thenBy }),
8735
+ /* @__PURE__ */ jsxs44(Menu5.RadioItem, { value: "", children: [
8454
8736
  labels.noSecondGrouping,
8455
- /* @__PURE__ */ jsx56(Menu4.ItemIndicator, {})
8737
+ /* @__PURE__ */ jsx58(Menu5.ItemIndicator, {})
8456
8738
  ] }),
8457
- groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */ jsxs42(Menu4.RadioItem, { value: f.id, children: [
8739
+ groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */ jsxs44(Menu5.RadioItem, { value: f.id, children: [
8458
8740
  f.label,
8459
- /* @__PURE__ */ jsx56(Menu4.ItemIndicator, {})
8741
+ /* @__PURE__ */ jsx58(Menu5.ItemIndicator, {})
8460
8742
  ] }, f.id))
8461
8743
  ]
8462
8744
  }
@@ -8464,15 +8746,29 @@ function QueryableList({
8464
8746
  ] })
8465
8747
  ] }) }) })
8466
8748
  ] }),
8467
- /* @__PURE__ */ jsx56(ColumnsPopover, { fields: fields ?? [], columns: state.columns, onChange: (next) => onStateChange({ ...state, rql: result?.rql ?? state.rql, query: void 0, columns: next }) }),
8468
- onExport && !exportTarget && /* @__PURE__ */ jsx56(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: runExport }),
8469
- onExport && exportTarget && createPortal(/* @__PURE__ */ jsx56(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: runExport }), exportTarget),
8749
+ /* @__PURE__ */ jsx58(ColumnsPopover, { fields: fields ?? [], columns: state.columns, onChange: (next) => onStateChange({ ...state, rql: result?.rql ?? state.rql, query: void 0, columns: next }) }),
8750
+ onExport && !exportTarget && /* @__PURE__ */ jsx58(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: setExportFormat }),
8751
+ onExport && exportTarget && createPortal(/* @__PURE__ */ jsx58(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: setExportFormat }), exportTarget),
8752
+ onExport && /* @__PURE__ */ jsx58(
8753
+ ExportDialog,
8754
+ {
8755
+ format: exportFormat,
8756
+ onClose: () => setExportFormat(null),
8757
+ fields: fields ?? [],
8758
+ shown: state.columns,
8759
+ columnLabels,
8760
+ found: total,
8761
+ filtered: Boolean((result?.rql ?? state.rql ?? "").trim()),
8762
+ sample: result?.items ?? [],
8763
+ onExport: (choice) => exportFormat && void runExport(exportFormat, choice)
8764
+ }
8765
+ ),
8470
8766
  actions
8471
8767
  ] })
8472
8768
  ] }),
8473
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", align: "start", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", children: [
8474
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", align: "start", wrap: "wrap", flex: "1", minW: { base: "full", md: "0" }, children: [
8475
- /* @__PURE__ */ jsx56(
8769
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", align: "start", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", children: [
8770
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", align: "start", wrap: "wrap", flex: "1", minW: { base: "full", md: "0" }, children: [
8771
+ /* @__PURE__ */ jsx58(
8476
8772
  SegmentedControl,
8477
8773
  {
8478
8774
  size: "sm",
@@ -8485,14 +8781,14 @@ function QueryableList({
8485
8781
  ]
8486
8782
  }
8487
8783
  ),
8488
- mode === "basic" && conditions !== null ? /* @__PURE__ */ jsxs42(HStack12, { gap: "2", wrap: "wrap", flex: "1", minW: "0", children: [
8489
- search && /* @__PURE__ */ jsx56(QuickSearch, { initial: searchText, placeholder: search.placeholder ?? labels.searchPlaceholder, onRun: runSearch }, searchText),
8490
- /* @__PURE__ */ jsxs42(AddButton, { onClick: () => setAdding(true), disabled: !fields, "data-add-filter": "", children: [
8784
+ mode === "basic" && conditions !== null ? /* @__PURE__ */ jsxs44(HStack12, { gap: "2", wrap: "wrap", flex: "1", minW: "0", children: [
8785
+ search && /* @__PURE__ */ jsx58(QuickSearch, { initial: searchText, placeholder: search.placeholder ?? labels.searchPlaceholder, onRun: runSearch }, searchText),
8786
+ /* @__PURE__ */ jsxs44(AddButton, { onClick: () => setAdding(true), disabled: !fields, "data-add-filter": "", children: [
8491
8787
  labels.addFilter,
8492
- chips.length > 0 && /* @__PURE__ */ jsx56(CountBadge, { value: chips.length, tone: "accent" })
8788
+ chips.length > 0 && /* @__PURE__ */ jsx58(CountBadge, { value: chips.length, tone: "accent" })
8493
8789
  ] }),
8494
- sortable.length > 0 && /* @__PURE__ */ jsxs42(HStack12, { gap: "1", flexShrink: 0, children: [
8495
- /* @__PURE__ */ jsx56(
8790
+ sortable.length > 0 && /* @__PURE__ */ jsxs44(HStack12, { gap: "1", flexShrink: 0, children: [
8791
+ /* @__PURE__ */ jsx58(
8496
8792
  SelectField,
8497
8793
  {
8498
8794
  width: "auto",
@@ -8507,7 +8803,7 @@ function QueryableList({
8507
8803
  ]
8508
8804
  }
8509
8805
  ),
8510
- sort && /* @__PURE__ */ jsx56(
8806
+ sort && /* @__PURE__ */ jsx58(
8511
8807
  IconButton,
8512
8808
  {
8513
8809
  size: "sm",
@@ -8515,11 +8811,11 @@ function QueryableList({
8515
8811
  "aria-label": sort.direction === "desc" ? labels.sortDescending : labels.sortAscending,
8516
8812
  title: sort.direction === "desc" ? labels.sortDescending : labels.sortAscending,
8517
8813
  onClick: () => change({ ...query, orderBy: [{ field: sort.columnId, desc: sort.direction !== "desc" }] }),
8518
- children: sort.direction === "desc" ? /* @__PURE__ */ jsx56(ArrowDownWideNarrow, {}) : /* @__PURE__ */ jsx56(ArrowUpNarrowWide, {})
8814
+ children: sort.direction === "desc" ? /* @__PURE__ */ jsx58(ArrowDownWideNarrow, {}) : /* @__PURE__ */ jsx58(ArrowUpNarrowWide, {})
8519
8815
  }
8520
8816
  )
8521
8817
  ] })
8522
- ] }) : /* @__PURE__ */ jsx56(
8818
+ ] }) : /* @__PURE__ */ jsx58(
8523
8819
  RqlBox,
8524
8820
  {
8525
8821
  initial: state.rql ?? result?.rql ?? "",
@@ -8530,11 +8826,11 @@ function QueryableList({
8530
8826
  state.rql ?? result?.rql ?? ""
8531
8827
  )
8532
8828
  ] }),
8533
- attention != null && /* @__PURE__ */ jsx56(HStack12, { gap: "2", wrap: "wrap", flexShrink: 0, children: attention })
8829
+ attention != null && /* @__PURE__ */ jsx58(HStack12, { gap: "2", wrap: "wrap", flexShrink: 0, children: attention })
8534
8830
  ] }),
8535
- mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */ jsxs42(HStack12, { gap: "2", wrap: "wrap", px: "2.5", py: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-filter-chips": "", children: [
8536
- chips.map(({ c: c2, i }) => /* @__PURE__ */ jsxs42(
8537
- chakra33.span,
8831
+ mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */ jsxs44(HStack12, { gap: "2", wrap: "wrap", px: "2.5", py: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-filter-chips": "", children: [
8832
+ chips.map(({ c: c2, i }) => /* @__PURE__ */ jsxs44(
8833
+ chakra35.span,
8538
8834
  {
8539
8835
  display: "inline-flex",
8540
8836
  alignItems: "center",
@@ -8548,17 +8844,17 @@ function QueryableList({
8548
8844
  bg: "bg.selected",
8549
8845
  textStyle: "sm",
8550
8846
  children: [
8551
- /* @__PURE__ */ jsx56(Text17, { as: "span", fontWeight: "medium", children: label(c2.field) }),
8552
- /* @__PURE__ */ jsx56(Text17, { as: "span", color: "fg.muted", children: opLabel(c2.op, c2.field) }),
8553
- !NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */ jsx56(Text17, { as: "span", children: valueText(c2.value) }),
8554
- /* @__PURE__ */ jsx56(IconButton, { size: "xs", variant: "ghost", "aria-label": fill4(labels.removeFilter, { field: label(c2.field) }), onClick: () => setConditions(conditions.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsx56(X2, {}) })
8847
+ /* @__PURE__ */ jsx58(Text19, { as: "span", fontWeight: "medium", children: label(c2.field) }),
8848
+ /* @__PURE__ */ jsx58(Text19, { as: "span", color: "fg.muted", children: opLabel(c2.op, c2.field) }),
8849
+ !NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */ jsx58(Text19, { as: "span", children: valueText(c2.value) }),
8850
+ /* @__PURE__ */ jsx58(IconButton, { size: "xs", variant: "ghost", "aria-label": fill4(labels.removeFilter, { field: label(c2.field) }), onClick: () => setConditions(conditions.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsx58(X2, {}) })
8555
8851
  ]
8556
8852
  },
8557
8853
  `${c2.field}-${i}`
8558
8854
  )),
8559
- /* @__PURE__ */ jsx56(Button, { size: "xs", variant: "ghost", onClick: () => setConditions(searching >= 0 ? [conditions[searching]] : []), children: labels.clearAll })
8855
+ /* @__PURE__ */ jsx58(Button, { size: "xs", variant: "ghost", onClick: () => setConditions(searching >= 0 ? [conditions[searching]] : []), children: labels.clearAll })
8560
8856
  ] }),
8561
- adding && fields && conditions !== null && /* @__PURE__ */ jsx56(
8857
+ adding && fields && conditions !== null && /* @__PURE__ */ jsx58(
8562
8858
  FilterBuilderDialog,
8563
8859
  {
8564
8860
  fields,
@@ -8573,26 +8869,26 @@ function QueryableList({
8573
8869
  }
8574
8870
  }
8575
8871
  ),
8576
- toolbarFooter != null && /* @__PURE__ */ jsx56(chakra33.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
8872
+ toolbarFooter != null && /* @__PURE__ */ jsx58(chakra35.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
8577
8873
  ] }),
8578
- mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx56(InlineAlert, { tone: "danger", children: error.message }),
8579
- exported && /* @__PURE__ */ jsx56(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */ jsxs42(HStack12, { justify: "space-between", gap: "2", align: "start", children: [
8580
- /* @__PURE__ */ jsx56(Text17, { as: "span", children: exported.message }),
8581
- /* @__PURE__ */ jsx56(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss, onClick: () => setExported(null), children: /* @__PURE__ */ jsx56(X2, {}) })
8874
+ mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx58(InlineAlert, { tone: "danger", children: error.message }),
8875
+ exported && /* @__PURE__ */ jsx58(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */ jsxs44(HStack12, { justify: "space-between", gap: "2", align: "start", children: [
8876
+ /* @__PURE__ */ jsx58(Text19, { as: "span", children: exported.message }),
8877
+ /* @__PURE__ */ jsx58(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss, onClick: () => setExported(null), children: /* @__PURE__ */ jsx58(X2, {}) })
8582
8878
  ] }) }),
8583
- /* @__PURE__ */ jsx56(
8879
+ /* @__PURE__ */ jsx58(
8584
8880
  Panel,
8585
8881
  {
8586
8882
  flush: true,
8587
8883
  footer: (
8588
8884
  // Expand and collapse at the start, the pages in the middle (the canvas's v12, UI round 9 step 67, round 10 step 73),
8589
8885
  // the range at the end, or with the arrows in the simple form.
8590
- /* @__PURE__ */ jsxs42(chakra33.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
8591
- /* @__PURE__ */ jsx56(HStack12, { gap: "3", children: grouped && /* @__PURE__ */ jsxs42(Fragment20, { children: [
8592
- /* @__PURE__ */ jsx56(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
8593
- /* @__PURE__ */ jsx56(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: groupKeys.every((k) => folded.has(k)), onClick: () => setFolded(new Set(groupKeys)), children: labels.collapseAll })
8886
+ /* @__PURE__ */ jsxs44(chakra35.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
8887
+ /* @__PURE__ */ jsx58(HStack12, { gap: "3", children: grouped && /* @__PURE__ */ jsxs44(Fragment21, { children: [
8888
+ /* @__PURE__ */ jsx58(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
8889
+ /* @__PURE__ */ jsx58(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: groupKeys.every((k) => folded.has(k)), onClick: () => setFolded(new Set(groupKeys)), children: labels.collapseAll })
8594
8890
  ] }) }),
8595
- /* @__PURE__ */ jsx56(
8891
+ /* @__PURE__ */ jsx58(
8596
8892
  Pagination,
8597
8893
  {
8598
8894
  page: Math.floor(skip / take) + 1,
@@ -8608,10 +8904,10 @@ function QueryableList({
8608
8904
  pageOf: fill4(labels.pageOf, { page: fmt.number(Math.floor(skip / take) + 1), pages: fmt.number(Math.max(1, Math.ceil(total / take))) })
8609
8905
  }
8610
8906
  ),
8611
- /* @__PURE__ */ jsx56(Text17, { textStyle: "caption", color: "fg.muted", textAlign: { md: "end" }, fontVariantNumeric: "tabular-nums", "aria-live": "polite", children: result && pagination !== "simple" ? fill4(labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(total) }) : " " })
8907
+ /* @__PURE__ */ jsx58(Text19, { textStyle: "caption", color: "fg.muted", textAlign: { md: "end" }, fontVariantNumeric: "tabular-nums", "aria-live": "polite", children: result && pagination !== "simple" ? fill4(labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(total) }) : " " })
8612
8908
  ] })
8613
8909
  ),
8614
- children: layout === "cards" && cards ? /* @__PURE__ */ jsx56(
8910
+ children: layout === "cards" && cards ? /* @__PURE__ */ jsx58(
8615
8911
  CardGrid,
8616
8912
  {
8617
8913
  "aria-label": ariaLabel,
@@ -8622,7 +8918,7 @@ function QueryableList({
8622
8918
  render: cards.render,
8623
8919
  empty: loadFailed != null && error?.failed && !result ? loadFailed : empty ?? labels.empty
8624
8920
  }
8625
- ) : /* @__PURE__ */ jsx56(
8921
+ ) : /* @__PURE__ */ jsx58(
8626
8922
  DataTable,
8627
8923
  {
8628
8924
  "aria-label": ariaLabel,
@@ -8668,11 +8964,11 @@ function QueryableList({
8668
8964
  const label2 = thenField ? info?.then?.label : info?.label;
8669
8965
  const value = thenField ? info?.then?.value ?? null : info?.value ?? null;
8670
8966
  const period = thenField ? query.groupBy?.then?.period : query.groupBy?.period;
8671
- return /* @__PURE__ */ jsxs42(HStack12, { gap: "2.5", flex: "1", minW: "0", children: [
8672
- /* @__PURE__ */ jsx56(chakra33.span, { display: "inline-flex", alignItems: "center", fontWeight: "medium", textStyle: "sm", minW: "0", children: raw == null || period || value == null ? groupName(value, label2, period) : renderCell(field, raw, first) }),
8673
- /* @__PURE__ */ jsx56(CountBadge, { value: info?.count ?? rows2.length }),
8967
+ return /* @__PURE__ */ jsxs44(HStack12, { gap: "2.5", flex: "1", minW: "0", children: [
8968
+ /* @__PURE__ */ jsx58(chakra35.span, { display: "inline-flex", alignItems: "center", fontWeight: "medium", textStyle: "sm", minW: "0", children: raw == null || period || value == null ? groupName(value, label2, period) : renderCell(field, raw, first) }),
8969
+ /* @__PURE__ */ jsx58(CountBadge, { value: info?.count ?? rows2.length }),
8674
8970
  !thenField && renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" }),
8675
- conditions !== null && !period && /* @__PURE__ */ jsxs42(
8971
+ conditions !== null && !period && /* @__PURE__ */ jsxs44(
8676
8972
  Button,
8677
8973
  {
8678
8974
  size: "xs",
@@ -8690,8 +8986,8 @@ function QueryableList({
8690
8986
  condition(field, value)
8691
8987
  ]),
8692
8988
  children: [
8693
- /* @__PURE__ */ jsx56(Filter, {}),
8694
- /* @__PURE__ */ jsx56(chakra33.span, { hideBelow: "md", children: labels.filterToGroup })
8989
+ /* @__PURE__ */ jsx58(Filter, {}),
8990
+ /* @__PURE__ */ jsx58(chakra35.span, { hideBelow: "md", children: labels.filterToGroup })
8695
8991
  ]
8696
8992
  }
8697
8993
  )
@@ -8710,9 +9006,9 @@ function QueryableList({
8710
9006
  const first = groups[0]?.rows[0];
8711
9007
  const raw = first?.values[groupField];
8712
9008
  const count = (result?.groups ?? []).filter((g) => groupKey(g.value) === parent).reduce((n, g) => n + g.count, 0);
8713
- return /* @__PURE__ */ jsxs42(HStack12, { gap: "2.5", flex: "1", minW: "0", children: [
8714
- /* @__PURE__ */ jsx56(chakra33.span, { display: "inline-flex", alignItems: "center", fontWeight: "bold", textStyle: "sm", minW: "0", children: raw == null || query.groupBy?.period || info?.value == null ? groupName(info?.value, info?.label, query.groupBy?.period) : renderCell(groupField, raw, first) }),
8715
- /* @__PURE__ */ jsx56(CountBadge, { value: count }),
9009
+ return /* @__PURE__ */ jsxs44(HStack12, { gap: "2.5", flex: "1", minW: "0", children: [
9010
+ /* @__PURE__ */ jsx58(chakra35.span, { display: "inline-flex", alignItems: "center", fontWeight: "bold", textStyle: "sm", minW: "0", children: raw == null || query.groupBy?.period || info?.value == null ? groupName(info?.value, info?.label, query.groupBy?.period) : renderCell(groupField, raw, first) }),
9011
+ /* @__PURE__ */ jsx58(CountBadge, { value: count }),
8716
9012
  renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" })
8717
9013
  ] });
8718
9014
  }
@@ -8748,15 +9044,15 @@ function QueryableList({
8748
9044
  }
8749
9045
  function QuickSearch({ initial, placeholder: placeholder2, onRun }) {
8750
9046
  const labels = useAbpLabels().queryList;
8751
- const [text, setText] = useState22(initial);
9047
+ const [text, setText] = useState24(initial);
8752
9048
  const timer = useRef19(void 0);
8753
- useEffect16(() => () => clearTimeout(timer.current), []);
9049
+ useEffect17(() => () => clearTimeout(timer.current), []);
8754
9050
  function later(next) {
8755
9051
  clearTimeout(timer.current);
8756
9052
  timer.current = setTimeout(() => next.trim() !== initial.trim() && onRun(next), 400);
8757
9053
  }
8758
- return /* @__PURE__ */ jsx56(
8759
- chakra33.form,
9054
+ return /* @__PURE__ */ jsx58(
9055
+ chakra35.form,
8760
9056
  {
8761
9057
  role: "search",
8762
9058
  flex: "1",
@@ -8767,7 +9063,7 @@ function QuickSearch({ initial, placeholder: placeholder2, onRun }) {
8767
9063
  clearTimeout(timer.current);
8768
9064
  if (text.trim() !== initial.trim()) onRun(text);
8769
9065
  },
8770
- children: /* @__PURE__ */ jsx56(
9066
+ children: /* @__PURE__ */ jsx58(
8771
9067
  SearchInput,
8772
9068
  {
8773
9069
  size: "sm",
@@ -8809,14 +9105,14 @@ function placeholderOf(id, kind) {
8809
9105
  }
8810
9106
  function ExportMenu({ busy, disabled, onExport }) {
8811
9107
  const labels = useAbpLabels().queryList;
8812
- return /* @__PURE__ */ jsxs42(Menu4.Root, { positioning: { placement: "bottom-end" }, onSelect: (d) => onExport(d.value), children: [
8813
- /* @__PURE__ */ jsx56(Menu4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs42(Button, { size: "sm", variant: "secondary", disabled: disabled || busy, loading: busy, loadingText: labels.exporting, children: [
8814
- /* @__PURE__ */ jsx56(Download, {}),
9108
+ return /* @__PURE__ */ jsxs44(Menu5.Root, { positioning: { placement: "bottom-end" }, onSelect: (d) => onExport(d.value), children: [
9109
+ /* @__PURE__ */ jsx58(Menu5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs44(Button, { size: "sm", variant: "secondary", disabled: disabled || busy, loading: busy, loadingText: labels.exporting, children: [
9110
+ /* @__PURE__ */ jsx58(Download, {}),
8815
9111
  labels.export
8816
9112
  ] }) }),
8817
- /* @__PURE__ */ jsx56(Portal16, { children: /* @__PURE__ */ jsx56(Menu4.Positioner, { children: /* @__PURE__ */ jsxs42(Menu4.Content, { minW: "48", children: [
8818
- /* @__PURE__ */ jsx56(Menu4.Item, { value: "csv", children: labels.exportCsv }),
8819
- /* @__PURE__ */ jsx56(Menu4.Item, { value: "xlsx", children: labels.exportExcel })
9113
+ /* @__PURE__ */ jsx58(Portal17, { children: /* @__PURE__ */ jsx58(Menu5.Positioner, { children: /* @__PURE__ */ jsxs44(Menu5.Content, { minW: "48", children: [
9114
+ /* @__PURE__ */ jsx58(Menu5.Item, { value: "csv", children: labels.exportCsv }),
9115
+ /* @__PURE__ */ jsx58(Menu5.Item, { value: "xlsx", children: labels.exportExcel })
8820
9116
  ] }) }) })
8821
9117
  ] });
8822
9118
  }
@@ -8827,14 +9123,14 @@ function RqlBox({
8827
9123
  onRun
8828
9124
  }) {
8829
9125
  const labels = useAbpLabels().queryList;
8830
- const [text, setText] = useState22(initial);
8831
- const [found, setFound] = useState22(null);
8832
- const [active, setActive] = useState22(0);
8833
- const [open, setOpen] = useState22(false);
9126
+ const [text, setText] = useState24(initial);
9127
+ const [found, setFound] = useState24(null);
9128
+ const [active, setActive] = useState24(0);
9129
+ const [open, setOpen] = useState24(false);
8834
9130
  const input = useRef19(null);
8835
9131
  const timer = useRef19(void 0);
8836
9132
  const seq = useRef19(0);
8837
- const listId = useId7();
9133
+ const listId = useId9();
8838
9134
  function ask(value, caret) {
8839
9135
  if (!suggest) return;
8840
9136
  clearTimeout(timer.current);
@@ -8848,7 +9144,7 @@ function RqlBox({
8848
9144
  }).catch(() => setOpen(false));
8849
9145
  }, 120);
8850
9146
  }
8851
- useEffect16(() => () => clearTimeout(timer.current), []);
9147
+ useEffect17(() => () => clearTimeout(timer.current), []);
8852
9148
  function accept(item) {
8853
9149
  if (!found) return;
8854
9150
  const before = text.slice(0, found.replaceStart);
@@ -8896,9 +9192,9 @@ function RqlBox({
8896
9192
  }
8897
9193
  }
8898
9194
  const hasSpan = error?.start != null && error.end != null && error.end >= error.start && error.end <= text.length;
8899
- return /* @__PURE__ */ jsxs42(Stack12, { gap: "1.5", flex: "1", minW: "0", position: "relative", children: [
8900
- /* @__PURE__ */ jsxs42(HStack12, { gap: "2", children: [
8901
- /* @__PURE__ */ jsx56(
9195
+ return /* @__PURE__ */ jsxs44(Stack14, { gap: "1.5", flex: "1", minW: "0", position: "relative", children: [
9196
+ /* @__PURE__ */ jsxs44(HStack12, { gap: "2", children: [
9197
+ /* @__PURE__ */ jsx58(
8902
9198
  Input7,
8903
9199
  {
8904
9200
  ref: input,
@@ -8924,10 +9220,10 @@ function RqlBox({
8924
9220
  onKeyDown
8925
9221
  }
8926
9222
  ),
8927
- /* @__PURE__ */ jsx56(Button, { size: "sm", variant: "primary", onClick: () => onRun(text.trim()), children: labels.run })
9223
+ /* @__PURE__ */ jsx58(Button, { size: "sm", variant: "primary", onClick: () => onRun(text.trim()), children: labels.run })
8928
9224
  ] }),
8929
- open && found && /* @__PURE__ */ jsx56(
8930
- Box11,
9225
+ open && found && /* @__PURE__ */ jsx58(
9226
+ Box12,
8931
9227
  {
8932
9228
  id: listId,
8933
9229
  role: "listbox",
@@ -8945,7 +9241,7 @@ function RqlBox({
8945
9241
  borderRadius: "md",
8946
9242
  boxShadow: "md",
8947
9243
  py: "1",
8948
- children: found.items.map((item, i) => /* @__PURE__ */ jsxs42(
9244
+ children: found.items.map((item, i) => /* @__PURE__ */ jsxs44(
8949
9245
  HStack12,
8950
9246
  {
8951
9247
  id: `${listId}-${i}`,
@@ -8963,28 +9259,28 @@ function RqlBox({
8963
9259
  },
8964
9260
  onMouseEnter: () => setActive(i),
8965
9261
  children: [
8966
- /* @__PURE__ */ jsx56(Text17, { as: "span", textStyle: "sm", fontFamily: item.kind === "person" || item.kind === "value" ? void 0 : "mono", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.label : item.text }),
8967
- /* @__PURE__ */ jsx56(Text17, { as: "span", textStyle: "xs", color: "fg.muted", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.text : item.label !== item.text ? item.label : labels.kinds[item.kind] ?? item.kind })
9262
+ /* @__PURE__ */ jsx58(Text19, { as: "span", textStyle: "sm", fontFamily: item.kind === "person" || item.kind === "value" ? void 0 : "mono", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.label : item.text }),
9263
+ /* @__PURE__ */ jsx58(Text19, { as: "span", textStyle: "xs", color: "fg.muted", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.text : item.label !== item.text ? item.label : labels.kinds[item.kind] ?? item.kind })
8968
9264
  ]
8969
9265
  },
8970
9266
  `${item.kind}-${item.text}`
8971
9267
  ))
8972
9268
  }
8973
9269
  ),
8974
- error && /* @__PURE__ */ jsxs42(InlineAlert, { tone: "danger", size: "sm", children: [
9270
+ error && /* @__PURE__ */ jsxs44(InlineAlert, { tone: "danger", size: "sm", children: [
8975
9271
  error.message,
8976
- hasSpan && /* @__PURE__ */ jsxs42(chakra33.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
9272
+ hasSpan && /* @__PURE__ */ jsxs44(chakra35.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
8977
9273
  text.slice(0, error.start),
8978
- /* @__PURE__ */ jsx56(chakra33.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
9274
+ /* @__PURE__ */ jsx58(chakra35.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
8979
9275
  text.slice(error.end)
8980
9276
  ] })
8981
9277
  ] })
8982
9278
  ] });
8983
9279
  }
8984
9280
  function CardGrid({ rows: rows2, loading, count, minWidth, render: render2, empty, "aria-label": label }) {
8985
- if (rows2 && rows2.length === 0 && !loading) return typeof empty === "string" ? /* @__PURE__ */ jsx56(EmptyState, { title: empty }) : /* @__PURE__ */ jsx56(Fragment20, { children: empty });
8986
- return /* @__PURE__ */ jsx56(
8987
- chakra33.ul,
9281
+ if (rows2 && rows2.length === 0 && !loading) return typeof empty === "string" ? /* @__PURE__ */ jsx58(EmptyState, { title: empty }) : /* @__PURE__ */ jsx58(Fragment21, { children: empty });
9282
+ return /* @__PURE__ */ jsx58(
9283
+ chakra35.ul,
8988
9284
  {
8989
9285
  role: "list",
8990
9286
  "aria-label": label,
@@ -8996,22 +9292,22 @@ function CardGrid({ rows: rows2, loading, count, minWidth, render: render2, empt
8996
9292
  gap: "3",
8997
9293
  gridTemplateColumns: `repeat(auto-fill, minmax(min(${minWidth}, 100%), 1fr))`,
8998
9294
  "data-layout": "cards",
8999
- children: rows2 ? rows2.map((row) => /* @__PURE__ */ jsx56(chakra33.li, { display: "flex", minW: "0", children: render2(row) }, row.id)) : Array.from({ length: Math.min(count, 9) }, (_, i) => /* @__PURE__ */ jsx56(chakra33.li, { h: "9.5rem", rounded: "lg", bg: "bg.subtle", "aria-hidden": true }, i))
9295
+ children: rows2 ? rows2.map((row) => /* @__PURE__ */ jsx58(chakra35.li, { display: "flex", minW: "0", children: render2(row) }, row.id)) : Array.from({ length: Math.min(count, 9) }, (_, i) => /* @__PURE__ */ jsx58(chakra35.li, { h: "9.5rem", rounded: "lg", bg: "bg.subtle", "aria-hidden": true }, i))
9000
9296
  }
9001
9297
  );
9002
9298
  }
9003
9299
 
9004
9300
  // src/components/FileDrop.tsx
9005
9301
  import { forwardRef as forwardRef9, useLayoutEffect as useLayoutEffect4, useRef as useRef20 } from "react";
9006
- import { Box as Box12, HStack as HStack13, Portal as Portal17, Text as Text18 } from "@chakra-ui/react";
9302
+ import { Box as Box13, HStack as HStack13, Portal as Portal18, Text as Text20 } from "@chakra-ui/react";
9007
9303
  import { ArrowDownToLine } from "lucide-react";
9008
- import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
9304
+ import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
9009
9305
  var OUT3 = `cubic-bezier(${curves.out.join(", ")})`;
9010
9306
  var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: over2 = false, hint, children, ...rest }, ref) {
9011
9307
  const { reduce } = useMotionSetting();
9012
9308
  const lit = awake || over2;
9013
- return /* @__PURE__ */ jsxs43(
9014
- Box12,
9309
+ return /* @__PURE__ */ jsxs45(
9310
+ Box13,
9015
9311
  {
9016
9312
  ref,
9017
9313
  position: "relative",
@@ -9029,7 +9325,7 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
9029
9325
  ...rest,
9030
9326
  children: [
9031
9327
  children,
9032
- /* @__PURE__ */ jsx57(Presence, { show: lit, from: "fade", position: "absolute", inset: "0", rounded: "l2", zIndex: "1", pointerEvents: "none", children: /* @__PURE__ */ jsxs43(
9328
+ /* @__PURE__ */ jsx59(Presence, { show: lit, from: "fade", position: "absolute", inset: "0", rounded: "l2", zIndex: "1", pointerEvents: "none", children: /* @__PURE__ */ jsxs45(
9033
9329
  HStack13,
9034
9330
  {
9035
9331
  h: "full",
@@ -9043,8 +9339,8 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
9043
9339
  textAlign: "center",
9044
9340
  style: { transition: "background-color 160ms ease" },
9045
9341
  children: [
9046
- /* @__PURE__ */ jsx57(Bob, { active: over2 && !reduce }),
9047
- /* @__PURE__ */ jsx57(Text18, { as: "span", truncate: true, children: hint })
9342
+ /* @__PURE__ */ jsx59(Bob, { active: over2 && !reduce }),
9343
+ /* @__PURE__ */ jsx59(Text20, { as: "span", truncate: true, children: hint })
9048
9344
  ]
9049
9345
  }
9050
9346
  ) })
@@ -9063,60 +9359,60 @@ function Bob({ active }) {
9063
9359
  });
9064
9360
  return () => animation?.cancel();
9065
9361
  }, [active]);
9066
- return /* @__PURE__ */ jsx57(Box12, { as: "span", ref, display: "inline-flex", flexShrink: 0, _icon: { boxSize: "4" }, children: /* @__PURE__ */ jsx57(ArrowDownToLine, {}) });
9362
+ return /* @__PURE__ */ jsx59(Box13, { as: "span", ref, display: "inline-flex", flexShrink: 0, _icon: { boxSize: "4" }, children: /* @__PURE__ */ jsx59(ArrowDownToLine, {}) });
9067
9363
  }
9068
9364
  function DropHint({ show, children }) {
9069
- return /* @__PURE__ */ jsx57(Portal17, { children: /* @__PURE__ */ jsx57(Box12, { position: "fixed", insetInline: "0", bottom: "6", display: "flex", justifyContent: "center", pointerEvents: "none", zIndex: "toast", px: "4", children: /* @__PURE__ */ jsx57(Presence, { show, from: "rise", children: /* @__PURE__ */ jsxs43(HStack13, { gap: "2", px: "4", py: "2", rounded: "full", bg: "bg.inverted", color: "fg.inverted", shadow: "lg", textStyle: "body.sm", fontWeight: "medium", maxW: "lg", "data-testid": "drop-hint", _icon: { boxSize: "4" }, children: [
9070
- /* @__PURE__ */ jsx57(ArrowDownToLine, {}),
9071
- /* @__PURE__ */ jsx57(Text18, { as: "span", truncate: true, children })
9365
+ return /* @__PURE__ */ jsx59(Portal18, { children: /* @__PURE__ */ jsx59(Box13, { position: "fixed", insetInline: "0", bottom: "6", display: "flex", justifyContent: "center", pointerEvents: "none", zIndex: "toast", px: "4", children: /* @__PURE__ */ jsx59(Presence, { show, from: "rise", children: /* @__PURE__ */ jsxs45(HStack13, { gap: "2", px: "4", py: "2", rounded: "full", bg: "bg.inverted", color: "fg.inverted", shadow: "lg", textStyle: "body.sm", fontWeight: "medium", maxW: "lg", "data-testid": "drop-hint", _icon: { boxSize: "4" }, children: [
9366
+ /* @__PURE__ */ jsx59(ArrowDownToLine, {}),
9367
+ /* @__PURE__ */ jsx59(Text20, { as: "span", truncate: true, children })
9072
9368
  ] }) }) }) });
9073
9369
  }
9074
9370
 
9075
9371
  // src/components/UploadList.tsx
9076
9372
  import { useLayoutEffect as useLayoutEffect5, useRef as useRef21 } from "react";
9077
- import { Box as Box13, chakra as chakra34, HStack as HStack14, Stack as Stack13, Text as Text19 } from "@chakra-ui/react";
9373
+ import { Box as Box14, chakra as chakra36, HStack as HStack14, Stack as Stack15, Text as Text21 } from "@chakra-ui/react";
9078
9374
  import { Check as Check3, File as FileIcon, RotateCcw, TriangleAlert, X as X3 } from "lucide-react";
9079
- import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
9375
+ import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
9080
9376
  var OUT4 = `cubic-bezier(${curves.out.join(", ")})`;
9081
9377
  function UploadList({ rows: rows2, summary, fraction, announce, labels, onCancel, onRetry, onDismiss }) {
9082
- return /* @__PURE__ */ jsxs44(Stack13, { gap: "2", "data-testid": "upload-list", children: [
9083
- /* @__PURE__ */ jsx58(chakra34.span, { srOnly: true, "aria-live": "polite", children: announce }),
9084
- rows2.length > 0 && summary != null && /* @__PURE__ */ jsxs44(Stack13, { gap: "1", children: [
9085
- /* @__PURE__ */ jsx58(Text19, { textStyle: "caption", color: "fg.muted", children: summary }),
9086
- fraction != null && /* @__PURE__ */ jsx58(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
9378
+ return /* @__PURE__ */ jsxs46(Stack15, { gap: "2", "data-testid": "upload-list", children: [
9379
+ /* @__PURE__ */ jsx60(chakra36.span, { srOnly: true, "aria-live": "polite", children: announce }),
9380
+ rows2.length > 0 && summary != null && /* @__PURE__ */ jsxs46(Stack15, { gap: "1", children: [
9381
+ /* @__PURE__ */ jsx60(Text21, { textStyle: "caption", color: "fg.muted", children: summary }),
9382
+ fraction != null && /* @__PURE__ */ jsx60(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
9087
9383
  ] }),
9088
- /* @__PURE__ */ jsx58(Stack13, { gap: "1.5", position: "relative", children: /* @__PURE__ */ jsx58(PresenceList, { children: rows2.map((row) => /* @__PURE__ */ jsx58(PresenceItem, { children: /* @__PURE__ */ jsx58(Row, { row, labels, onCancel, onRetry, onDismiss }) }, row.id)) }) })
9384
+ /* @__PURE__ */ jsx60(Stack15, { gap: "1.5", position: "relative", children: /* @__PURE__ */ jsx60(PresenceList, { children: rows2.map((row) => /* @__PURE__ */ jsx60(PresenceItem, { children: /* @__PURE__ */ jsx60(Row, { row, labels, onCancel, onRetry, onDismiss }) }, row.id)) }) })
9089
9385
  ] });
9090
9386
  }
9091
9387
  function Row({ row, labels, onCancel, onRetry, onDismiss }) {
9092
9388
  const going = row.state === "waiting" || row.state === "sending";
9093
9389
  const trouble = row.state === "failed" || row.state === "refused";
9094
- return /* @__PURE__ */ jsxs44(HStack14, { gap: "3", px: "3", py: "2", rounded: "l2", bg: "bg.subtle", borderWidth: "1px", borderColor: trouble ? "border.error" : "border.muted", "data-upload": row.name, "data-state": row.state, children: [
9095
- /* @__PURE__ */ jsx58(Preview, { src: row.preview }),
9096
- /* @__PURE__ */ jsxs44(Stack13, { gap: "1", flex: "1", minW: "0", children: [
9097
- /* @__PURE__ */ jsxs44(HStack14, { gap: "2", justify: "space-between", children: [
9098
- /* @__PURE__ */ jsx58(Text19, { as: "span", fontWeight: "medium", truncate: true, children: /* @__PURE__ */ jsx58("bdi", { children: row.name }) }),
9099
- /* @__PURE__ */ jsx58(Text19, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", flexShrink: 0, fontVariantNumeric: "tabular-nums", children: row.state === "done" ? /* @__PURE__ */ jsx58(Done, {}) : row.status })
9390
+ return /* @__PURE__ */ jsxs46(HStack14, { gap: "3", px: "3", py: "2", rounded: "l2", bg: "bg.subtle", borderWidth: "1px", borderColor: trouble ? "border.error" : "border.muted", "data-upload": row.name, "data-state": row.state, children: [
9391
+ /* @__PURE__ */ jsx60(Preview, { src: row.preview }),
9392
+ /* @__PURE__ */ jsxs46(Stack15, { gap: "1", flex: "1", minW: "0", children: [
9393
+ /* @__PURE__ */ jsxs46(HStack14, { gap: "2", justify: "space-between", children: [
9394
+ /* @__PURE__ */ jsx60(Text21, { as: "span", fontWeight: "medium", truncate: true, children: /* @__PURE__ */ jsx60("bdi", { children: row.name }) }),
9395
+ /* @__PURE__ */ jsx60(Text21, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", flexShrink: 0, fontVariantNumeric: "tabular-nums", children: row.state === "done" ? /* @__PURE__ */ jsx60(Done, {}) : row.status })
9100
9396
  ] }),
9101
- (going || row.state === "done") && /* @__PURE__ */ jsx58(Bar2, { fraction: row.state === "done" ? 1 : row.fraction, tone: row.state === "done" ? "success" : "accent", label: row.name, quiet: row.state === "waiting" }),
9102
- row.detail != null && /* @__PURE__ */ jsxs44(Text19, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", truncate: true, children: [
9103
- trouble && /* @__PURE__ */ jsx58(Box13, { as: "span", display: "inline-flex", verticalAlign: "-0.15em", me: "1", _icon: { boxSize: "3.5" }, children: /* @__PURE__ */ jsx58(TriangleAlert, {}) }),
9397
+ (going || row.state === "done") && /* @__PURE__ */ jsx60(Bar2, { fraction: row.state === "done" ? 1 : row.fraction, tone: row.state === "done" ? "success" : "accent", label: row.name, quiet: row.state === "waiting" }),
9398
+ row.detail != null && /* @__PURE__ */ jsxs46(Text21, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", truncate: true, children: [
9399
+ trouble && /* @__PURE__ */ jsx60(Box14, { as: "span", display: "inline-flex", verticalAlign: "-0.15em", me: "1", _icon: { boxSize: "3.5" }, children: /* @__PURE__ */ jsx60(TriangleAlert, {}) }),
9104
9400
  row.detail
9105
9401
  ] })
9106
9402
  ] }),
9107
- going && /* @__PURE__ */ jsx58(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.cancel(row.name), onClick: () => onCancel(row.id), children: /* @__PURE__ */ jsx58(X3, {}) }),
9108
- row.state === "failed" && /* @__PURE__ */ jsx58(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.retry(row.name), onClick: () => onRetry(row.id), children: /* @__PURE__ */ jsx58(RotateCcw, {}) }),
9109
- trouble && /* @__PURE__ */ jsx58(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss(row.name), onClick: () => onDismiss(row.id), children: /* @__PURE__ */ jsx58(X3, {}) })
9403
+ going && /* @__PURE__ */ jsx60(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.cancel(row.name), onClick: () => onCancel(row.id), children: /* @__PURE__ */ jsx60(X3, {}) }),
9404
+ row.state === "failed" && /* @__PURE__ */ jsx60(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.retry(row.name), onClick: () => onRetry(row.id), children: /* @__PURE__ */ jsx60(RotateCcw, {}) }),
9405
+ trouble && /* @__PURE__ */ jsx60(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss(row.name), onClick: () => onDismiss(row.id), children: /* @__PURE__ */ jsx60(X3, {}) })
9110
9406
  ] });
9111
9407
  }
9112
9408
  function Preview({ src }) {
9113
- return /* @__PURE__ */ jsx58(Box13, { boxSize: "8", flexShrink: 0, rounded: "l1", overflow: "hidden", bg: "bg.muted", color: "fg.subtle", display: "grid", placeItems: "center", _icon: { boxSize: "4" }, children: src ? /* @__PURE__ */ jsx58(chakra34.img, { src, alt: "", boxSize: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx58(FileIcon, {}) });
9409
+ return /* @__PURE__ */ jsx60(Box14, { boxSize: "8", flexShrink: 0, rounded: "l1", overflow: "hidden", bg: "bg.muted", color: "fg.subtle", display: "grid", placeItems: "center", _icon: { boxSize: "4" }, children: src ? /* @__PURE__ */ jsx60(chakra36.img, { src, alt: "", boxSize: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx60(FileIcon, {}) });
9114
9410
  }
9115
9411
  function Bar2({ fraction, tone, label, quiet: quiet2 }) {
9116
9412
  const { reduce } = useMotionSetting();
9117
9413
  const percent = Math.round(Math.max(0, Math.min(1, fraction)) * 100);
9118
- return /* @__PURE__ */ jsx58(Box13, { h: "1", rounded: "full", bg: "bg.emphasized", overflow: "hidden", opacity: quiet2 ? 0.6 : 1, role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, children: /* @__PURE__ */ jsx58(
9119
- Box13,
9414
+ return /* @__PURE__ */ jsx60(Box14, { h: "1", rounded: "full", bg: "bg.emphasized", overflow: "hidden", opacity: quiet2 ? 0.6 : 1, role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, children: /* @__PURE__ */ jsx60(
9415
+ Box14,
9120
9416
  {
9121
9417
  h: "full",
9122
9418
  rounded: "full",
@@ -9142,11 +9438,11 @@ function Done() {
9142
9438
  { duration: 260, easing: OUT4 }
9143
9439
  );
9144
9440
  }, []);
9145
- return /* @__PURE__ */ jsx58(chakra34.span, { ref, display: "inline-grid", placeItems: "center", boxSize: "4", rounded: "full", bg: "fg.success", color: "bg", _icon: { boxSize: "3" }, children: /* @__PURE__ */ jsx58(Check3, { strokeWidth: 3 }) });
9441
+ return /* @__PURE__ */ jsx60(chakra36.span, { ref, display: "inline-grid", placeItems: "center", boxSize: "4", rounded: "full", bg: "fg.success", color: "bg", _icon: { boxSize: "3" }, children: /* @__PURE__ */ jsx60(Check3, { strokeWidth: 3 }) });
9146
9442
  }
9147
9443
 
9148
9444
  // src/files/drop.ts
9149
- import { useEffect as useEffect17, useRef as useRef22, useState as useState23, useSyncExternalStore as useSyncExternalStore3 } from "react";
9445
+ import { useEffect as useEffect18, useRef as useRef22, useState as useState25, useSyncExternalStore as useSyncExternalStore3 } from "react";
9150
9446
 
9151
9447
  // src/files/upload-plan.ts
9152
9448
  var UPLOADS_AT_ONCE = 3;
@@ -9305,12 +9601,12 @@ function droppedFiles(data) {
9305
9601
  return Promise.resolve(Array.from(data.files).filter((f) => !JUNK.test(f.name)).map((file) => ({ file, path: file.name })));
9306
9602
  }
9307
9603
  function useDropZone(ref, { enabled = true, onFiles }) {
9308
- const [state, setState] = useState23({ over: false, part: null });
9604
+ const [state, setState] = useState25({ over: false, part: null });
9309
9605
  const take = useRef22(onFiles);
9310
- useEffect17(() => {
9606
+ useEffect18(() => {
9311
9607
  take.current = onFiles;
9312
9608
  }, [onFiles]);
9313
- useEffect17(() => {
9609
+ useEffect18(() => {
9314
9610
  const zone = ref.current;
9315
9611
  if (!zone || !enabled) return;
9316
9612
  let depth = 0;
@@ -9358,10 +9654,10 @@ function useDropZone(ref, { enabled = true, onFiles }) {
9358
9654
  }
9359
9655
  function usePageDrop({ enabled = true, onFiles }) {
9360
9656
  const take = useRef22(onFiles);
9361
- useEffect17(() => {
9657
+ useEffect18(() => {
9362
9658
  take.current = onFiles;
9363
9659
  }, [onFiles]);
9364
- useEffect17(() => {
9660
+ useEffect18(() => {
9365
9661
  if (!enabled) return;
9366
9662
  const move = (e) => {
9367
9663
  if (!isFiles(e)) return;
@@ -9384,10 +9680,10 @@ function usePageDrop({ enabled = true, onFiles }) {
9384
9680
  var editable = (target) => target instanceof HTMLElement && (target.isContentEditable || target.closest('input, textarea, select, [contenteditable=""], [contenteditable=true]') != null);
9385
9681
  function usePastedFiles({ enabled = true, onFiles }) {
9386
9682
  const take = useRef22(onFiles);
9387
- useEffect17(() => {
9683
+ useEffect18(() => {
9388
9684
  take.current = onFiles;
9389
9685
  }, [onFiles]);
9390
- useEffect17(() => {
9686
+ useEffect18(() => {
9391
9687
  if (!enabled) return;
9392
9688
  const paste = (e) => {
9393
9689
  const data = e.clipboardData;
@@ -9412,8 +9708,8 @@ function usePastedFiles({ enabled = true, onFiles }) {
9412
9708
  }
9413
9709
 
9414
9710
  // src/components/SortableSections.tsx
9415
- import { useMemo as useMemo13, useState as useState24 } from "react";
9416
- import { Box as Box14, Stack as Stack14, Text as Text20 } from "@chakra-ui/react";
9711
+ import { useMemo as useMemo14, useState as useState26 } from "react";
9712
+ import { Box as Box15, Stack as Stack16, Text as Text22 } from "@chakra-ui/react";
9417
9713
  import {
9418
9714
  DndContext as DndContext4,
9419
9715
  DragOverlay as DragOverlay3,
@@ -9426,7 +9722,7 @@ import {
9426
9722
  } from "@dnd-kit/core";
9427
9723
  import { SortableContext as SortableContext3, sortableKeyboardCoordinates as sortableKeyboardCoordinates3, useSortable as useSortable3, verticalListSortingStrategy as verticalListSortingStrategy3 } from "@dnd-kit/sortable";
9428
9724
  import { CSS as CSS4 } from "@dnd-kit/utilities";
9429
- import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
9725
+ import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
9430
9726
  var sectionId = (id) => `section:${id}`;
9431
9727
  function SortableSections({
9432
9728
  "aria-label": ariaLabel,
@@ -9440,13 +9736,13 @@ function SortableSections({
9440
9736
  skeletonItemHeight = "9"
9441
9737
  }) {
9442
9738
  const loading = useLoading(own);
9443
- const shown = loading && sections.length === 0 ? [0, 1].map((n) => ({ id: `skeleton-${n}`, header: /* @__PURE__ */ jsx59(TextBone, { width: boneWidth(n, 14, 22) }), items: [] })) : sections;
9739
+ const shown = loading && sections.length === 0 ? [0, 1].map((n) => ({ id: `skeleton-${n}`, header: /* @__PURE__ */ jsx61(TextBone, { width: boneWidth(n, 14, 22) }), items: [] })) : sections;
9444
9740
  const sensors = useSensors4(
9445
9741
  useSensor4(PointerSensor4, { activationConstraint: { distance: 6 } }),
9446
9742
  useSensor4(KeyboardSensor3, { coordinateGetter: sortableKeyboardCoordinates3 })
9447
9743
  );
9448
- const [active, setActive] = useState24(null);
9449
- const sectionOf = useMemo13(() => {
9744
+ const [active, setActive] = useState26(null);
9745
+ const sectionOf = useMemo14(() => {
9450
9746
  const map = /* @__PURE__ */ new Map();
9451
9747
  for (const s of sections) for (const item of s.items) map.set(item.id, s.id);
9452
9748
  return map;
@@ -9476,7 +9772,7 @@ function SortableSections({
9476
9772
  if (from === target && !move.before && !move.after) return;
9477
9773
  onMove(item, move);
9478
9774
  }
9479
- return /* @__PURE__ */ jsxs45(
9775
+ return /* @__PURE__ */ jsxs47(
9480
9776
  DndContext4,
9481
9777
  {
9482
9778
  sensors,
@@ -9486,16 +9782,16 @@ function SortableSections({
9486
9782
  onDragCancel: () => setActive(null),
9487
9783
  accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
9488
9784
  children: [
9489
- /* @__PURE__ */ jsx59(Stack14, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */ jsxs45(Section, { section: s, dragging: !!active, children: [
9490
- loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */ jsxs45(Box14, { h: skeletonItemHeight, px: "2", display: "flex", alignItems: "center", gap: "3", "aria-hidden": "true", children: [
9491
- /* @__PURE__ */ jsx59(Bone, { width: "14", height: "4" }),
9492
- /* @__PURE__ */ jsx59(TextBone, { width: boneWidth(n, 16, 36) })
9785
+ /* @__PURE__ */ jsx61(Stack16, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */ jsxs47(Section, { section: s, dragging: !!active, children: [
9786
+ loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */ jsxs47(Box15, { h: skeletonItemHeight, px: "2", display: "flex", alignItems: "center", gap: "3", "aria-hidden": "true", children: [
9787
+ /* @__PURE__ */ jsx61(Bone, { width: "14", height: "4" }),
9788
+ /* @__PURE__ */ jsx61(TextBone, { width: boneWidth(n, 16, 36) })
9493
9789
  ] }, n)),
9494
- s.items.map((item) => /* @__PURE__ */ jsx59(SortableItem, { id: item.id, children: (dragging) => renderItem(item, { dragging }) }, item.id)),
9495
- !loading && s.items.length === 0 && s.empty && /* @__PURE__ */ jsx59(Text20, { textStyle: "caption", color: "fg.subtle", textAlign: "center", py: "4", children: s.empty }),
9790
+ s.items.map((item) => /* @__PURE__ */ jsx61(SortableItem, { id: item.id, children: (dragging) => renderItem(item, { dragging }) }, item.id)),
9791
+ !loading && s.items.length === 0 && s.empty && /* @__PURE__ */ jsx61(Text22, { textStyle: "caption", color: "fg.subtle", textAlign: "center", py: "4", children: s.empty }),
9496
9792
  !loading && s.footer
9497
9793
  ] }, s.id)) }),
9498
- /* @__PURE__ */ jsx59(DragOverlay3, { children: active ? /* @__PURE__ */ jsx59(Box14, { shadow: "lg", rounded: "l2", bg: "bg.panel", children: renderItem(active, { dragging: true }) }) : null })
9794
+ /* @__PURE__ */ jsx61(DragOverlay3, { children: active ? /* @__PURE__ */ jsx61(Box15, { shadow: "lg", rounded: "l2", bg: "bg.panel", children: renderItem(active, { dragging: true }) }) : null })
9499
9795
  ]
9500
9796
  }
9501
9797
  );
@@ -9503,10 +9799,10 @@ function SortableSections({
9503
9799
  function Section({ section, dragging, children }) {
9504
9800
  const id = sectionId(section.id);
9505
9801
  const { setNodeRef, isOver } = useDroppable3({ id });
9506
- return /* @__PURE__ */ jsxs45(Box14, { as: "section", borderWidth: "1px", borderColor: "border", rounded: "l3", bg: "bg.panel", "data-section": section.id, children: [
9507
- /* @__PURE__ */ jsx59(Box14, { px: "3", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: section.header }),
9508
- /* @__PURE__ */ jsx59(SortableContext3, { id, items: section.items.map((i) => i.id), strategy: verticalListSortingStrategy3, children: /* @__PURE__ */ jsx59(
9509
- Stack14,
9802
+ return /* @__PURE__ */ jsxs47(Box15, { as: "section", borderWidth: "1px", borderColor: "border", rounded: "l3", bg: "bg.panel", "data-section": section.id, children: [
9803
+ /* @__PURE__ */ jsx61(Box15, { px: "3", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: section.header }),
9804
+ /* @__PURE__ */ jsx61(SortableContext3, { id, items: section.items.map((i) => i.id), strategy: verticalListSortingStrategy3, children: /* @__PURE__ */ jsx61(
9805
+ Stack16,
9510
9806
  {
9511
9807
  ref: setNodeRef,
9512
9808
  gap: "0",
@@ -9522,8 +9818,8 @@ function Section({ section, dragging, children }) {
9522
9818
  }
9523
9819
  function SortableItem({ id, children }) {
9524
9820
  const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable3({ id });
9525
- return /* @__PURE__ */ jsx59(
9526
- Box14,
9821
+ return /* @__PURE__ */ jsx61(
9822
+ Box15,
9527
9823
  {
9528
9824
  ref: setNodeRef,
9529
9825
  style: { transform: CSS4.Transform.toString(transform), transition },
@@ -9539,10 +9835,10 @@ function SortableItem({ id, children }) {
9539
9835
  }
9540
9836
 
9541
9837
  // src/components/TimelineChart.tsx
9542
- import { Fragment as Fragment21, useEffect as useEffect18, useLayoutEffect as useLayoutEffect6, useRef as useRef23, useState as useState25 } from "react";
9543
- import { Box as Box15, HStack as HStack15, Popover as Popover4, Portal as Portal18, Stack as Stack15, Text as Text21 } from "@chakra-ui/react";
9838
+ import { Fragment as Fragment22, useEffect as useEffect19, useLayoutEffect as useLayoutEffect6, useRef as useRef23, useState as useState27 } from "react";
9839
+ import { Box as Box16, HStack as HStack15, Popover as Popover4, Portal as Portal19, Stack as Stack17, Text as Text23 } from "@chakra-ui/react";
9544
9840
  import { Flag, Trash2 as Trash23 } from "lucide-react";
9545
- import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
9841
+ import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
9546
9842
  var DAY2 = 864e5;
9547
9843
  var toDay = (day) => Math.round(Date.parse(`${day}T00:00:00Z`) / DAY2);
9548
9844
  var fromDay = (n) => new Date(n * DAY2).toISOString().slice(0, 10);
@@ -9581,8 +9877,8 @@ function TimelineChart({
9581
9877
  const placeholders = useLoading(own) && rows2.length === 0;
9582
9878
  const shown = placeholders ? Array.from({ length: skeletonRows }, (_, i) => ({ id: `skeleton-${i}` })) : rows2;
9583
9879
  const root = useRef23(null);
9584
- const [room, setRoom] = useState25(0);
9585
- useEffect18(() => {
9880
+ const [room, setRoom] = useState27(0);
9881
+ useEffect19(() => {
9586
9882
  const el = root.current;
9587
9883
  if (!fill5 || !el) return;
9588
9884
  const observer = new ResizeObserver(() => setRoom(Math.max(0, el.clientWidth - labelWidth)));
@@ -9592,7 +9888,7 @@ function TimelineChart({
9592
9888
  const origin = toDay(from);
9593
9889
  const days = Math.max(toDay(to) - origin + 1, fill5 ? Math.floor(room / dayWidth) : 0);
9594
9890
  const width = days * dayWidth;
9595
- const [drag, setDrag] = useState25(null);
9891
+ const [drag, setDrag] = useState27(null);
9596
9892
  const moved = useRef23(false);
9597
9893
  const scrolled = useRef23(0);
9598
9894
  const lastWidth = useRef23(dayWidth);
@@ -9612,7 +9908,7 @@ function TimelineChart({
9612
9908
  }, [dayWidth, labelWidth]);
9613
9909
  const zoomRef = useRef23({ onZoom, dayWidth });
9614
9910
  zoomRef.current = { onZoom, dayWidth };
9615
- useEffect18(() => {
9911
+ useEffect19(() => {
9616
9912
  const el = root.current;
9617
9913
  if (!el) return;
9618
9914
  let sum = 0;
@@ -9640,28 +9936,28 @@ function TimelineChart({
9640
9936
  }
9641
9937
  const { reduce } = useMotionSetting();
9642
9938
  const layer = useRef23(null);
9643
- const [linking, setLinking] = useState25(null);
9644
- const [hot, setHot] = useState25(null);
9645
- const [menu, setMenu] = useState25(null);
9646
- useEffect18(() => {
9939
+ const [linking, setLinking] = useState27(null);
9940
+ const [hot, setHot] = useState27(null);
9941
+ const [menu, setMenu] = useState27(null);
9942
+ useEffect19(() => {
9647
9943
  if (!linking) return;
9648
9944
  const cancel = (e) => e.key === "Escape" && setLinking(null);
9649
9945
  window.addEventListener("keydown", cancel);
9650
9946
  return () => window.removeEventListener("keydown", cancel);
9651
9947
  }, [linking]);
9652
- const [card, setCard] = useState25(null);
9948
+ const [card, setCard] = useState27(null);
9653
9949
  const cardTimer = useRef23(void 0);
9654
9950
  const cardOff = () => {
9655
9951
  clearTimeout(cardTimer.current);
9656
9952
  setCard(null);
9657
9953
  };
9658
- useEffect18(() => () => clearTimeout(cardTimer.current), []);
9659
- useEffect18(() => {
9954
+ useEffect19(() => () => clearTimeout(cardTimer.current), []);
9955
+ useEffect19(() => {
9660
9956
  if (!card) return;
9661
9957
  window.addEventListener("scroll", cardOff, true);
9662
9958
  return () => window.removeEventListener("scroll", cardOff, true);
9663
9959
  }, [card]);
9664
- useEffect18(() => {
9960
+ useEffect19(() => {
9665
9961
  const el = root.current;
9666
9962
  if (!reveal || !el) return;
9667
9963
  const at = toDay(reveal.day) - origin;
@@ -9670,7 +9966,7 @@ function TimelineChart({
9670
9966
  el.scrollTo({ left: getComputedStyle(el).direction === "rtl" ? -x : x, behavior: reduce ? "auto" : "smooth" });
9671
9967
  }, [reveal]);
9672
9968
  const refocus = useRef23(null);
9673
- useEffect18(() => {
9969
+ useEffect19(() => {
9674
9970
  if (!refocus.current) return;
9675
9971
  const bar = root.current?.querySelector(`[data-bar="${CSS.escape(refocus.current)}"]`);
9676
9972
  if (bar && document.activeElement !== bar) bar.focus();
@@ -9811,8 +10107,8 @@ function TimelineChart({
9811
10107
  const bandsTop = tickHeight, markersTop = tickHeight + (shownBands.length ? STRIP : 0);
9812
10108
  const headerHeight = markersTop + (shownMarkers.length ? STRIP : 0);
9813
10109
  const todayAt = today ? toDay(today) - origin : -1;
9814
- return /* @__PURE__ */ jsxs46(
9815
- Box15,
10110
+ return /* @__PURE__ */ jsxs48(
10111
+ Box16,
9816
10112
  {
9817
10113
  ref: root,
9818
10114
  role: "region",
@@ -9829,10 +10125,10 @@ function TimelineChart({
9829
10125
  },
9830
10126
  onKeyDown: zoomKey,
9831
10127
  children: [
9832
- instructions && /* @__PURE__ */ jsx60(Text21, { srOnly: true, children: instructions }),
9833
- /* @__PURE__ */ jsxs46(Box15, { display: "grid", gridTemplateColumns: fill5 ? `${labelWidth}px minmax(${width}px, 1fr)` : `${labelWidth}px ${width}px`, minW: "fit-content", children: [
9834
- /* @__PURE__ */ jsx60(
9835
- Box15,
10128
+ instructions && /* @__PURE__ */ jsx62(Text23, { srOnly: true, children: instructions }),
10129
+ /* @__PURE__ */ jsxs48(Box16, { display: "grid", gridTemplateColumns: fill5 ? `${labelWidth}px minmax(${width}px, 1fr)` : `${labelWidth}px ${width}px`, minW: "fit-content", children: [
10130
+ /* @__PURE__ */ jsx62(
10131
+ Box16,
9836
10132
  {
9837
10133
  position: "sticky",
9838
10134
  top: "0",
@@ -9850,9 +10146,9 @@ function TimelineChart({
9850
10146
  children: corner
9851
10147
  }
9852
10148
  ),
9853
- /* @__PURE__ */ jsxs46(Box15, { position: "sticky", top: "0", zIndex: "2", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", h: `${headerHeight}px`, overflow: "clip", children: [
9854
- ticks.map((t, i) => /* @__PURE__ */ jsx60(
9855
- Box15,
10149
+ /* @__PURE__ */ jsxs48(Box16, { position: "sticky", top: "0", zIndex: "2", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", h: `${headerHeight}px`, overflow: "clip", children: [
10150
+ ticks.map((t, i) => /* @__PURE__ */ jsx62(
10151
+ Box16,
9856
10152
  {
9857
10153
  position: "absolute",
9858
10154
  insetStart: `${t.day * dayWidth}px`,
@@ -9862,8 +10158,8 @@ function TimelineChart({
9862
10158
  borderInlineStartWidth: "1px",
9863
10159
  borderColor: "border",
9864
10160
  "aria-hidden": true,
9865
- children: /* @__PURE__ */ jsx60(
9866
- Text21,
10161
+ children: /* @__PURE__ */ jsx62(
10162
+ Text23,
9867
10163
  {
9868
10164
  position: "sticky",
9869
10165
  insetStart: `${labelWidth}px`,
@@ -9881,8 +10177,8 @@ function TimelineChart({
9881
10177
  },
9882
10178
  t.day
9883
10179
  )),
9884
- subTicks.map((t) => /* @__PURE__ */ jsx60(
9885
- Text21,
10180
+ subTicks.map((t) => /* @__PURE__ */ jsx62(
10181
+ Text23,
9886
10182
  {
9887
10183
  position: "absolute",
9888
10184
  insetStart: `${t.day * dayWidth}px`,
@@ -9901,8 +10197,8 @@ function TimelineChart({
9901
10197
  },
9902
10198
  t.day
9903
10199
  )),
9904
- offRuns.filter((o) => o.kind === "holiday").map((o) => /* @__PURE__ */ jsx60(Tooltip, { content: o.label, children: /* @__PURE__ */ jsx60(
9905
- Box15,
10200
+ offRuns.filter((o) => o.kind === "holiday").map((o) => /* @__PURE__ */ jsx62(Tooltip, { content: o.label, children: /* @__PURE__ */ jsx62(
10201
+ Box16,
9906
10202
  {
9907
10203
  position: "absolute",
9908
10204
  insetStart: `${o.a * dayWidth}px`,
@@ -9916,8 +10212,8 @@ function TimelineChart({
9916
10212
  "aria-label": o.label
9917
10213
  }
9918
10214
  ) }, `h${o.a}`)),
9919
- shownBands.map((b) => /* @__PURE__ */ jsx60(Tooltip, { content: b.detail ?? b.label, children: /* @__PURE__ */ jsx60(
9920
- Box15,
10215
+ shownBands.map((b) => /* @__PURE__ */ jsx62(Tooltip, { content: b.detail ?? b.label, children: /* @__PURE__ */ jsx62(
10216
+ Box16,
9921
10217
  {
9922
10218
  position: "absolute",
9923
10219
  insetStart: `${b.a * dayWidth + 1}px`,
@@ -9933,8 +10229,8 @@ function TimelineChart({
9933
10229
  focusVisibleRing: "inside",
9934
10230
  overflow: "clip",
9935
10231
  "aria-label": b.label,
9936
- children: /* @__PURE__ */ jsx60(
9937
- Text21,
10232
+ children: /* @__PURE__ */ jsx62(
10233
+ Text23,
9938
10234
  {
9939
10235
  position: "sticky",
9940
10236
  insetStart: `${labelWidth}px`,
@@ -9946,13 +10242,13 @@ function TimelineChart({
9946
10242
  color: b.current ? "colorPalette.fg" : "fg.muted",
9947
10243
  fontWeight: b.current ? "medium" : void 0,
9948
10244
  truncate: true,
9949
- children: /* @__PURE__ */ jsx60("bdi", { children: b.label })
10245
+ children: /* @__PURE__ */ jsx62("bdi", { children: b.label })
9950
10246
  }
9951
10247
  )
9952
10248
  }
9953
10249
  ) }, b.id)),
9954
- shownMarkers.map((m4) => /* @__PURE__ */ jsx60(Tooltip, { content: m4.detail ?? m4.label, children: /* @__PURE__ */ jsxs46(
9955
- Box15,
10250
+ shownMarkers.map((m4) => /* @__PURE__ */ jsx62(Tooltip, { content: m4.detail ?? m4.label, children: /* @__PURE__ */ jsxs48(
10251
+ Box16,
9956
10252
  {
9957
10253
  position: "absolute",
9958
10254
  insetStart: `${m4.at * dayWidth + dayWidth / 2 - 1}px`,
@@ -9976,16 +10272,16 @@ function TimelineChart({
9976
10272
  focusVisibleRing: "outside",
9977
10273
  "aria-label": m4.label,
9978
10274
  children: [
9979
- /* @__PURE__ */ jsx60(Flag, { size: 11, "aria-hidden": true }),
9980
- /* @__PURE__ */ jsx60("bdi", { children: m4.label })
10275
+ /* @__PURE__ */ jsx62(Flag, { size: 11, "aria-hidden": true }),
10276
+ /* @__PURE__ */ jsx62("bdi", { children: m4.label })
9981
10277
  ]
9982
10278
  }
9983
10279
  ) }, m4.id))
9984
10280
  ] }),
9985
- /* @__PURE__ */ jsx60(Box15, { position: "sticky", insetStart: "0", zIndex: "1", bg: "bg.panel", borderInlineEndWidth: "1px", borderColor: "border", children: shown.map((r, i) => /* @__PURE__ */ jsx60(HStack15, { h: `${rowHeight}px`, px: "3", gap: "2", borderBottomWidth: "1px", borderColor: "border.muted", bg: r.heading && !r.lane ? "bg.subtle" : void 0, minW: "0", children: placeholders ? /* @__PURE__ */ jsx60(TextBone, { width: boneWidth(i, 12, 26) }) : r.heading ?? (r.item && renderLabel(r.item)) }, r.id)) }),
9986
- /* @__PURE__ */ jsxs46(Box15, { ref: layer, position: "relative", zIndex: "0", h: `${shown.length * rowHeight}px`, children: [
9987
- offRuns.map((o) => /* @__PURE__ */ jsx60(
9988
- Box15,
10281
+ /* @__PURE__ */ jsx62(Box16, { position: "sticky", insetStart: "0", zIndex: "1", bg: "bg.panel", borderInlineEndWidth: "1px", borderColor: "border", children: shown.map((r, i) => /* @__PURE__ */ jsx62(HStack15, { h: `${rowHeight}px`, px: "3", gap: "2", borderBottomWidth: "1px", borderColor: "border.muted", bg: r.heading && !r.lane ? "bg.subtle" : void 0, minW: "0", children: placeholders ? /* @__PURE__ */ jsx62(TextBone, { width: boneWidth(i, 12, 26) }) : r.heading ?? (r.item && renderLabel(r.item)) }, r.id)) }),
10282
+ /* @__PURE__ */ jsxs48(Box16, { ref: layer, position: "relative", zIndex: "0", h: `${shown.length * rowHeight}px`, children: [
10283
+ offRuns.map((o) => /* @__PURE__ */ jsx62(
10284
+ Box16,
9989
10285
  {
9990
10286
  position: "absolute",
9991
10287
  insetStart: `${o.a * dayWidth}px`,
@@ -9999,9 +10295,9 @@ function TimelineChart({
9999
10295
  },
10000
10296
  `o${o.a}`
10001
10297
  )),
10002
- ticks.map((t) => /* @__PURE__ */ jsx60(Box15, { position: "absolute", insetStart: `${t.day * dayWidth}px`, top: "0", bottom: "0", borderInlineStartWidth: "1px", borderColor: "border.muted", "aria-hidden": true }, t.day)),
10003
- shownBands.filter((b) => b.current).map((b) => /* @__PURE__ */ jsx60(
10004
- Box15,
10298
+ ticks.map((t) => /* @__PURE__ */ jsx62(Box16, { position: "absolute", insetStart: `${t.day * dayWidth}px`, top: "0", bottom: "0", borderInlineStartWidth: "1px", borderColor: "border.muted", "aria-hidden": true }, t.day)),
10299
+ shownBands.filter((b) => b.current).map((b) => /* @__PURE__ */ jsx62(
10300
+ Box16,
10005
10301
  {
10006
10302
  position: "absolute",
10007
10303
  insetStart: `${b.a * dayWidth}px`,
@@ -10015,8 +10311,8 @@ function TimelineChart({
10015
10311
  },
10016
10312
  b.id
10017
10313
  )),
10018
- shownMarkers.map((m4) => /* @__PURE__ */ jsx60(
10019
- Box15,
10314
+ shownMarkers.map((m4) => /* @__PURE__ */ jsx62(
10315
+ Box16,
10020
10316
  {
10021
10317
  position: "absolute",
10022
10318
  insetStart: `${m4.at * dayWidth + dayWidth / 2 - 1}px`,
@@ -10032,8 +10328,8 @@ function TimelineChart({
10032
10328
  },
10033
10329
  m4.id
10034
10330
  )),
10035
- todayAt >= 0 && todayAt < days && /* @__PURE__ */ jsx60(
10036
- Box15,
10331
+ todayAt >= 0 && todayAt < days && /* @__PURE__ */ jsx62(
10332
+ Box16,
10037
10333
  {
10038
10334
  position: "absolute",
10039
10335
  insetStart: `${todayAt * dayWidth + dayWidth / 2}px`,
@@ -10045,8 +10341,8 @@ function TimelineChart({
10045
10341
  "aria-hidden": true
10046
10342
  }
10047
10343
  ),
10048
- shown.map((r, i) => /* @__PURE__ */ jsx60(
10049
- Box15,
10344
+ shown.map((r, i) => /* @__PURE__ */ jsx62(
10345
+ Box16,
10050
10346
  {
10051
10347
  position: "absolute",
10052
10348
  insetStart: "0",
@@ -10060,7 +10356,7 @@ function TimelineChart({
10060
10356
  },
10061
10357
  r.id
10062
10358
  )),
10063
- placeholders && shown.map((r, i) => /* @__PURE__ */ jsx60(
10359
+ placeholders && shown.map((r, i) => /* @__PURE__ */ jsx62(
10064
10360
  Bone,
10065
10361
  {
10066
10362
  position: "absolute",
@@ -10077,8 +10373,8 @@ function TimelineChart({
10077
10373
  if (!bl || !bl.start && !bl.end) return null;
10078
10374
  const a = Math.max(toDay(bl.start ?? bl.end) - origin, 0), z = Math.min(toDay(bl.end ?? bl.start) - origin, days - 1);
10079
10375
  if (z < a) return null;
10080
- return /* @__PURE__ */ jsx60(
10081
- Box15,
10376
+ return /* @__PURE__ */ jsx62(
10377
+ Box16,
10082
10378
  {
10083
10379
  position: "absolute",
10084
10380
  insetStart: `${a * dayWidth}px`,
@@ -10099,8 +10395,8 @@ function TimelineChart({
10099
10395
  if (z < a) return null;
10100
10396
  const w = (z - a + 1) * dayWidth - 2;
10101
10397
  const palette3 = c2.tone === "over" ? "danger" : c2.tone === "full" ? "warning" : "accent";
10102
- return /* @__PURE__ */ jsx60(
10103
- Box15,
10398
+ return /* @__PURE__ */ jsx62(
10399
+ Box16,
10104
10400
  {
10105
10401
  position: "absolute",
10106
10402
  insetStart: `${a * dayWidth + 1}px`,
@@ -10140,9 +10436,9 @@ function TimelineChart({
10140
10436
  const thin = tone === "rollup" && !single;
10141
10437
  const diamond = single ? { w: `${DIAMOND}px`, h: `${DIAMOND}px`, top: `${i * rowHeight + rowHeight / 2 - DIAMOND / 2}px`, transform: "rotate(45deg)", rounded: "l1" } : null;
10142
10438
  const canLink = !!onLink && item.linkable !== false && !drag;
10143
- return /* @__PURE__ */ jsxs46(Fragment21, { children: [
10144
- /* @__PURE__ */ jsxs46(
10145
- Box15,
10439
+ return /* @__PURE__ */ jsxs48(Fragment22, { children: [
10440
+ /* @__PURE__ */ jsxs48(
10441
+ Box16,
10146
10442
  {
10147
10443
  role: "button",
10148
10444
  tabIndex: 0,
@@ -10197,8 +10493,8 @@ function TimelineChart({
10197
10493
  "data-bar": item.id,
10198
10494
  children: [
10199
10495
  !single && !thin && renderBar?.(item),
10200
- item.progress != null && !single && /* @__PURE__ */ jsx60(
10201
- Box15,
10496
+ item.progress != null && !single && /* @__PURE__ */ jsx62(
10497
+ Box16,
10202
10498
  {
10203
10499
  position: "absolute",
10204
10500
  insetStart: "0",
@@ -10213,8 +10509,8 @@ function TimelineChart({
10213
10509
  ),
10214
10510
  item.movable !== false && !single && // The edge sits inside the bar: its moves and release stop here, or the bar would handle them too and the
10215
10511
  // change would be saved twice (the second refused as a conflict).
10216
- /* @__PURE__ */ jsx60(
10217
- Box15,
10512
+ /* @__PURE__ */ jsx62(
10513
+ Box16,
10218
10514
  {
10219
10515
  position: "absolute",
10220
10516
  insetEnd: "0",
@@ -10237,8 +10533,8 @@ function TimelineChart({
10237
10533
  ]
10238
10534
  }
10239
10535
  ),
10240
- canLink && (hot === item.id || linking?.from.id === item.id) && /* @__PURE__ */ jsx60(
10241
- Box15,
10536
+ canLink && (hot === item.id || linking?.from.id === item.id) && /* @__PURE__ */ jsx62(
10537
+ Box16,
10242
10538
  {
10243
10539
  position: "absolute",
10244
10540
  insetStart: `${single ? right + 3 : Math.max(right, left + 6)}px`,
@@ -10259,13 +10555,13 @@ function TimelineChart({
10259
10555
  onPointerUp: linkUp,
10260
10556
  onPointerCancel: () => setLinking(null),
10261
10557
  "aria-hidden": true,
10262
- children: /* @__PURE__ */ jsx60(Box15, { w: "2.5", h: "2.5", rounded: "full", bg: "bg.panel", borderWidth: "2px", borderColor: "accent.solid" })
10558
+ children: /* @__PURE__ */ jsx62(Box16, { w: "2.5", h: "2.5", rounded: "full", bg: "bg.panel", borderWidth: "2px", borderColor: "accent.solid" })
10263
10559
  }
10264
10560
  )
10265
10561
  ] }, item.id);
10266
10562
  }),
10267
- /* @__PURE__ */ jsx60(
10268
- Box15,
10563
+ /* @__PURE__ */ jsx62(
10564
+ Box16,
10269
10565
  {
10270
10566
  position: "absolute",
10271
10567
  insetInlineStart: "0",
@@ -10276,8 +10572,8 @@ function TimelineChart({
10276
10572
  zIndex: "1",
10277
10573
  _rtl: { transform: "scaleX(-1)" },
10278
10574
  "aria-hidden": !onUnlink,
10279
- children: /* @__PURE__ */ jsxs46("svg", { width, height: rows2.length * rowHeight, style: { position: "absolute", left: 0, top: 0 }, children: [
10280
- /* @__PURE__ */ jsx60("defs", { children: /* @__PURE__ */ jsx60("marker", { id: "abp-arrow", viewBox: "0 0 8 8", refX: "7", refY: "4", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx60("path", { d: "M 0 0 L 8 4 L 0 8 z", fill: "context-stroke" }) }) }),
10575
+ children: /* @__PURE__ */ jsxs48("svg", { width, height: rows2.length * rowHeight, style: { position: "absolute", left: 0, top: 0 }, children: [
10576
+ /* @__PURE__ */ jsx62("defs", { children: /* @__PURE__ */ jsx62("marker", { id: "abp-arrow", viewBox: "0 0 8 8", refX: "7", refY: "4", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx62("path", { d: "M 0 0 L 8 4 L 0 8 z", fill: "context-stroke" }) }) }),
10281
10577
  links.map((l) => {
10282
10578
  const f = ys.get(l.from), t = ys.get(l.to);
10283
10579
  if (!f || !t) return null;
@@ -10288,8 +10584,8 @@ function TimelineChart({
10288
10584
  const picked = menu?.from === l.from && menu.to === l.to;
10289
10585
  const faint = !l.strong && links.some((x) => x.strong);
10290
10586
  const open = (x, y) => setMenu({ from: l.from, to: l.to, x, y });
10291
- return /* @__PURE__ */ jsxs46("g", { children: [
10292
- /* @__PURE__ */ jsx60(
10587
+ return /* @__PURE__ */ jsxs48("g", { children: [
10588
+ /* @__PURE__ */ jsx62(
10293
10589
  "path",
10294
10590
  {
10295
10591
  d,
@@ -10301,7 +10597,7 @@ function TimelineChart({
10301
10597
  markerEnd: "url(#abp-arrow)"
10302
10598
  }
10303
10599
  ),
10304
- onUnlink && /* @__PURE__ */ jsx60(
10600
+ onUnlink && /* @__PURE__ */ jsx62(
10305
10601
  "path",
10306
10602
  {
10307
10603
  d,
@@ -10326,14 +10622,14 @@ function TimelineChart({
10326
10622
  ] })
10327
10623
  }
10328
10624
  ),
10329
- linking && /* @__PURE__ */ jsxs46("svg", { width: "100%", height: shown.length * rowHeight, style: { position: "absolute", left: 0, top: 0, pointerEvents: "none", zIndex: 3 }, "aria-hidden": true, children: [
10330
- /* @__PURE__ */ jsx60("line", { x1: linking.x0, y1: linking.y0, x2: linking.x, y2: linking.y, stroke: tv("colors.accent.solid"), strokeWidth: 2, strokeDasharray: "5 4" }),
10331
- /* @__PURE__ */ jsx60("circle", { cx: linking.x, cy: linking.y, r: 4, fill: tv("colors.accent.solid") })
10625
+ linking && /* @__PURE__ */ jsxs48("svg", { width: "100%", height: shown.length * rowHeight, style: { position: "absolute", left: 0, top: 0, pointerEvents: "none", zIndex: 3 }, "aria-hidden": true, children: [
10626
+ /* @__PURE__ */ jsx62("line", { x1: linking.x0, y1: linking.y0, x2: linking.x, y2: linking.y, stroke: tv("colors.accent.solid"), strokeWidth: 2, strokeDasharray: "5 4" }),
10627
+ /* @__PURE__ */ jsx62("circle", { cx: linking.x, cy: linking.y, r: 4, fill: tv("colors.accent.solid") })
10332
10628
  ] })
10333
10629
  ] })
10334
10630
  ] }),
10335
- card && renderCard && items.has(card.id) && /* @__PURE__ */ jsx60(Portal18, { children: /* @__PURE__ */ jsx60(
10336
- Box15,
10631
+ card && renderCard && items.has(card.id) && /* @__PURE__ */ jsx62(Portal19, { children: /* @__PURE__ */ jsx62(
10632
+ Box16,
10337
10633
  {
10338
10634
  id: "abp-timeline-card",
10339
10635
  role: "tooltip",
@@ -10356,7 +10652,7 @@ function TimelineChart({
10356
10652
  children: renderCard(items.get(card.id))
10357
10653
  }
10358
10654
  ) }),
10359
- onUnlink && /* @__PURE__ */ jsx60(
10655
+ onUnlink && /* @__PURE__ */ jsx62(
10360
10656
  Popover4.Root,
10361
10657
  {
10362
10658
  open: !!menu,
@@ -10365,13 +10661,13 @@ function TimelineChart({
10365
10661
  unmountOnExit: true,
10366
10662
  autoFocus: true,
10367
10663
  positioning: { placement: "bottom", getAnchorRect: () => menu ? { x: menu.x, y: menu.y, width: 1, height: 1 } : null },
10368
- children: /* @__PURE__ */ jsx60(Portal18, { children: /* @__PURE__ */ jsx60(Popover4.Positioner, { children: /* @__PURE__ */ jsx60(Popover4.Content, { w: "auto", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx60(Popover4.Body, { children: menu && /* @__PURE__ */ jsxs46(Stack15, { gap: "2", children: [
10369
- /* @__PURE__ */ jsx60(Text21, { textStyle: "label", children: linkTexts?.arrow(menu.from, menu.to) }),
10370
- /* @__PURE__ */ jsxs46(Button, { size: "sm", variant: "secondary", onClick: () => {
10664
+ children: /* @__PURE__ */ jsx62(Portal19, { children: /* @__PURE__ */ jsx62(Popover4.Positioner, { children: /* @__PURE__ */ jsx62(Popover4.Content, { w: "auto", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx62(Popover4.Body, { children: menu && /* @__PURE__ */ jsxs48(Stack17, { gap: "2", children: [
10665
+ /* @__PURE__ */ jsx62(Text23, { textStyle: "label", children: linkTexts?.arrow(menu.from, menu.to) }),
10666
+ /* @__PURE__ */ jsxs48(Button, { size: "sm", variant: "secondary", onClick: () => {
10371
10667
  onUnlink(menu);
10372
10668
  setMenu(null);
10373
10669
  }, children: [
10374
- /* @__PURE__ */ jsx60(Trash23, {}),
10670
+ /* @__PURE__ */ jsx62(Trash23, {}),
10375
10671
  linkTexts?.remove
10376
10672
  ] })
10377
10673
  ] }) }) }) }) })
@@ -10383,8 +10679,8 @@ function TimelineChart({
10383
10679
  }
10384
10680
 
10385
10681
  // src/components/TimelineCards.tsx
10386
- import { useEffect as useEffect19, useMemo as useMemo14, useRef as useRef24, useState as useState26 } from "react";
10387
- import { Box as Box16, chakra as chakra35, Grid as Grid4, Stack as Stack16, Text as Text22 } from "@chakra-ui/react";
10682
+ import { useEffect as useEffect20, useMemo as useMemo15, useRef as useRef24, useState as useState28 } from "react";
10683
+ import { Box as Box17, chakra as chakra37, Grid as Grid4, Stack as Stack18, Text as Text24 } from "@chakra-ui/react";
10388
10684
 
10389
10685
  // src/components/timeline-cards-math.ts
10390
10686
  var DAY3 = 864e5;
@@ -10436,7 +10732,7 @@ function placeCards(items, first, days, scale, colW = columnWidth(scale)) {
10436
10732
  }
10437
10733
 
10438
10734
  // src/components/TimelineCards.tsx
10439
- import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
10735
+ import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
10440
10736
  var LANE = 60;
10441
10737
  var KEYS = { d: "day", w: "week", m: "month" };
10442
10738
  function TimelineCards(props) {
@@ -10450,8 +10746,8 @@ function TimelineCards(props) {
10450
10746
  onScale(next);
10451
10747
  }
10452
10748
  };
10453
- return /* @__PURE__ */ jsxs47(
10454
- chakra35.div,
10749
+ return /* @__PURE__ */ jsxs49(
10750
+ chakra37.div,
10455
10751
  {
10456
10752
  role: "region",
10457
10753
  "aria-label": props["aria-label"],
@@ -10461,15 +10757,15 @@ function TimelineCards(props) {
10461
10757
  overflow: "hidden",
10462
10758
  "data-timeline-cards": scale,
10463
10759
  children: [
10464
- scale === "day" ? /* @__PURE__ */ jsx61(DayGrid, { ...props }) : /* @__PURE__ */ jsx61(Lanes, { ...props, scale }),
10760
+ scale === "day" ? /* @__PURE__ */ jsx63(DayGrid, { ...props }) : /* @__PURE__ */ jsx63(Lanes, { ...props, scale }),
10465
10761
  props.footer
10466
10762
  ]
10467
10763
  }
10468
10764
  );
10469
10765
  }
10470
10766
  function Card2({ item, p, range, cutStart, cutEnd, style }) {
10471
- const card = /* @__PURE__ */ jsxs47(
10472
- chakra35.button,
10767
+ const card = /* @__PURE__ */ jsxs49(
10768
+ chakra37.button,
10473
10769
  {
10474
10770
  type: "button",
10475
10771
  "data-timeline-card": item.id,
@@ -10493,18 +10789,18 @@ function Card2({ item, p, range, cutStart, cutEnd, style }) {
10493
10789
  transition: "background 120ms, border-color 120ms",
10494
10790
  ...style,
10495
10791
  children: [
10496
- /* @__PURE__ */ jsx61(Box16, { as: "span", w: "3px", flexShrink: 0, bg: p.accent?.(item) ?? "border.emphasized", "aria-hidden": true }),
10497
- /* @__PURE__ */ jsx61(Stack16, { as: "span", gap: "0.5", px: "2.5", py: "1.5", minW: "0", flex: "1", justify: "center", children: p.renderCard(item, { range }) })
10792
+ /* @__PURE__ */ jsx63(Box17, { as: "span", w: "3px", flexShrink: 0, bg: p.accent?.(item) ?? "border.emphasized", "aria-hidden": true }),
10793
+ /* @__PURE__ */ jsx63(Stack18, { as: "span", gap: "0.5", px: "2.5", py: "1.5", minW: "0", flex: "1", justify: "center", children: p.renderCard(item, { range }) })
10498
10794
  ]
10499
10795
  }
10500
10796
  );
10501
- return p.details ? /* @__PURE__ */ jsx61(Tooltip, { content: p.details(item), positioning: { placement: "bottom-start" }, openDelay: 250, children: card }) : card;
10797
+ return p.details ? /* @__PURE__ */ jsx63(Tooltip, { content: p.details(item), positioning: { placement: "bottom-start" }, openDelay: 250, children: card }) : card;
10502
10798
  }
10503
10799
  function Lanes(p) {
10504
10800
  const { days, today, items, scale } = p;
10505
10801
  const box = useRef24(null);
10506
- const [available, setAvailable] = useState26(0);
10507
- useEffect19(() => {
10802
+ const [available, setAvailable] = useState28(0);
10803
+ useEffect20(() => {
10508
10804
  const el = box.current;
10509
10805
  if (!el) return;
10510
10806
  const measure = () => setAvailable(el.clientWidth);
@@ -10514,18 +10810,18 @@ function Lanes(p) {
10514
10810
  return () => observer.disconnect();
10515
10811
  }, []);
10516
10812
  const colW = columnWidth(scale, days.length, available);
10517
- const byId = useMemo14(() => new Map(items.map((i) => [i.id, i])), [items]);
10518
- const { cards, lanes } = useMemo14(() => placeCards(items, days[0], days.length, scale, colW), [items, days, scale, colW]);
10813
+ const byId = useMemo15(() => new Map(items.map((i) => [i.id, i])), [items]);
10814
+ const { cards, lanes } = useMemo15(() => placeCards(items, days[0], days.length, scale, colW), [items, days, scale, colW]);
10519
10815
  const todayIdx = days.indexOf(today);
10520
10816
  const gridW = days.length * colW;
10521
10817
  const placeholders = useLoading(p.loading) && items.length === 0;
10522
10818
  const height = (placeholders ? 4 : Math.max(lanes, 1)) * LANE + 16;
10523
- return /* @__PURE__ */ jsx61(chakra35.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs47(chakra35.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
10524
- /* @__PURE__ */ jsx61(chakra35.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
10819
+ return /* @__PURE__ */ jsx63(chakra37.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs49(chakra37.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
10820
+ /* @__PURE__ */ jsx63(chakra37.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
10525
10821
  const isToday = d === today;
10526
10822
  const weekStart = new Date(dayNumber(d) * 864e5).getUTCDay() === 0;
10527
- return /* @__PURE__ */ jsxs47(
10528
- chakra35.div,
10823
+ return /* @__PURE__ */ jsxs49(
10824
+ chakra37.div,
10529
10825
  {
10530
10826
  w: `${colW}px`,
10531
10827
  flexShrink: 0,
@@ -10541,9 +10837,9 @@ function Lanes(p) {
10541
10837
  borderInlineStartWidth: weekStart && scale === "month" ? "1px" : "0",
10542
10838
  borderColor: "border",
10543
10839
  children: [
10544
- /* @__PURE__ */ jsx61(Text22, { as: "span", children: p.weekday(d) }),
10545
- /* @__PURE__ */ jsx61(
10546
- Text22,
10840
+ /* @__PURE__ */ jsx63(Text24, { as: "span", children: p.weekday(d) }),
10841
+ /* @__PURE__ */ jsx63(
10842
+ Text24,
10547
10843
  {
10548
10844
  as: "span",
10549
10845
  fontVariantNumeric: "tabular-nums",
@@ -10561,9 +10857,9 @@ function Lanes(p) {
10561
10857
  d
10562
10858
  );
10563
10859
  }) }),
10564
- /* @__PURE__ */ jsx61(chakra35.div, { position: "absolute", insetInlineStart: "0", top: "0", bottom: "0", display: "flex", pointerEvents: "none", "aria-hidden": true, children: days.map((d) => /* @__PURE__ */ jsx61(chakra35.div, { w: `${colW}px`, flexShrink: 0, borderInlineEndWidth: "1px", borderStyle: "dashed", borderColor: "border.muted" }, d)) }),
10565
- todayIdx >= 0 && /* @__PURE__ */ jsx61(
10566
- chakra35.div,
10860
+ /* @__PURE__ */ jsx63(chakra37.div, { position: "absolute", insetInlineStart: "0", top: "0", bottom: "0", display: "flex", pointerEvents: "none", "aria-hidden": true, children: days.map((d) => /* @__PURE__ */ jsx63(chakra37.div, { w: `${colW}px`, flexShrink: 0, borderInlineEndWidth: "1px", borderStyle: "dashed", borderColor: "border.muted" }, d)) }),
10861
+ todayIdx >= 0 && /* @__PURE__ */ jsx63(
10862
+ chakra37.div,
10567
10863
  {
10568
10864
  position: "absolute",
10569
10865
  top: "0",
@@ -10577,7 +10873,7 @@ function Lanes(p) {
10577
10873
  zIndex: "1"
10578
10874
  }
10579
10875
  ),
10580
- placeholders ? /* @__PURE__ */ jsx61(chakra35.div, { position: "relative", h: `${height}px`, "aria-hidden": true, children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx61(
10876
+ placeholders ? /* @__PURE__ */ jsx63(chakra37.div, { position: "relative", h: `${height}px`, "aria-hidden": true, children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx63(
10581
10877
  Bone,
10582
10878
  {
10583
10879
  position: "absolute",
@@ -10588,10 +10884,10 @@ function Lanes(p) {
10588
10884
  borderRadius: "l2"
10589
10885
  },
10590
10886
  i
10591
- )) }) : cards.length === 0 && p.empty ? /* @__PURE__ */ jsx61(chakra35.div, { position: "relative", py: "6", children: p.empty }) : /* @__PURE__ */ jsx61(chakra35.div, { position: "relative", h: `${height}px`, role: "list", children: cards.map((c2) => {
10887
+ )) }) : cards.length === 0 && p.empty ? /* @__PURE__ */ jsx63(chakra37.div, { position: "relative", py: "6", children: p.empty }) : /* @__PURE__ */ jsx63(chakra37.div, { position: "relative", h: `${height}px`, role: "list", children: cards.map((c2) => {
10592
10888
  const item = byId.get(c2.id);
10593
- return /* @__PURE__ */ jsx61(
10594
- chakra35.div,
10889
+ return /* @__PURE__ */ jsx63(
10890
+ chakra37.div,
10595
10891
  {
10596
10892
  role: "listitem",
10597
10893
  position: "absolute",
@@ -10600,7 +10896,7 @@ function Lanes(p) {
10600
10896
  w: `${c2.width}px`,
10601
10897
  display: "flex",
10602
10898
  zIndex: "2",
10603
- children: /* @__PURE__ */ jsx61(Card2, { item, p, range: c2.range, cutStart: c2.cutStart, cutEnd: c2.cutEnd, style: { w: "full" } })
10899
+ children: /* @__PURE__ */ jsx63(Card2, { item, p, range: c2.range, cutStart: c2.cutStart, cutEnd: c2.cutEnd, style: { w: "full" } })
10604
10900
  },
10605
10901
  c2.id
10606
10902
  );
@@ -10615,8 +10911,8 @@ function DayGrid(p) {
10615
10911
  const x = dayNumber(day);
10616
10912
  return s <= x && x <= d;
10617
10913
  });
10618
- if (due.length === 0 && p.empty) return /* @__PURE__ */ jsx61(chakra35.div, { py: "6", children: p.empty });
10619
- return /* @__PURE__ */ jsx61(Grid4, { role: "list", templateColumns: "repeat(auto-fill, minmax(16rem, 1fr))", gap: "2", p: "3", children: due.map((i) => /* @__PURE__ */ jsx61(chakra35.div, { role: "listitem", display: "flex", children: /* @__PURE__ */ jsx61(Card2, { item: i, p, range: Boolean(i.start && i.start < i.due), style: { w: "full" } }) }, i.id)) });
10914
+ if (due.length === 0 && p.empty) return /* @__PURE__ */ jsx63(chakra37.div, { py: "6", children: p.empty });
10915
+ return /* @__PURE__ */ jsx63(Grid4, { role: "list", templateColumns: "repeat(auto-fill, minmax(16rem, 1fr))", gap: "2", p: "3", children: due.map((i) => /* @__PURE__ */ jsx63(chakra37.div, { role: "listitem", display: "flex", children: /* @__PURE__ */ jsx63(Card2, { item: i, p, range: Boolean(i.start && i.start < i.due), style: { w: "full" } }) }, i.id)) });
10620
10916
  }
10621
10917
  export {
10622
10918
  ABP_UI_VERSION,
@@ -10697,6 +10993,7 @@ export {
10697
10993
  SHOWN,
10698
10994
  STEP_UP_REQUIRED,
10699
10995
  STRONG_FACTOR_REQUIRED,
10996
+ SaveBar,
10700
10997
  SearchInput,
10701
10998
  SearchPicker,
10702
10999
  SegmentedControl,