@photon-ai/pho-ui 4.26.0 → 4.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/{avatar-PgBOfszL.js → avatar-BJvgi8ON.js} +24 -30
  3. package/dist/chunks/avatar-BJvgi8ON.js.map +1 -0
  4. package/dist/chunks/{basic-page-aep8pM4s.js → basic-page-DSPzDKrZ.js} +79 -82
  5. package/dist/chunks/basic-page-DSPzDKrZ.js.map +1 -0
  6. package/dist/chunks/{box-search-CMl5bQ7Y.js → box-search-DD2EPtDy.js} +18 -19
  7. package/dist/chunks/box-search-DD2EPtDy.js.map +1 -0
  8. package/dist/chunks/{calendar-DDWITGo4.js → calendar-s-QRks1Z.js} +66 -69
  9. package/dist/chunks/calendar-s-QRks1Z.js.map +1 -0
  10. package/dist/chunks/{chat-D98GCjbe.js → chat-D6SGRahp.js} +226 -276
  11. package/dist/chunks/chat-D6SGRahp.js.map +1 -0
  12. package/dist/chunks/{checkbox-D8smFViR.js → checkbox-B3fVczYP.js} +2 -2
  13. package/dist/chunks/checkbox-B3fVczYP.js.map +1 -0
  14. package/dist/chunks/{close-button-Ck4rY1Fp.js → close-button-Bwv_OoCZ.js} +2 -2
  15. package/dist/chunks/close-button-Bwv_OoCZ.js.map +1 -0
  16. package/dist/chunks/{code-block-CthLWfxd.js → code-block-CiZWZBO2.js} +169 -238
  17. package/dist/chunks/code-block-CiZWZBO2.js.map +1 -0
  18. package/dist/chunks/copy-button-DNNZu6r4.js +69 -0
  19. package/dist/chunks/copy-button-DNNZu6r4.js.map +1 -0
  20. package/dist/chunks/{data-table-C1tLUdw0.js → data-table-CshUlqIu.js} +11 -12
  21. package/dist/chunks/data-table-CshUlqIu.js.map +1 -0
  22. package/dist/chunks/{date-picker-D-sWo3i8.js → date-picker-BaAkim2u.js} +126 -151
  23. package/dist/chunks/date-picker-BaAkim2u.js.map +1 -0
  24. package/dist/chunks/{description-list-DcTvBHzI.js → description-list-VTNz1MmJ.js} +2 -2
  25. package/dist/chunks/{description-list-DcTvBHzI.js.map → description-list-VTNz1MmJ.js.map} +1 -1
  26. package/dist/chunks/{dialog-H72fZGtf.js → dialog-C116Qr0w.js} +2 -2
  27. package/dist/chunks/{dialog-H72fZGtf.js.map → dialog-C116Qr0w.js.map} +1 -1
  28. package/dist/chunks/{filter-bar-D_sBAT5Y.js → filter-bar-DI5JO1Cd.js} +63 -72
  29. package/dist/chunks/filter-bar-DI5JO1Cd.js.map +1 -0
  30. package/dist/chunks/{ghost-search-CMUI2UH0.js → ghost-search-DhADxaWi.js} +11 -12
  31. package/dist/chunks/ghost-search-DhADxaWi.js.map +1 -0
  32. package/dist/chunks/icons-eq5FZ3Yc.js +1254 -0
  33. package/dist/chunks/icons-eq5FZ3Yc.js.map +1 -0
  34. package/dist/chunks/{input-DWnb33UF.js → input-hrrPhzXp.js} +37 -56
  35. package/dist/chunks/input-hrrPhzXp.js.map +1 -0
  36. package/dist/chunks/{message-DRAWQlW-.js → message-DO-zoM2w.js} +7 -8
  37. package/dist/chunks/message-DO-zoM2w.js.map +1 -0
  38. package/dist/chunks/{select-Dux2SBVc.js → select-DlyDd7AB.js} +10 -10
  39. package/dist/chunks/select-DlyDd7AB.js.map +1 -0
  40. package/dist/chunks/{sidebar-ttBkgGRh.js → sidebar-DTRcoxrB.js} +95 -111
  41. package/dist/chunks/sidebar-DTRcoxrB.js.map +1 -0
  42. package/dist/chunks/{toast-Cbnn8lcA.js → toast-Btwu5Kjk.js} +7 -7
  43. package/dist/chunks/toast-Btwu5Kjk.js.map +1 -0
  44. package/dist/chunks/{trace-ClMpG82z.js → trace-CKYAff2U.js} +498 -607
  45. package/dist/chunks/trace-CKYAff2U.js.map +1 -0
  46. package/dist/components/avatar.js +1 -1
  47. package/dist/components/button.js +1 -1
  48. package/dist/components/calendar.js +1 -1
  49. package/dist/components/chat.js +1 -1
  50. package/dist/components/checkbox.js +1 -1
  51. package/dist/components/code-block.js +1 -1
  52. package/dist/components/command.js +36 -37
  53. package/dist/components/command.js.map +1 -1
  54. package/dist/components/copy-button.js +1 -1
  55. package/dist/components/data-table.js +2 -2
  56. package/dist/components/date-picker.js +1 -1
  57. package/dist/components/description-list.js +1 -1
  58. package/dist/components/dialog.js +1 -1
  59. package/dist/components/error.js +252 -11
  60. package/dist/components/error.js.map +1 -0
  61. package/dist/components/filter-bar.js +1 -1
  62. package/dist/components/input.js +1 -1
  63. package/dist/components/message.js +1 -1
  64. package/dist/components/notification.js +27 -34
  65. package/dist/components/notification.js.map +1 -1
  66. package/dist/components/phone-input.js +3 -4
  67. package/dist/components/phone-input.js.map +1 -1
  68. package/dist/components/scope.js +52 -53
  69. package/dist/components/scope.js.map +1 -1
  70. package/dist/components/select.js +1 -1
  71. package/dist/components/theme-toggle.js +69 -95
  72. package/dist/components/theme-toggle.js.map +1 -1
  73. package/dist/components/toast.js +1 -1
  74. package/dist/components/trace.js +1 -1
  75. package/dist/icons.js +235 -78
  76. package/dist/icons.js.map +1 -1
  77. package/dist/index.js +158 -158
  78. package/dist/sections/basic-page.js +2 -2
  79. package/dist/sections/sidebar.js +1 -1
  80. package/dist/src/components/avatar/avatar.d.ts +1 -1
  81. package/dist/src/components/message/message-status.d.ts +7 -8
  82. package/dist/src/components/notification/notification.d.ts +2 -2
  83. package/dist/src/components/trace/decorations.d.ts +3 -3
  84. package/dist/src/icons/index.d.ts +1 -0
  85. package/dist/src/icons/photon/icons.d.ts +315 -0
  86. package/dist/src/icons/photon/index.d.ts +2 -0
  87. package/dist/src/icons/photon/photon-icon.d.ts +51 -0
  88. package/package.json +5 -3
  89. package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js +0 -14
  90. package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +0 -1
  91. package/dist/chunks/IconCheck-DwSMn1wK.js +0 -11
  92. package/dist/chunks/IconCheck-DwSMn1wK.js.map +0 -1
  93. package/dist/chunks/IconChevronDown-Cd68NnX2.js +0 -11
  94. package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +0 -1
  95. package/dist/chunks/IconChevronLeft-CptqhdxO.js +0 -11
  96. package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +0 -1
  97. package/dist/chunks/IconChevronRight-BNkXCTk6.js +0 -11
  98. package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +0 -1
  99. package/dist/chunks/IconChevronUp-Bxllwz8J.js +0 -11
  100. package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +0 -1
  101. package/dist/chunks/IconInfoCircle-CTAynhe8.js +0 -21
  102. package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +0 -1
  103. package/dist/chunks/IconSearch-DkcWWZ1H.js +0 -14
  104. package/dist/chunks/IconSearch-DkcWWZ1H.js.map +0 -1
  105. package/dist/chunks/IconX-DnPlFC68.js +0 -14
  106. package/dist/chunks/IconX-DnPlFC68.js.map +0 -1
  107. package/dist/chunks/avatar-PgBOfszL.js.map +0 -1
  108. package/dist/chunks/basic-page-aep8pM4s.js.map +0 -1
  109. package/dist/chunks/box-search-CMl5bQ7Y.js.map +0 -1
  110. package/dist/chunks/calendar-DDWITGo4.js.map +0 -1
  111. package/dist/chunks/chat-D98GCjbe.js.map +0 -1
  112. package/dist/chunks/checkbox-D8smFViR.js.map +0 -1
  113. package/dist/chunks/close-button-Ck4rY1Fp.js.map +0 -1
  114. package/dist/chunks/code-block-CthLWfxd.js.map +0 -1
  115. package/dist/chunks/copy-button-BLvirhXk.js +0 -76
  116. package/dist/chunks/copy-button-BLvirhXk.js.map +0 -1
  117. package/dist/chunks/data-table-C1tLUdw0.js.map +0 -1
  118. package/dist/chunks/date-picker-D-sWo3i8.js.map +0 -1
  119. package/dist/chunks/error-BT71wcUd.js +0 -270
  120. package/dist/chunks/error-BT71wcUd.js.map +0 -1
  121. package/dist/chunks/filter-bar-D_sBAT5Y.js.map +0 -1
  122. package/dist/chunks/ghost-search-CMUI2UH0.js.map +0 -1
  123. package/dist/chunks/input-DWnb33UF.js.map +0 -1
  124. package/dist/chunks/message-DRAWQlW-.js.map +0 -1
  125. package/dist/chunks/select-Dux2SBVc.js.map +0 -1
  126. package/dist/chunks/sidebar-ttBkgGRh.js.map +0 -1
  127. package/dist/chunks/toast-Cbnn8lcA.js.map +0 -1
  128. package/dist/chunks/trace-ClMpG82z.js.map +0 -1
@@ -21,14 +21,14 @@ function c({ align: e = "start", className: a, ...t }) {
21
21
  })
22
22
  });
23
23
  }
24
- function x({ className: e, ...a }) {
24
+ function p({ className: e, ...a }) {
25
25
  return /* @__PURE__ */ s("div", {
26
26
  "data-message-avatar": "",
27
27
  className: r("flex shrink-0 self-end group-has-[[data-message-footer]]/message:-translate-y-[1.375rem]", e),
28
28
  ...a
29
29
  });
30
30
  }
31
- function p({ className: e, ...a }) {
31
+ function x({ className: e, ...a }) {
32
32
  const t = m(u);
33
33
  return /* @__PURE__ */ s("div", {
34
34
  "data-message-content": "",
@@ -61,22 +61,21 @@ function w({ className: e, ...a }) {
61
61
  var j = {
62
62
  Root: c,
63
63
  Group: g,
64
- Avatar: x,
65
- Content: p,
64
+ Avatar: p,
65
+ Content: x,
66
66
  Header: b,
67
67
  Time: h,
68
68
  Footer: w
69
69
  };
70
70
  function d(e, a) {
71
- if (!e || a == null) return null;
72
- const t = a.trim().toLowerCase(), n = t.split(/[\s.]+/)[0];
73
- return n ? n === "failed" ? t : n : null;
71
+ return !e || a == null ? null : a.trim().toLowerCase().split(/[\s.]+/)[0] || null;
74
72
  }
75
73
  function N(e, a) {
76
74
  const t = e[a];
77
75
  if (!t) return !1;
78
76
  const n = d(t.outbound === !0, t.status);
79
77
  if (n == null) return !1;
78
+ if (n === "failed") return !0;
80
79
  for (let o = a + 1; o < e.length; o++) {
81
80
  const i = e[o], l = d(i?.outbound === !0, i?.status);
82
81
  if (l != null) return l !== n;
@@ -89,4 +88,4 @@ export {
89
88
  d as t
90
89
  };
91
90
 
92
- //# sourceMappingURL=message-DRAWQlW-.js.map
91
+ //# sourceMappingURL=message-DO-zoM2w.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-DO-zoM2w.js","names":["cn","createContext","useContext","jsx","MessageContext","Group","className","props","Root","align","Avatar","Content","Header","Time","Footer","Message","messageStatusKey","outbound","status","shouldShowMessageStatus","messages","index","current","key","at","next","nextKey"],"sources":["../../src/components/message/message.tsx","../../src/components/message/message-status.ts"],"sourcesContent":["import { createContext, useContext, type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Message — one turn in a thread: the row that seats an avatar beside a\n * column of header, bubble, and footer, on the author's side. It owns the\n * row layout and nothing else: the surface is `Bubble`'s, the scrolling\n * and the composer are `Chat`'s.\n *\n * Design notes:\n * - `align=\"end\"` mirrors the row — avatar on the right, column\n * right-aligned — for the reader's own messages.\n * - The avatar sits at the row's bottom, level with the bubble. When a\n * `Footer` (status) sits under the bubble, the avatar shifts up by one\n * line so it stays beside the surface.\n * - `Time` sits beside the bubble, last-line aligned — right of inbound,\n * left of outbound — and is invisible until the row is hovered or\n * focused. `Footer` is the status caption under the bubble (Delivered,\n * Failed). Inbound has no status.\n */\n\nexport type MessageAlign = \"start\" | \"end\";\n\nconst MessageContext = createContext<MessageAlign>(\"start\");\n\n/* --------------------------------- group -------------------------------- */\n\n/** Consecutive messages from one author, spaced as one turn. */\nfunction Group({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-group=\"\"\n className={cn(\"flex min-w-0 flex-col gap-2\", className)}\n {...props}\n />\n );\n}\n\n/* --------------------------------- root --------------------------------- */\n\nexport interface MessageRootProps extends ComponentProps<\"div\"> {\n /** Which side the author sits on. @default \"start\" */\n align?: MessageAlign;\n}\n\n/** The row: avatar beside the content column, mirrored for `end`. */\nfunction Root({ align = \"start\", className, ...props }: MessageRootProps) {\n return (\n <MessageContext.Provider value={align}>\n <div\n data-message=\"\"\n data-align={align}\n className={cn(\n \"group/message @container relative flex w-full min-w-0 gap-2 text-base\",\n align === \"end\" && \"flex-row-reverse\",\n className,\n )}\n {...props}\n />\n </MessageContext.Provider>\n );\n}\n\n/* -------------------------------- avatar -------------------------------- */\n\n/**\n * The avatar's seat — pass an `Avatar.Root`. Bottom-aligned with the\n * bubble; lifts by one footer line when the message has a `Footer`.\n */\nfunction Avatar({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-avatar=\"\"\n className={cn(\n // Footer line = xs line-height (18px) + the column's 4px gap.\n \"flex shrink-0 self-end group-has-[[data-message-footer]]/message:-translate-y-[1.375rem]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -------------------------------- content ------------------------------- */\n\n/**\n * Header over the bubble; time beside it; status under it. Inbound is\n * `[bubble][time]`. Outbound is `[time][bubble]` with `Footer` below\n * the bubble column.\n */\nfunction Content({ className, ...props }: ComponentProps<\"div\">) {\n const align = useContext(MessageContext);\n return (\n <div\n data-message-content=\"\"\n className={cn(\n \"grid w-max max-w-full flex-none items-end gap-x-1.5 gap-y-1 break-words\",\n \"[&>[data-message-header]]:[grid-area:header]\",\n \"[&>[data-bubble]]:max-w-[80cqw] [&>[data-bubble]]:[grid-area:main]\",\n \"[&>[data-bubble-group]]:max-w-[80cqw] [&>[data-bubble-group]]:[grid-area:main]\",\n \"[&>[data-bubble][data-variant=ghost]]:max-w-full\",\n \"[&>[data-message-time]]:[grid-area:time]\",\n \"[&>[data-message-footer]]:[grid-area:status]\",\n align === \"end\"\n ? \"ml-auto grid-cols-[auto_minmax(0,max-content)] [grid-template-areas:'._header'_'time_main'_'._status'] [&>[data-bubble-group]]:justify-self-end [&>[data-bubble]]:justify-self-end [&>[data-message-header]]:justify-self-end\"\n : \"grid-cols-[minmax(0,max-content)_auto] [grid-template-areas:'header_.'_'main_time'_'status_.'] [&>[data-bubble-group]]:justify-self-start [&>[data-bubble]]:justify-self-start\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Who — the sender's name over the bubble, secondary ink. */\nfunction Header({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-header=\"\"\n className={cn(\n \"text-pho-secondary flex w-full max-w-full min-w-0 items-center gap-1.5 px-1 text-xs font-medium group-has-[[data-bubble][data-variant=ghost]]/message:px-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Clock beside the bubble, last-line aligned. Description ink, tabular.\n * Inbound sits to the right; outbound to the left. The slot stays in\n * layout; the digits show when the row is hovered or focused.\n */\nfunction Time({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-time=\"\"\n className={cn(\n \"text-pho-description shrink-0 self-end text-xs whitespace-nowrap tabular-nums opacity-0 transition-opacity duration-100 ease-linear group-focus-within/message:opacity-100 group-hover/message:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Status under the bubble — Delivered, Failed. Inbound leaves it off.\n * Description ink.\n */\nfunction Footer({ className, ...props }: ComponentProps<\"div\">) {\n const align = useContext(MessageContext);\n return (\n <div\n data-message-footer=\"\"\n className={cn(\n \"text-pho-description flex max-w-full min-w-0 items-center gap-1.5 px-1 text-xs group-has-[[data-bubble][data-variant=ghost]]/message:px-0\",\n align === \"end\" && \"justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * A turn in a thread. `Root` takes `align`; `Avatar` seats an\n * `Avatar.Root`; `Content` places `Header` over the bubble, `Time`\n * beside it, and `Footer` under it.\n *\n * ```tsx\n * <Message.Root align=\"end\">\n * <Message.Content>\n * <Bubble.Root variant=\"inverse\" align=\"end\">\n * <Bubble.Content>On my way.</Bubble.Content>\n * </Bubble.Root>\n * <Message.Time>2:47 PM</Message.Time>\n * <Message.Footer>Delivered.</Message.Footer>\n * </Message.Content>\n * </Message.Root>\n * ```\n */\nexport const Message = { Root, Group, Avatar, Content, Header, Time, Footer };\n","/**\n * One row in a thread, enough to decide whether its outbound status\n * caption should show. Inbound rows leave `outbound` off.\n */\nexport interface MessageStatusItem {\n outbound?: boolean;\n /** Delivered, Sent, Failed — or a token like `delivered`. */\n status?: string | null;\n}\n\n/**\n * The coalesce key for a row: outbound status word, lowercased. Inbound\n * and empty statuses are `null`: they carry no status and sit outside the\n * runs (see `shouldShowMessageStatus`).\n */\nexport function messageStatusKey(\n outbound: boolean,\n status: string | null | undefined,\n): string | null {\n if (!outbound || status == null) return null;\n const word = status\n .trim()\n .toLowerCase()\n .split(/[\\s.]+/)[0];\n return word || null;\n}\n\n/**\n * Whether this row should render its outbound status (Delivered, Sent,\n * Failed). Every failed message shows Failed: each one is a send that did\n * not go out. Any other status shows only on the last message in a\n * same-status run. Inbound never does, and a reply in between does not\n * break the run: the run is over the outbound messages alone, so a\n * conversation going back and forth wears one Delivered, under the latest\n * message it holds for, not one under every turn.\n */\nexport function shouldShowMessageStatus(\n messages: readonly MessageStatusItem[],\n index: number,\n): boolean {\n const current = messages[index];\n if (!current) return false;\n const key = messageStatusKey(current.outbound === true, current.status);\n if (key == null) return false;\n if (key === \"failed\") return true;\n for (let at = index + 1; at < messages.length; at++) {\n const next = messages[at];\n const nextKey = messageStatusKey(next?.outbound === true, next?.status);\n if (nextKey != null) return nextKey !== key;\n }\n return true;\n}\n"],"mappings":";;;;AAuBA,IAAMI,IAAiBH,EAA4B,OAAO;AAK1D,SAASI,EAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAgC;AAC7D,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,sBAAmB;AAAA,IACnB,WAAWH,EAAG,+BAA+BM,CAAS;AAAA,IACtD,GAAIC;AAAA,EACL,CAAA;AAEL;AAUA,SAASC,EAAK,EAAE,OAAAC,IAAQ,SAAS,WAAAH,GAAW,GAAGC,EAAA,GAA2B;AACxE,SACE,gBAAAJ,EAACC,EAAe,UAAhB;AAAA,IAAyB,OAAOK;AAAA,IAC9B,UAAA,gBAAAN,EAAC,OAAD;AAAA,MACE,gBAAa;AAAA,MACb,cAAYM;AAAA,MACZ,WAAWT,EACT,yEACAS,MAAU,SAAS,oBACnBH,CACF;AAAA,MACA,GAAIC;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AAS,QAAAC;AAAA,EAAQ,MAAAC;AAAA,EAAM,QAAAC;AAAO;ACtK5E,SAAgBE,EACdC,GACAC,GACe;AACf,SAAI,CAACD,KAAYC,KAAU,OAAa,OAC3BA,EACV,KAAK,EACL,YAAY,EACZ,MAAM,QAAQ,EAAE,CAAA,KACJ;AACjB;AAWA,SAAgBC,EACdC,GACAC,GACS;AACT,QAAMC,IAAUF,EAASC,CAAA;AACzB,MAAI,CAACC,EAAS,QAAO;AACrB,QAAMC,IAAMP,EAAiBM,EAAQ,aAAa,IAAMA,EAAQ,MAAM;AACtE,MAAIC,KAAO,KAAM,QAAO;AACxB,MAAIA,MAAQ,SAAU,QAAO;AAC7B,WAASC,IAAKH,IAAQ,GAAGG,IAAKJ,EAAS,QAAQI,KAAM;AACnD,UAAMC,IAAOL,EAASI,CAAA,GAChBE,IAAUV,EAAiBS,GAAM,aAAa,IAAMA,GAAM,MAAM;AACtE,QAAIC,KAAW,KAAM,QAAOA,MAAYH;AAAA,EAC1C;AACA,SAAO;AACT"}
@@ -2,7 +2,7 @@
2
2
  import { t as n } from "./cn-CPbhpG1q.js";
3
3
  import { SPRING_PRESS_INLINE as u } from "../motion.js";
4
4
  import { r as m } from "./use-press-pulse-IbNstUT0.js";
5
- import { t as g } from "./IconCheck-DwSMn1wK.js";
5
+ import { j as g } from "./icons-eq5FZ3Yc.js";
6
6
  import { n as h, r as f, t as y } from "./popup-anchor-C3_iXdbh.js";
7
7
  import { createContext as b, useContext as x } from "react";
8
8
  import { jsx as r } from "react/jsx-runtime";
@@ -53,25 +53,25 @@ function z({ className: e, sideOffset: t = 6, align: a = "start", alignItemWithT
53
53
  ...c
54
54
  });
55
55
  }
56
- function k({ className: e, ...t }) {
56
+ function j({ className: e, ...t }) {
57
57
  return /* @__PURE__ */ r(o.Popup, {
58
58
  className: n("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset", "transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out", e),
59
59
  ...t
60
60
  });
61
61
  }
62
- function A({ className: e, ...t }) {
62
+ function k({ className: e, ...t }) {
63
63
  return /* @__PURE__ */ r(o.Item, {
64
64
  className: n("group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none", "data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50", e),
65
65
  ...t
66
66
  });
67
67
  }
68
- function T({ className: e, ...t }) {
68
+ function A({ className: e, ...t }) {
69
69
  return /* @__PURE__ */ r(o.ItemText, {
70
70
  className: n("col-start-2 min-w-0", e),
71
71
  ...t
72
72
  });
73
73
  }
74
- function j({ className: e, children: t, ...a }) {
74
+ function T({ className: e, children: t, ...a }) {
75
75
  const s = x(p), i = t ?? /* @__PURE__ */ r(g, {});
76
76
  return s ? /* @__PURE__ */ r("span", {
77
77
  "aria-hidden": !0,
@@ -100,11 +100,11 @@ var K = {
100
100
  Icon: L,
101
101
  Portal: w,
102
102
  Positioner: z,
103
- Popup: k,
103
+ Popup: j,
104
104
  List: R,
105
- Item: A,
106
- ItemText: T,
107
- ItemIndicator: j,
105
+ Item: k,
106
+ ItemText: A,
107
+ ItemIndicator: T,
108
108
  Group: _,
109
109
  GroupLabel: C
110
110
  };
@@ -112,4 +112,4 @@ export {
112
112
  K as t
113
113
  };
114
114
 
115
- //# sourceMappingURL=select-Dux2SBVc.js.map
115
+ //# sourceMappingURL=select-DlyDd7AB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-DlyDd7AB.js","names":["BaseSelect","Select","cn","SPRING_PRESS_INLINE","usePressPulse","CheckIcon","usePopupAnchor","usePopupAnchorTrigger","PopupAnchorProvider","createContext","useContext","jsx","motion","Select","SelectMultipleContext","INLINE_PRESS_SCALE","INLINE_PRESS_SPRING","Root","multiple","props","Value","Portal","List","Group","TRIGGER_BASE","Trigger","className","disabled","variant","onPointerDown","inline","motionProps","anchorRef","Icon","Positioner","sideOffset","align","alignItemWithTrigger","anchor","triggerAnchor","Popup","Item","ItemText","ItemIndicator","children","mark","GroupLabel","Select$1"],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { SPRING_PRESS_INLINE } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { CheckIcon } from \"../../icons/photon\";\nimport { cn } from \"../../utils/cn\";\nimport {\n PopupAnchorProvider,\n usePopupAnchor,\n usePopupAnchorTrigger,\n} from \"../../utils/popup-anchor\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = SPRING_PRESS_INLINE;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <PopupAnchorProvider>\n <BaseSelect.Root multiple={multiple} {...props} />\n </PopupAnchorProvider>\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n // The pulse scales the trigger as the popup opens: the popup anchors to\n // its laid-out box, so the scale doesn't resize the popup.\n const anchorRef = usePopupAnchorTrigger();\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button ref={anchorRef} {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base min-w-44 px-3 py-2 ring-1 ring-inset focus-visible:outline-none\",\n // Open or focused, the edge is Input's: the brand ring at 2px,\n // inset, in place of the hairline.\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n anchor,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n const triggerAnchor = usePopupAnchor();\n return (\n <BaseSelect.Positioner\n anchor={anchor ?? triggerAnchor}\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <CheckIcon />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;;;;;;AA4BA,IAAMc,IAAwBL,EAAc,EAAK,GAM3CM,IAAqB,MACrBC,IAAsBb;AAE5B,SAASc,EAAK,EACZ,UAAAC,IAAW,IACX,GAAGC,EAAA,GACsC;AACzC,SACE,gBAAAR,EAACG,EAAsB,UAAvB;AAAA,IAAgC,OAAO,EAAQI;AAAA,IAC7C,UAAA,gBAAAP,EAACH,GAAD,EAAA,UACE,gBAAAG,EAACX,EAAW,MAAZ;AAAA,MAA2B,UAAAkB;AAAA,MAAU,GAAIC;AAAA,IAAQ,CAAA,EAC9B,CAAA;AAAA,EACS,CAAA;AAEpC;AAEA,IAAMC,IAAQpB,EAAW,OACnBqB,IAASrB,EAAW,QACpBsB,IAAOtB,EAAW,MAClBuB,IAAQvB,EAAW,OAGnBwB,IAAetB,E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P;AAAA,EACL,CAAA;AAEL;AAUA,IAAalB,IAAS;AAAA,EACpB,MAAAgB;AAAA,EACA,SAAAQ;AAAA,EACA,OAAAL;AAAA,EACA,MAAAa;AAAA,EACA,QAAAZ;AAAA,EACA,YAAAa;AAAA,EACA,OAAAM;AAAA,EACA,MAAAlB;AAAA,EACA,MAAAmB;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAApB;AAAA,EACA,YAAAuB;AACF"}
@@ -1,105 +1,89 @@
1
1
  "use client";
2
- import { t as n } from "./cn-CPbhpG1q.js";
2
+ import { t as a } from "./cn-CPbhpG1q.js";
3
3
  import { t as ee } from "./is-react-component-DSnjtBmo.js";
4
4
  import { n as te } from "./link-provider-DXzDQ08N.js";
5
5
  import { SPRING_PRESS as re } from "../motion.js";
6
- import { a as ae, u as ne } from "./button-KM0lAQ4x.js";
7
- import { t as oe } from "./createReactComponent-yKZn9MIX.js";
8
- import { t as se } from "./IconArrowUpRight-OK8Fp0KQ.js";
9
- import { t as ie } from "./IconChevronRight-BNkXCTk6.js";
10
- import { n as _ } from "./avatar-PgBOfszL.js";
11
- import { t as le } from "./IconSearch-DkcWWZ1H.js";
6
+ import { a as ne, u as ae } from "./button-KM0lAQ4x.js";
7
+ import { Kt as oe, P as se, _n as ie, et as le } from "./icons-eq5FZ3Yc.js";
12
8
  import { t as x } from "./scroll-area-DjdSnx2p.js";
13
- import { t as L } from "./collapsible-CR4QWjFh.js";
9
+ import { t as U } from "./collapsible-CR4QWjFh.js";
14
10
  import { t as ce } from "./kbd-DWDs_6U1.js";
15
- import { createContext as P, isValidElement as pe, useCallback as z, useContext as G, useEffect as T, useId as ue, useLayoutEffect as me, useMemo as K, useRef as w, useState as C } from "react";
11
+ import { n as _ } from "./avatar-BJvgi8ON.js";
12
+ import { createContext as V, isValidElement as ue, useCallback as z, useContext as K, useEffect as T, useId as pe, useLayoutEffect as me, useMemo as G, useRef as w, useState as C } from "react";
16
13
  import { Fragment as de, jsx as t, jsxs as c } from "react/jsx-runtime";
17
14
  import { motion as I } from "motion/react";
18
15
  import { Collapsible as fe } from "@base-ui/react/collapsible";
19
- var he = [
20
- ["path", {
21
- d: "M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
22
- key: "svg-0"
23
- }],
24
- ["path", {
25
- d: "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
26
- key: "svg-1"
27
- }],
28
- ["path", {
29
- d: "M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
30
- key: "svg-2"
31
- }]
32
- ], xe = oe("outline", "dots", "Dots", he), y = {
16
+ var N = {
33
17
  initial: !1,
34
18
  whileTap: { scale: 0.97 },
35
19
  transition: re
36
20
  }, H = "border-pho-secondary bg-pho-page font-heading sticky top-0 flex h-dvh w-64 shrink-0 flex-col border-r", j = {
37
21
  base: "px-4 pt-5 pb-4",
38
22
  sm: "px-3 pt-4 pb-3"
39
- }, Qe = n(H, j.base), ve = {
23
+ }, He = a(H, j.base), he = {
40
24
  base: "mb-6 px-2",
41
25
  sm: "mb-3 px-0"
42
- }, q = "outline-pho-brand flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-base transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1", be = "bg-pho-primary text-pho-primary ring-pho-secondary font-medium ring-1 ring-inset *:data-icon:text-pho-primary", $ = n("text-pho-secondary *:data-icon:text-pho-secondary", "hover:bg-pho-primary hover:text-pho-primary hover:*:data-icon:text-pho-primary"), We = "text-pho-primary *:data-icon:text-pho-primary", ge = "ml-auto size-4 shrink-0 transition-transform duration-150 ease-out", V = {
26
+ }, q = "outline-pho-brand flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-base transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1", xe = "bg-pho-primary text-pho-primary ring-pho-secondary font-medium ring-1 ring-inset *:data-icon:text-pho-primary", $ = a("text-pho-secondary *:data-icon:text-pho-secondary", "hover:bg-pho-primary hover:text-pho-primary hover:*:data-icon:text-pho-primary"), je = "text-pho-primary *:data-icon:text-pho-primary", ve = "ml-auto size-4 shrink-0 transition-transform duration-150 ease-out", P = {
43
27
  withIcon: "pl-6",
44
28
  withoutIcon: "pl-4"
45
- }, J = P("base"), Q = P(null), W = typeof window > "u" ? T : me;
46
- function Ie({ className: r, inset: e = "base", ...a }) {
29
+ }, J = V("base"), Q = V(null), W = typeof window > "u" ? T : me;
30
+ function be({ className: r, inset: e = "base", ...n }) {
47
31
  return /* @__PURE__ */ t(J.Provider, {
48
32
  value: e,
49
33
  children: /* @__PURE__ */ t("aside", {
50
- className: n(H, j[e], r),
51
- ...a,
34
+ className: a(H, j[e], r),
35
+ ...n,
52
36
  "data-inset": e
53
37
  })
54
38
  });
55
39
  }
56
- function ye({ className: r, ...e }) {
57
- const a = G(J);
40
+ function ge({ className: r, ...e }) {
41
+ const n = K(J);
58
42
  return /* @__PURE__ */ t("div", {
59
- className: n("flex items-center gap-2.5 [&:has(+nav)]:mb-0", ve[a], r),
43
+ className: a("flex items-center gap-2.5 [&:has(+nav)]:mb-0", he[n], r),
60
44
  ...e
61
45
  });
62
46
  }
63
- function Ne({ label: r = "Search", kbd: e = "⌘K", className: a, ...s }) {
64
- return /* @__PURE__ */ t(ae, {
47
+ function Ie({ label: r = "Search", kbd: e = "⌘K", className: n, ...s }) {
48
+ return /* @__PURE__ */ t(ne, {
65
49
  variant: "outlined",
66
50
  shape: "square",
67
51
  size: "md",
68
52
  "aria-keyshortcuts": e === "⌘K" ? "Meta+K Control+K" : void 0,
69
- prefix: /* @__PURE__ */ t(le, { "aria-hidden": !0 }),
53
+ prefix: /* @__PURE__ */ t(ie, { "aria-hidden": !0 }),
70
54
  suffix: /* @__PURE__ */ t(ce, {
71
55
  keys: e,
72
56
  className: "pointer-events-none"
73
57
  }),
74
- className: n("hover:ring-pho-secondary min-h-9 w-full justify-start gap-2 rounded-sm px-2 py-1.5 has-[[data-icon=prefix]]:pl-2 has-[[data-icon=suffix]]:pr-2 [&>[data-text]]:min-w-0 [&>[data-text]]:flex-1 [&>[data-text]]:truncate [&>[data-text]]:text-left", a),
58
+ className: a("hover:ring-pho-secondary min-h-9 w-full justify-start gap-2 rounded-sm px-2 py-1.5 has-[[data-icon=prefix]]:pl-2 has-[[data-icon=suffix]]:pr-2 [&>[data-text]]:min-w-0 [&>[data-text]]:flex-1 [&>[data-text]]:truncate [&>[data-text]]:text-left", n),
75
59
  ...s,
76
60
  children: r
77
61
  });
78
62
  }
79
- function Re({ scroll: r = !0, inset: e, insetTop: a = e ?? 24, insetBottom: s = e ?? 16, className: i, style: l, children: p, ...u }) {
63
+ function Ne({ scroll: r = !0, inset: e, insetTop: n = e ?? 24, insetBottom: s = e ?? 16, className: i, style: l, children: u, ...p }) {
80
64
  return r ? /* @__PURE__ */ t("nav", {
81
- className: n("flex min-h-0 flex-1 flex-col", i),
65
+ className: a("flex min-h-0 flex-1 flex-col", i),
82
66
  style: l,
83
- ...u,
67
+ ...p,
84
68
  children: /* @__PURE__ */ c(x.Root, {
85
69
  className: "min-h-0 flex-1",
86
70
  children: [/* @__PURE__ */ t(x.Viewport, { children: /* @__PURE__ */ t(x.Content, {
87
71
  inset: e,
88
- insetTop: a,
72
+ insetTop: n,
89
73
  insetBottom: s,
90
74
  className: "flex flex-col gap-6",
91
- children: p
75
+ children: u
92
76
  }) }), /* @__PURE__ */ t(x.Scrollbar, { children: /* @__PURE__ */ t(x.Thumb, {}) })]
93
77
  })
94
78
  }) : /* @__PURE__ */ t("nav", {
95
- className: n("flex flex-col gap-6", i),
79
+ className: a("flex flex-col gap-6", i),
96
80
  style: {
97
- paddingTop: a ?? e,
81
+ paddingTop: n ?? e,
98
82
  paddingBottom: s ?? e,
99
83
  ...l
100
84
  },
101
- ...u,
102
- children: p
85
+ ...p,
86
+ children: u
103
87
  });
104
88
  }
105
89
  function Se({ className: r, ...e }) {
@@ -108,35 +92,35 @@ function Se({ className: r, ...e }) {
108
92
  ...e
109
93
  });
110
94
  }
111
- function Ee({ className: r, ...e }) {
95
+ function ye({ className: r, ...e }) {
112
96
  return /* @__PURE__ */ t("div", {
113
- className: n("text-pho-description mb-2 px-2 text-xs font-normal", r),
97
+ className: a("text-pho-description mb-2 px-2 text-xs font-normal", r),
114
98
  ...e
115
99
  });
116
100
  }
117
- function X({ className: r, columns: e, ...a }) {
101
+ function X({ className: r, columns: e, ...n }) {
118
102
  return /* @__PURE__ */ t("ul", {
119
- className: n("m-0 list-none p-0 *:m-0", e ? "grid grid-cols-2 gap-x-2 gap-y-0.5" : "flex flex-col gap-0.5", r),
120
- ...a
103
+ className: a("m-0 list-none p-0 *:m-0", e ? "grid grid-cols-2 gap-x-2 gap-y-0.5" : "flex flex-col gap-0.5", r),
104
+ ...n
121
105
  });
122
106
  }
123
- function Ae({ className: r, ...e }) {
107
+ function Ee({ className: r, ...e }) {
124
108
  return /* @__PURE__ */ t("div", {
125
- className: n("mt-4 flex flex-col gap-0.5 [nav~&]:mt-0", r),
109
+ className: a("mt-4 flex flex-col gap-0.5 [nav~&]:mt-0", r),
126
110
  ...e
127
111
  });
128
112
  }
129
113
  function g(r) {
130
114
  if (r == null || r === !1) return null;
131
115
  let e = null;
132
- return ee(r) ? e = /* @__PURE__ */ t(r, {}) : pe(r) && (e = r), e == null ? null : /* @__PURE__ */ t("span", {
116
+ return ee(r) ? e = /* @__PURE__ */ t(r, {}) : ue(r) && (e = r), e == null ? null : /* @__PURE__ */ t("span", {
133
117
  "data-icon": !0,
134
118
  className: "pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-4 [&>svg]:shrink-0",
135
119
  children: e
136
120
  });
137
121
  }
138
- function _e({ icon: r, active: e, wrap: a = !1, className: s, children: i, href: l, external: p, ...u }) {
139
- const v = te(), N = K(() => I.create(v), [v]), m = G(Q), h = ue();
122
+ function Re({ icon: r, active: e, wrap: n = !1, className: s, children: i, href: l, external: u, ...p }) {
123
+ const v = te(), S = G(() => I.create(v), [v]), m = K(Q), h = pe();
140
124
  W(() => {
141
125
  if (m)
142
126
  return m.reportActive(h, !!e), () => m.reportActive(h, !1);
@@ -145,24 +129,24 @@ function _e({ icon: r, active: e, wrap: a = !1, className: s, children: i, href:
145
129
  h,
146
130
  e
147
131
  ]);
148
- const d = n(q, e ? be : $, s), f = /* @__PURE__ */ t("span", {
149
- className: a ? "line-clamp-2 min-w-0 flex-1 text-balance hyphens-none" : "min-w-0 flex-1 truncate",
132
+ const d = a(q, e ? xe : $, s), f = /* @__PURE__ */ t("span", {
133
+ className: n ? "line-clamp-2 min-w-0 flex-1 text-balance hyphens-none" : "min-w-0 flex-1 truncate",
150
134
  children: i
151
135
  });
152
- return l !== void 0 ? /* @__PURE__ */ t("li", { children: /* @__PURE__ */ c(N, {
136
+ return l !== void 0 ? /* @__PURE__ */ t("li", { children: /* @__PURE__ */ c(S, {
153
137
  href: l,
154
138
  "aria-current": e ? "page" : void 0,
155
- ...p && {
139
+ ...u && {
156
140
  target: "_blank",
157
141
  rel: "noopener noreferrer"
158
142
  },
159
- ...u,
143
+ ...p,
160
144
  className: d,
161
- ...y,
145
+ ...N,
162
146
  children: [
163
147
  g(r),
164
148
  f,
165
- p && /* @__PURE__ */ c(de, { children: [g(/* @__PURE__ */ t(se, { "aria-hidden": !0 })), /* @__PURE__ */ t("span", {
149
+ u && /* @__PURE__ */ c(de, { children: [g(/* @__PURE__ */ t(le, { "aria-hidden": !0 })), /* @__PURE__ */ t("span", {
166
150
  className: "sr-only",
167
151
  children: "(opens in a new tab)"
168
152
  })] })
@@ -170,94 +154,94 @@ function _e({ icon: r, active: e, wrap: a = !1, className: s, children: i, href:
170
154
  }) }) : /* @__PURE__ */ t("li", { children: /* @__PURE__ */ c(I.button, {
171
155
  type: "button",
172
156
  "aria-current": e ? "page" : void 0,
173
- ...u,
157
+ ...p,
174
158
  className: d,
175
- ...y,
159
+ ...N,
176
160
  children: [g(r), f]
177
161
  }) });
178
162
  }
179
- function we({ label: r, icon: e, open: a, defaultOpen: s = !1, onOpenChange: i, openWhenChildActive: l = !0, active: p, className: u, children: v, ...N }) {
180
- const [m, h] = C(s), d = a !== void 0, f = d ? a : m, R = z((o) => {
163
+ function Ae({ label: r, icon: e, open: n, defaultOpen: s = !1, onOpenChange: i, openWhenChildActive: l = !0, active: u, className: p, children: v, ...S }) {
164
+ const [m, h] = C(s), d = n !== void 0, f = d ? n : m, y = z((o) => {
181
165
  d || h(o), i?.(o);
182
166
  }, [d, i]), [B, Y] = C(() => /* @__PURE__ */ new Set()), O = z((o, F) => {
183
- Y((E) => {
184
- if (E.has(o) === F) return E;
185
- const A = new Set(E);
167
+ Y((R) => {
168
+ if (R.has(o) === F) return R;
169
+ const A = new Set(R);
186
170
  return F ? A.add(o) : A.delete(o), A;
187
171
  });
188
- }, []), Z = K(() => ({ reportActive: O }), [O]), b = p ?? B.size > 0, D = w(!1);
172
+ }, []), Z = G(() => ({ reportActive: O }), [O]), b = u ?? B.size > 0, D = w(!1);
189
173
  T(() => {
190
174
  const o = requestAnimationFrame(() => {
191
175
  D.current = !0;
192
176
  });
193
177
  return () => cancelAnimationFrame(o);
194
178
  }, []);
195
- const [S, k] = C(!1), M = w(f);
179
+ const [E, k] = C(!1), M = w(f);
196
180
  M.current = f;
197
- const U = w(R);
198
- return U.current = R, W(() => {
199
- !l || !b || M.current || (D.current || k(!0), U.current(!0));
181
+ const L = w(y);
182
+ return L.current = y, W(() => {
183
+ !l || !b || M.current || (D.current || k(!0), L.current(!0));
200
184
  }, [
201
185
  B,
202
186
  b,
203
187
  l
204
188
  ]), T(() => {
205
- if (!S) return;
189
+ if (!E) return;
206
190
  const o = requestAnimationFrame(() => k(!1));
207
191
  return () => cancelAnimationFrame(o);
208
- }, [S]), /* @__PURE__ */ c(L.Root, {
192
+ }, [E]), /* @__PURE__ */ c(U.Root, {
209
193
  open: f,
210
- onOpenChange: (o) => R(o),
194
+ onOpenChange: (o) => y(o),
211
195
  render: /* @__PURE__ */ t("li", {}),
212
196
  children: [/* @__PURE__ */ c(fe.Trigger, {
213
- render: /* @__PURE__ */ t(I.button, { ...y }),
214
- className: n(q, $, b && "text-pho-primary *:data-icon:text-pho-primary", "data-[panel-open]:*:data-chevron:rotate-90", u),
197
+ render: /* @__PURE__ */ t(I.button, { ...N }),
198
+ className: a(q, $, b && "text-pho-primary *:data-icon:text-pho-primary", "data-[panel-open]:*:data-chevron:rotate-90", p),
215
199
  "data-child-active": b || void 0,
216
- ...N,
200
+ ...S,
217
201
  children: [
218
202
  g(e),
219
203
  /* @__PURE__ */ t("span", {
220
204
  className: "min-w-0 flex-1 truncate",
221
205
  children: r
222
206
  }),
223
- /* @__PURE__ */ t(ie, {
207
+ /* @__PURE__ */ t(se, {
224
208
  "aria-hidden": !0,
225
209
  "data-chevron": !0,
226
- className: ge
210
+ className: ve
227
211
  })
228
212
  ]
229
- }), /* @__PURE__ */ t(L.Panel, {
213
+ }), /* @__PURE__ */ t(U.Panel, {
230
214
  keepMounted: !0,
231
- style: S ? { transitionDuration: "0s" } : void 0,
215
+ style: E ? { transitionDuration: "0s" } : void 0,
232
216
  children: /* @__PURE__ */ t(Q.Provider, {
233
217
  value: Z,
234
218
  children: /* @__PURE__ */ t("div", {
235
219
  "data-submenu-list": !0,
236
- className: n("pt-0.5", e ? V.withIcon : V.withoutIcon),
220
+ className: a("pt-0.5", e ? P.withIcon : P.withoutIcon),
237
221
  children: /* @__PURE__ */ t(X, { children: v })
238
222
  })
239
223
  })
240
224
  })]
241
225
  });
242
226
  }
243
- var Ce = "group outline-pho-brand flex w-full cursor-pointer items-center gap-2 rounded-base p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2";
244
- function Te(r) {
227
+ var _e = "group outline-pho-brand flex w-full cursor-pointer items-center gap-2 rounded-base p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2";
228
+ function we(r) {
245
229
  const e = r.split(/\s+/).filter(Boolean);
246
230
  return ((e[0]?.[0] ?? r[0] ?? "?") + (e.length >= 2 ? e[e.length - 1]?.[0] ?? "" : "")).toUpperCase();
247
231
  }
248
- function Be({ name: r, avatarSrc: e, initials: a, className: s, ...i }) {
232
+ function Ce({ name: r, avatarSrc: e, initials: n, className: s, ...i }) {
249
233
  return /* @__PURE__ */ c(I.button, {
250
234
  type: "button",
251
- className: n(Ce, s),
235
+ className: a(_e, s),
252
236
  ...i,
253
- ...y,
237
+ ...N,
254
238
  children: [
255
239
  /* @__PURE__ */ c(_.Root, {
256
240
  size: "xs",
257
241
  children: [e && /* @__PURE__ */ t(_.Image, {
258
242
  src: e,
259
243
  alt: ""
260
- }), /* @__PURE__ */ t(_.Fallback, { children: a ?? Te(r) })]
244
+ }), /* @__PURE__ */ t(_.Fallback, { children: n ?? we(r) })]
261
245
  }),
262
246
  /* @__PURE__ */ t("span", {
263
247
  className: "text-pho-primary min-w-0 flex-1 truncate text-base",
@@ -265,42 +249,42 @@ function Be({ name: r, avatarSrc: e, initials: a, className: s, ...i }) {
265
249
  }),
266
250
  /* @__PURE__ */ t("span", {
267
251
  "aria-hidden": !0,
268
- className: ne({
252
+ className: ae({
269
253
  variant: "outlined",
270
254
  size: "sm",
271
255
  shape: "circle",
272
256
  className: "group-hover:bg-pho-primary-hover group-hover:text-pho-secondary-hover group-data-[popup-open]:bg-pho-primary-hover group-data-[popup-open]:text-pho-secondary-hover p-1"
273
257
  }),
274
- children: /* @__PURE__ */ t(xe, { className: "size-4" })
258
+ children: /* @__PURE__ */ t(oe, { className: "size-4" })
275
259
  })
276
260
  ]
277
261
  });
278
262
  }
279
- var Xe = {
280
- Root: Ie,
281
- Header: ye,
282
- Search: Ne,
283
- Nav: Re,
263
+ var qe = {
264
+ Root: be,
265
+ Header: ge,
266
+ Search: Ie,
267
+ Nav: Ne,
284
268
  Group: Se,
285
- GroupLabel: Ee,
269
+ GroupLabel: ye,
286
270
  List: X,
287
- Item: _e,
288
- Submenu: we,
289
- Footer: Ae,
290
- AccountRow: Be
271
+ Item: Re,
272
+ Submenu: Ae,
273
+ Footer: Ee,
274
+ AccountRow: Ce
291
275
  };
292
276
  export {
293
277
  H as a,
294
- ge as c,
295
- Xe as d,
278
+ ve as c,
279
+ qe as d,
296
280
  $ as i,
297
- V as l,
281
+ P as l,
298
282
  q as n,
299
- Qe as o,
300
- be as r,
283
+ He as o,
284
+ xe as r,
301
285
  j as s,
302
- ve as t,
303
- We as u
286
+ he as t,
287
+ je as u
304
288
  };
305
289
 
306
- //# sourceMappingURL=sidebar-ttBkgGRh.js.map
290
+ //# sourceMappingURL=sidebar-DTRcoxrB.js.map